]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - imdct.c
Add __aligned macro to gcc-compat.h. and use this instead of DECLARE_ALIGNED.
[paraslash.git] / imdct.c
diff --git a/imdct.c b/imdct.c
index ac085bbc519dcd5dfa8b359f96475270ef2e1a48..f77da7bb7228c6a982dff314ba3fd459f3006d32 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -51,20 +51,22 @@ struct mdct_context {
        struct fft_context fft;
 };
 
-/* cos(2*pi*x/n) for 0<=x<=n/4, followed by its reverse */
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_16[8]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_32[16]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_64[32]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_128[64]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_256[128]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_512[256]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_1024[512]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_2048[1024]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_4096[2048]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_8192[4096]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_16384[8192]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_32768[16384]);
-DECLARE_ALIGNED_16(fftsample_t, ff_cos_65536[32768]);
+/** cos(2 * pi * x / n) for 0 <= x <= n / 4, followed by its reverse */
+#define COSINE_TAB(n) fftsample_t ff_cos_ ## n[n / 2] __aligned(16)
+
+COSINE_TAB(16);
+COSINE_TAB(32);
+COSINE_TAB(64);
+COSINE_TAB(128);
+COSINE_TAB(256);
+COSINE_TAB(512);
+COSINE_TAB(1024);
+COSINE_TAB(2048);
+COSINE_TAB(4096);
+COSINE_TAB(8192);
+COSINE_TAB(16384);
+COSINE_TAB(32768);
+COSINE_TAB(65536);
 
 static fftsample_t *ff_cos_tabs[] = {
        ff_cos_16, ff_cos_32, ff_cos_64, ff_cos_128, ff_cos_256,