[FFmpeg-cvslog] avcodec/h261data: Make some tables non-static

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:38 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 15 17:21:16 2024 +0200| [3874442db29d7344169850ca6f8feb5e5629aa1d] | committer: Andreas Rheinhardt

avcodec/h261data: Make some tables non-static

This will allow to avoid the indirection via ff_h261_rl_tcoeff
in future commits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3874442db29d7344169850ca6f8feb5e5629aa1d
---

 libavcodec/h261.h     |  4 ++++
 libavcodec/h261data.c | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

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,
 };



More information about the ffmpeg-cvslog mailing list