From: Andre Noll Date: Sat, 14 Nov 2009 12:00:26 +0000 (+0100) Subject: imdct: Use the 1/sqrt(2) constant from math.h. X-Git-Tag: v0.4.1~22 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=46e1e9d5f136fc2314b176fc0033704c32f3d6a7;p=paraslash.git imdct: Use the 1/sqrt(2) constant from math.h. No need to define our own one. --- diff --git a/imdct.c b/imdct.c index ba5690b0..3495e611 100644 --- a/imdct.c +++ b/imdct.c @@ -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]); }