diff dsputil.h @ 10407:57acce8b1380 libavcodec

Move/add COSTABLE/SINTABLE macros to dsputil to add extern definitions for ff_cos_* and ff_sin_* without introducing too much code duplication.
author reimar
date Thu, 15 Oct 2009 17:55:51 +0000
parents 06bdadf410a9
children 8fd8f6c1cdcc
line wrap: on
line diff
--- a/dsputil.h	Thu Oct 15 17:19:07 2009 +0000
+++ b/dsputil.h	Thu Oct 15 17:55:51 2009 +0000
@@ -743,11 +743,44 @@
 } FFTContext;
 
 #if CONFIG_HARDCODED_TABLES
-extern const FFTSample* const ff_cos_tabs[13];
+#define COSTABLE_CONST const
 #else
-extern FFTSample* const ff_cos_tabs[13];
+#define COSTABLE_CONST
 #endif
 
+#define COSTABLE(size) \
+    COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2])
+#define SINTABLE(size) \
+    DECLARE_ALIGNED_16(FFTSample, ff_sin_##size[size/2])
+extern COSTABLE(16);
+extern COSTABLE(32);
+extern COSTABLE(64);
+extern COSTABLE(128);
+extern COSTABLE(256);
+extern COSTABLE(512);
+extern COSTABLE(1024);
+extern COSTABLE(2048);
+extern COSTABLE(4096);
+extern COSTABLE(8192);
+extern COSTABLE(16384);
+extern COSTABLE(32768);
+extern COSTABLE(65536);
+extern COSTABLE_CONST FFTSample* const ff_cos_tabs[13];
+
+extern SINTABLE(16);
+extern SINTABLE(32);
+extern SINTABLE(64);
+extern SINTABLE(128);
+extern SINTABLE(256);
+extern SINTABLE(512);
+extern SINTABLE(1024);
+extern SINTABLE(2048);
+extern SINTABLE(4096);
+extern SINTABLE(8192);
+extern SINTABLE(16384);
+extern SINTABLE(32768);
+extern SINTABLE(65536);
+
 /**
  * Sets up a complex FFT.
  * @param nbits           log2 of the length of the input array