X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=imdct.c;h=5f48ba44c11b1186f6ebea4d5cec33b34e622bcc;hp=ba5690b04e52bdd45ea2d433822d6e6da47fc19d;hb=1e012cf40238883621692051a22fb9c7cad5e944;hpb=331d770a878ac411ca1ce832fa729be0da6b940e diff --git a/imdct.c b/imdct.c index ba5690b0..5f48ba44 100644 --- a/imdct.c +++ b/imdct.c @@ -59,7 +59,7 @@ struct mdct_context { }; /** cos(2 * pi * x / n) for 0 <= x <= n / 4, followed by its reverse */ -#define COSINE_TAB(n) fftsample_t cos_ ## n[n / 2] __aligned(16) +#define COSINE_TAB(n) fftsample_t cos_ ## n[n / 2] __a_aligned(16) COSINE_TAB(16); COSINE_TAB(32); @@ -95,9 +95,6 @@ static int split_radix_permutation(int i, int n) return split_radix_permutation(i, m) * 4 - 1; } -/** 1 / sqrt(2). */ -#define SQRTHALF (float)0.70710678118654752440 - #define BF(x, y, a, b) {\ x = a - b;\ y = a + b;\ @@ -209,7 +206,7 @@ static void fft8(struct fft_complex *z) BF(z[6].re, z[2].re, z[2].re, t7); BF(z[6].im, z[2].im, z[2].im, t8); - TRANSFORM(z[1], z[3], z[5], z[7], SQRTHALF, SQRTHALF); + TRANSFORM(z[1], z[3], z[5], z[7], M_SQRT1_2, M_SQRT1_2); } static void fft16(struct fft_complex *z) @@ -221,7 +218,7 @@ static void fft16(struct fft_complex *z) fft4(z + 12); TRANSFORM_ZERO(z[0], z[4], z[8], z[12]); - TRANSFORM(z[2], z[6], z[10], z[14], SQRTHALF, SQRTHALF); + TRANSFORM(z[2], z[6], z[10], z[14], M_SQRT1_2, M_SQRT1_2); TRANSFORM(z[1], z[5], z[9], z[13], cos_16[1], cos_16[3]); TRANSFORM(z[3], z[7], z[11], z[15], cos_16[3], cos_16[1]); }