[FFmpeg-cvslog] r15948 - in trunk/libavcodec: Makefile dct-test.c

diego subversion
Fri Nov 28 01:32:24 CET 2008


Author: diego
Date: Fri Nov 28 01:32:24 2008
New Revision: 15948

Log:
Do not duplicate AAN DCT tables in dct-test.c.


Modified:
   trunk/libavcodec/Makefile
   trunk/libavcodec/dct-test.c

Modified: trunk/libavcodec/Makefile
==============================================================================
--- trunk/libavcodec/Makefile	(original)
+++ trunk/libavcodec/Makefile	Fri Nov 28 01:32:24 2008
@@ -498,5 +498,5 @@ DIRS = alpha armv4l bfin i386 mlib ppc p
 
 include $(SUBDIR)../subdir.mak
 
-$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)fdctref.o
+$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)fdctref.o $(SUBDIR)aandcttab.o
 $(SUBDIR)fft-test$(EXESUF): $(SUBDIR)fdctref.o

Modified: trunk/libavcodec/dct-test.c
==============================================================================
--- trunk/libavcodec/dct-test.c	(original)
+++ trunk/libavcodec/dct-test.c	Fri Nov 28 01:32:24 2008
@@ -35,6 +35,7 @@
 #include "libavutil/common.h"
 
 #include "simple_idct.h"
+#include "aandcttab.h"
 #include "faandct.h"
 #include "faanidct.h"
 #include "i386/idct_xvid.h"
@@ -120,17 +121,6 @@ struct algo algos[] = {
 };
 
 #define AANSCALE_BITS 12
-static const unsigned short aanscales[64] = {
-    /* precomputed values scaled up by 14 bits */
-    16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-    22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
-    21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
-    19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
-    16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-    12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
-    8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
-    4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
-};
 
 uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
 
@@ -263,7 +253,7 @@ void dct_error(const char *name, int is_
 
         if (form == SCALE_PERM) {
             for(i=0; i<64; i++) {
-                scale = 8*(1 << (AANSCALE_BITS + 11)) / aanscales[i];
+                scale = 8*(1 << (AANSCALE_BITS + 11)) / ff_aanscales[i];
                 block[i] = (block[i] * scale /*+ (1<<(AANSCALE_BITS-1))*/) >> AANSCALE_BITS;
             }
         }




More information about the ffmpeg-cvslog mailing list