[FFmpeg-devel] [PATCH 34/60] avcodec/dv_tablegen: narrow variable scope

Marvin Scholz epirat07 at gmail.com
Mon Sep 9 01:36:34 EEST 2024


---
 libavcodec/dv_tablegen.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h
index 6d3e200a01..ee604b1cfe 100644
--- a/libavcodec/dv_tablegen.h
+++ b/libavcodec/dv_tablegen.h
@@ -51,7 +51,6 @@ static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE];
 static av_cold void dv_vlc_map_tableinit(void)
 {
     uint32_t code = 0;
-    int j;
     for (int i = 0; i < NB_DV_VLC; i++) {
         uint32_t cur_code = code >> (32 - ff_dv_vlc_len[i]);
         code += 1U << (32 - ff_dv_vlc_len[i]);
@@ -72,7 +71,7 @@ static av_cold void dv_vlc_map_tableinit(void)
     }
     for (int i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) {
 #if CONFIG_SMALL
-        for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) {
+        for (int j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) {
             if (dv_vlc_map[i][j].size == 0) {
                 dv_vlc_map[i][j].vlc  = dv_vlc_map[0][j].vlc |
                                         (dv_vlc_map[i - 1][0].vlc <<
@@ -82,7 +81,7 @@ static av_cold void dv_vlc_map_tableinit(void)
             }
         }
 #else
-        for (j = 1; j < DV_VLC_MAP_LEV_SIZE / 2; j++) {
+        for (int j = 1; j < DV_VLC_MAP_LEV_SIZE / 2; j++) {
             if (dv_vlc_map[i][j].size == 0) {
                 dv_vlc_map[i][j].vlc  = dv_vlc_map[0][j].vlc |
                                         (dv_vlc_map[i - 1][0].vlc <<
-- 
2.39.3 (Apple Git-146)




More information about the ffmpeg-devel mailing list