diff mbox series

[FFmpeg-devel,71/73] avcodec/h261data: Make some tables non-static

Message ID GV1P250MB07376E6328374F430F4D89B58FC32@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/57] avcodec/vc1: Combine identical checks | expand

Commit Message

Andreas Rheinhardt June 15, 2024, 5:16 p.m. UTC
This will allow to avoid the indirection via ff_h261_rl_tcoeff
in future commits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/h261.h     |  4 ++++
 libavcodec/h261data.c | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/h261.h b/libavcodec/h261.h
index 11a8a8685a..4279a12677 100644
--- a/libavcodec/h261.h
+++ b/libavcodec/h261.h
@@ -50,6 +50,10 @@  extern const uint8_t ff_h261_mv_tab[17][2];
 extern const uint8_t ff_h261_cbp_tab[63][2];
 extern RLTable ff_h261_rl_tcoeff;
 
+extern const uint16_t ff_h261_tcoeff_vlc[65][2];
+extern const int8_t ff_h261_tcoeff_level[64];
+extern const int8_t ff_h261_tcoeff_run[64];
+
 void ff_h261_loop_filter(MpegEncContext *s);
 
 #endif /* AVCODEC_H261_H */
diff --git a/libavcodec/h261data.c b/libavcodec/h261data.c
index bccd9e5f56..3ee750f98c 100644
--- a/libavcodec/h261data.c
+++ b/libavcodec/h261data.c
@@ -104,7 +104,7 @@  const uint8_t ff_h261_cbp_tab[63][2] = {
 };
 
 // H.261 VLC table for transform coefficients
-static const uint16_t h261_tcoeff_vlc[65][2] = {
+const uint16_t ff_h261_tcoeff_vlc[65][2] = {
     {  0x2,  2 }, {  0x3,  2 }, {  0x4,  4 }, {  0x5,  5 },
     {  0x6,  7 }, { 0x26,  8 }, { 0x21,  8 }, {  0xa, 10 },
     { 0x1d, 12 }, { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 },
@@ -124,7 +124,7 @@  static const uint16_t h261_tcoeff_vlc[65][2] = {
     {  0x1,  6 }  // escape
 };
 
-static const int8_t h261_tcoeff_level[64] = {
+const int8_t ff_h261_tcoeff_level[64] = {
     0, 1,  2,  3,  4,  5,  6,  7,
     8, 9, 10, 11, 12, 13, 14, 15,
     1, 2,  3,  4,  5,  6,  7,  1,
@@ -135,7 +135,7 @@  static const int8_t h261_tcoeff_level[64] = {
     1, 1,  1,  1,  1,  1,  1,  1
 };
 
-static const int8_t h261_tcoeff_run[64] = {
+const int8_t ff_h261_tcoeff_run[64] = {
      0,
      0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  1,
@@ -150,7 +150,7 @@  static const int8_t h261_tcoeff_run[64] = {
 RLTable ff_h261_rl_tcoeff = {
     64,
     64,
-    h261_tcoeff_vlc,
-    h261_tcoeff_run,
-    h261_tcoeff_level,
+    ff_h261_tcoeff_vlc,
+    ff_h261_tcoeff_run,
+    ff_h261_tcoeff_level,
 };