aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-15 17:55:51 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-15 17:55:51 +0000
commit4ee726b67097dcba8435f78235953389dac4e06e (patch)
tree6e7022f1492d31b9034e16cd15e88b16a41058e5 /libavcodec/dsputil.h
parent91405541d5c9e5c0d5c16b1d0ce025c3e8943c7d (diff)
downloadffmpeg-4ee726b67097dcba8435f78235953389dac4e06e.tar.gz
Move/add COSTABLE/SINTABLE macros to dsputil to add extern definitions
for ff_cos_* and ff_sin_* without introducing too much code duplication. Originally committed as revision 20243 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h37
1 files changed, 35 insertions, 2 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 50889bb1d1..cfa9bcf011 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -743,11 +743,44 @@ typedef struct FFTContext {
} 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