[FFmpeg-devel] [PATCH 04/48] avcodec/ituh263dec: Only initialize ff_h263_rl_inter when needed
Andreas Rheinhardt
ffmpegagent at gmail.com
Mon Jun 23 16:36:04 EEST 2025
From: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
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>
---
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);
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list