From 5bc20ffb8881543dd3b22e713735bfca8a84368e Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 18 May 2025 01:01:28 +0200 Subject: [PATCH 03/19] avcodec/mpeg4videodec: Don't initialize unused parts of RLTables The reversible VLC tables use a simpler escaping method than the ordinary VLCs: It does not use max_run, max_level etc. and therefore one does not need to initialize these at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videodec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b6bb21174e..4d09a58ffb 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3901,7 +3901,6 @@ static int mpeg4_update_thread_context_for_user(AVCodecContext *dst, static av_cold void mpeg4_init_static(void) { - static uint8_t mpeg4_rvlc_rl_tables[2][2][2 * MAX_RUN + MAX_LEVEL + 3]; static VLCElem vlc_buf[6498]; VLCInitState state = VLC_INIT_STATE(vlc_buf); @@ -3924,8 +3923,6 @@ static av_cold void mpeg4_init_static(void) } ff_mpeg4_init_rl_intra(); - ff_rl_init(&ff_rvlc_rl_inter, mpeg4_rvlc_rl_tables[0]); - ff_rl_init(&ff_rvlc_rl_intra, mpeg4_rvlc_rl_tables[1]); INIT_FIRST_VLC_RL(ff_mpeg4_rl_intra, 554); VLC_INIT_RL(ff_rvlc_rl_inter, 1072); INIT_FIRST_VLC_RL(ff_rvlc_rl_intra, 1072); -- 2.45.2