From c257fe1fdee5846cde8f4ccb6fa2d01190829dac Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 3 Mar 2013 15:47:11 -0800 Subject: [PATCH] Move ff_cropTbl and ff_zigzag_direct from dsputil to mathtables. These are widely used throughout libavcodec, nothing dsputil-specific. Signed-off-by: Michael Niedermayer --- libavcodec/dsputil.c | 18 ------------------ libavcodec/dsputil.h | 2 +- libavcodec/mathtables.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 2bcc3ee339..12cfb1b216 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -42,7 +42,6 @@ #include "config.h" #include "diracdsp.h" -uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, }; uint32_t ff_squareTbl[512] = {0, }; #define BIT_DEPTH 9 @@ -68,17 +67,6 @@ uint32_t ff_squareTbl[512] = {0, }; #define pb_7f (~0UL/255 * 0x7f) #define pb_80 (~0UL/255 * 0x80) -const uint8_t ff_zigzag_direct[64] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63 -}; - /* Specific zigzag scan for 248 idct. NOTE that unlike the specification, we interleave the fields */ const uint8_t ff_zigzag248_direct[64] = { @@ -2626,12 +2614,6 @@ av_cold void ff_dsputil_static_init(void) { int i; - for(i=0;i<256;i++) ff_cropTbl[i + MAX_NEG_CROP] = i; - for(i=0;i