From 65beba7889982468c8c4e2add66ff0d3a790aaa8 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 22 Oct 2022 02:26:52 +0200 Subject: [PATCH] avcodec/speedhqdec: Use ff_rl_speedhq.table_(run|level) directly Signed-off-by: Andreas Rheinhardt --- libavcodec/speedhq.c | 8 ++++---- libavcodec/speedhq.h | 2 ++ libavcodec/speedhqdec.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 2d6e8ca949..46ff0cfc53 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -60,7 +60,7 @@ const uint16_t ff_speedhq_vlc_table[SPEEDHQ_RL_NB_ELEMS + 2][2] = { {0x0006, 4} /* EOB */ }; -static const uint8_t speedhq_level[121] = { +const uint8_t ff_speedhq_level[121] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -79,7 +79,7 @@ static const uint8_t speedhq_level[121] = { 1, }; -static const uint8_t speedhq_run[121] = { +const uint8_t ff_speedhq_run[121] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -102,6 +102,6 @@ RLTable ff_rl_speedhq = { 121, 121, ff_speedhq_vlc_table, - speedhq_run, - speedhq_level, + ff_speedhq_run, + ff_speedhq_level, }; diff --git a/libavcodec/speedhq.h b/libavcodec/speedhq.h index 78f11ac6ab..8bc22ab0d7 100644 --- a/libavcodec/speedhq.h +++ b/libavcodec/speedhq.h @@ -28,6 +28,8 @@ #define SPEEDHQ_RL_NB_ELEMS 121 FF_VISIBILITY_PUSH_HIDDEN +extern const uint8_t ff_speedhq_run[SPEEDHQ_RL_NB_ELEMS]; +extern const uint8_t ff_speedhq_level[SPEEDHQ_RL_NB_ELEMS]; extern const uint16_t ff_speedhq_vlc_table[SPEEDHQ_RL_NB_ELEMS + 2][2]; extern RLTable attribute_visibility_hidden ff_rl_speedhq; diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c index 1ed8cfb9ff..ac233b3645 100644 --- a/libavcodec/speedhqdec.c +++ b/libavcodec/speedhqdec.c @@ -566,8 +566,8 @@ static av_cold void speedhq_static_init(void) ff_mpeg12_vlc_dc_chroma_code, 2, 2, INIT_VLC_OUTPUT_LE, 514); - ff_init_2d_vlc_rl(ff_speedhq_vlc_table, speedhq_rl_vlc, ff_rl_speedhq.table_run, - ff_rl_speedhq.table_level, ff_rl_speedhq.n, + ff_init_2d_vlc_rl(ff_speedhq_vlc_table, speedhq_rl_vlc, ff_speedhq_run, + ff_speedhq_level, SPEEDHQ_RL_NB_ELEMS, FF_ARRAY_ELEMS(speedhq_rl_vlc), INIT_VLC_LE); compute_alpha_vlcs();