diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-22 00:17:07 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-27 16:44:36 +0300 |
commit | 11dfa4d15963a7ad71b763261d6d7e3dcded9965 (patch) | |
tree | 5cfb8de2192009d8fc18f8d0cd957250bd6ce385 /libavcodec/speedhqdec.c | |
parent | 9aa7397db13e649b3d2d04cdb33920d7a9000d87 (diff) |
avcodec/mpeg12: Avoid indirection when accessing rl_vlc tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/speedhqdec.c')
-rw-r--r-- | libavcodec/speedhqdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c index 5378b987dc..93b60a4c3d 100644 --- a/libavcodec/speedhqdec.c +++ b/libavcodec/speedhqdec.c @@ -77,6 +77,8 @@ static VLC dc_chroma_vlc_le; static VLC dc_alpha_run_vlc_le; static VLC dc_alpha_level_vlc_le; +static RL_VLC_ELEM speedhq_rl_vlc[674]; + static inline int decode_dc_le(GetBitContext *gb, int component) { int code, diff; @@ -154,7 +156,7 @@ static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int l for ( ;; ) { int level, run; UPDATE_CACHE_LE(re, gb); - GET_RL_VLC(level, run, re, gb, ff_rl_speedhq.rl_vlc[0], + GET_RL_VLC(level, run, re, gb, speedhq_rl_vlc, TEX_VLC_BITS, 2, 0); if (level == 127) { break; @@ -564,7 +566,7 @@ static av_cold void speedhq_static_init(void) ff_mpeg12_vlc_dc_chroma_code, 2, 2, INIT_VLC_OUTPUT_LE, 514); - INIT_2D_VLC_RL(ff_rl_speedhq, 674, INIT_VLC_LE); + INIT_2D_VLC_RL(ff_rl_speedhq, speedhq_rl_vlc, INIT_VLC_LE); compute_alpha_vlcs(); } |