From 044664ac3bc07114996affc6fe95edd9b52f55bb Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 24 Mar 2025 16:34:24 -0300 Subject: [PATCH] avcodec/ffv1enc: remove mixed declarations and code Signed-off-by: James Almer --- libavcodec/ffv1enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 8a1658b3d9..4340a301e1 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1398,6 +1398,7 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc, for (int p= 0; p < 1 + 2*f->chroma_planes + f->transparency; p++) { float score_tab[16] = {0}; int64_t last_val = -1; + int best_index = 0; s.rc = sc->c; s.i = 0; s.p = p; @@ -1417,7 +1418,6 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc, last_val = val; } } - int best_index = 0; for(int si= 1; si < FF_ARRAY_ELEMS(score_tab); si++) { if (score_tab[si] < score_tab[ best_index ]) best_index = si;