[FFmpeg-cvslog] avcodec/ituh263dec: Only initialize ff_h263_rl_inter when needed

Andreas Rheinhardt git at videolan.org
Thu Jul 3 21:55:11 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Jun 15 20:33:11 2025 +0200| [1c258b5581200fb263d89b500f033e44431dbab2] | committer: Andreas Rheinhardt

avcodec/ituh263dec: Only initialize ff_h263_rl_inter when needed

The H.263 decoder itself does not need max_run/max_level
of this RLTable, only the MPEG-4 decoder does.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c258b5581200fb263d89b500f033e44431dbab2
---

 libavcodec/ituh263dec.c    | 1 -
 libavcodec/mpeg4videodec.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 95cd8f0b13..fa09ebb84b 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -123,7 +123,6 @@ static av_cold void h263_decode_init_vlc(void)
     VLC_INIT_STATIC_TABLE(ff_h263_mv_vlc, H263_MV_VLC_BITS, 33,
                           &ff_mvtab[0][1], 2, 1,
                           &ff_mvtab[0][0], 2, 1, 0);
-    ff_h263_init_rl_inter();
     VLC_INIT_RL(ff_h263_rl_inter, 554);
     INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554);
     VLC_INIT_STATIC_SPARSE_TABLE(h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15,
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 522242de40..2e3609b0d5 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3962,6 +3962,7 @@ static av_cold void mpeg4_init_static(void)
 
     static uint8_t mpeg4_rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
     ff_rl_init(&ff_mpeg4_rl_intra, mpeg4_rl_intra_table);
+    ff_h263_init_rl_inter();
 
     INIT_FIRST_VLC_RL(ff_mpeg4_rl_intra, 554);
     VLC_INIT_RL(ff_rvlc_rl_inter, 1072);



More information about the ffmpeg-cvslog mailing list