diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-15 17:55:51 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-15 17:55:51 +0000 |
commit | 4ee726b67097dcba8435f78235953389dac4e06e (patch) | |
tree | 6e7022f1492d31b9034e16cd15e88b16a41058e5 /libavcodec/fft.c | |
parent | 91405541d5c9e5c0d5c16b1d0ce025c3e8943c7d (diff) | |
download | ffmpeg-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/fft.c')
-rw-r--r-- | libavcodec/fft.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c index c50c6891c9..e01005f501 100644 --- a/libavcodec/fft.c +++ b/libavcodec/fft.c @@ -28,32 +28,23 @@ #include "dsputil.h" -#if CONFIG_HARDCODED_TABLES -#define COSTABLE(size) \ - extern const DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2]); -#else -#define COSTABLE(size) \ - DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2]); -#endif - /* cos(2*pi*x/n) for 0<=x<=n/4, followed by its reverse */ -COSTABLE(16) -COSTABLE(32) -COSTABLE(64) -COSTABLE(128) -COSTABLE(256) -COSTABLE(512) -COSTABLE(1024) -COSTABLE(2048) -COSTABLE(4096) -COSTABLE(8192) -COSTABLE(16384) -COSTABLE(32768) -COSTABLE(65536) -#if CONFIG_HARDCODED_TABLES -const +#if !CONFIG_HARDCODED_TABLES +COSTABLE(16); +COSTABLE(32); +COSTABLE(64); +COSTABLE(128); +COSTABLE(256); +COSTABLE(512); +COSTABLE(1024); +COSTABLE(2048); +COSTABLE(4096); +COSTABLE(8192); +COSTABLE(16384); +COSTABLE(32768); +COSTABLE(65536); #endif -FFTSample * const ff_cos_tabs[] = { +COSTABLE_CONST FFTSample * const ff_cos_tabs[] = { ff_cos_16, ff_cos_32, ff_cos_64, ff_cos_128, ff_cos_256, ff_cos_512, ff_cos_1024, ff_cos_2048, ff_cos_4096, ff_cos_8192, ff_cos_16384, ff_cos_32768, ff_cos_65536, }; |