diff mbox series

[FFmpeg-devel,12/17] avcodec/speedhqdec: Use ff_rl_speedhq.table_(run|level) directly

Message ID AS8P250MB0744C9B5B5A1518695A394A98F2F9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 65beba7889982468c8c4e2add66ff0d3a790aaa8
Headers show
Series [FFmpeg-devel,01/17] avcodec/mpeg12dec: Remove redundant function call | expand

Commit Message

Andreas Rheinhardt Oct. 23, 2022, 7:36 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/speedhq.c    | 8 ++++----
 libavcodec/speedhq.h    | 2 ++
 libavcodec/speedhqdec.c | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)
diff mbox series

Patch

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 3a5b0eab05..0c5942e677 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();