[FFmpeg-cvslog] avcodec/dirac_arith: Make table only used here static

Andreas Rheinhardt git at videolan.org
Fri Jan 1 01:07:44 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Dec 29 15:33:03 2020 +0100| [4425aa4be5d6e2307d8756642621452e0abc7c1b] | committer: Andreas Rheinhardt

avcodec/dirac_arith: Make table only used here static

Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

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

 libavcodec/dirac_arith.c | 6 +++---
 libavcodec/dirac_arith.h | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/dirac_arith.c b/libavcodec/dirac_arith.c
index 36142fe198..69b6280230 100644
--- a/libavcodec/dirac_arith.c
+++ b/libavcodec/dirac_arith.c
@@ -28,7 +28,7 @@
 #include "dirac_arith.h"
 
 
-const uint16_t ff_dirac_prob[256] = {
+static const uint16_t dirac_prob[256] = {
     0,    2,    5,    8,    11,   15,   20,   24,
     29,   35,   41,   47,   53,   60,   67,   74,
     82,   89,   97,   106,  114,  123,  132,  141,
@@ -88,8 +88,8 @@ av_cold void ff_dirac_init_arith_tables(void)
     int i;
 
     for (i = 0; i < 256; i++) {
-        ff_dirac_prob_branchless[i][0] =  ff_dirac_prob[255-i];
-        ff_dirac_prob_branchless[i][1] = -ff_dirac_prob[i];
+        ff_dirac_prob_branchless[i][0] =  dirac_prob[255-i];
+        ff_dirac_prob_branchless[i][1] = -dirac_prob[i];
     }
 }
 
diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h
index 79526a7ca3..350a58fca6 100644
--- a/libavcodec/dirac_arith.h
+++ b/libavcodec/dirac_arith.h
@@ -86,7 +86,6 @@ typedef struct {
 } DiracArith;
 
 extern const uint8_t ff_dirac_next_ctx[DIRAC_CTX_COUNT];
-extern const uint16_t ff_dirac_prob[256];
 extern int16_t ff_dirac_prob_branchless[256][2];
 
 static inline void renorm(DiracArith *c)



More information about the ffmpeg-cvslog mailing list