]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/h261dec: Don't initialize unused VLCs
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 8 Dec 2020 21:51:25 +0000 (22:51 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 25 Jan 2021 13:51:53 +0000 (14:51 +0100)
The H.261 decoder uses only the very first VLC of ff_h261_rl_tcoeff,
so only initialize this one. Saves 68448B from the .bss segment; in case
the decoder is actually used, this amount of memory is saved.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/h261dec.c

index c6440ba902af9ffec7ff03730f0a21a0b1d43fc8..2dc2fb30f25fcc89df6da53f95acf3f6e34d7faf 100644 (file)
@@ -65,7 +65,7 @@ static av_cold void h261_decode_init_vlc(H261Context *h)
         INIT_VLC_STATIC(&h261_cbp_vlc, H261_CBP_VLC_BITS, 63,
                         &ff_h261_cbp_tab[0][1], 2, 1,
                         &ff_h261_cbp_tab[0][0], 2, 1, 512);
-        INIT_VLC_RL(ff_h261_rl_tcoeff, 552);
+        INIT_FIRST_VLC_RL(ff_h261_rl_tcoeff, 552);
     }
 }