FFT: simplify fft8()

Part of the fft8() function corresponds to the BUTTERFLIES macro,
so use it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard 2011-03-27 14:49:55 +01:00
parent b41a108914
commit 41327cca61
1 changed files with 4 additions and 9 deletions

View File

@ -246,21 +246,16 @@ static void fft4(FFTComplex *z)
static void fft8(FFTComplex *z) static void fft8(FFTComplex *z)
{ {
FFTDouble t1, t2, t3, t4, t5, t6, t7, t8; FFTDouble t1, t2, t3, t4, t5, t6;
fft4(z); fft4(z);
BF(t1, z[5].re, z[4].re, -z[5].re); BF(t1, z[5].re, z[4].re, -z[5].re);
BF(t2, z[5].im, z[4].im, -z[5].im); BF(t2, z[5].im, z[4].im, -z[5].im);
BF(t3, z[7].re, z[6].re, -z[7].re); BF(t5, z[7].re, z[6].re, -z[7].re);
BF(t4, z[7].im, z[6].im, -z[7].im); BF(t6, z[7].im, z[6].im, -z[7].im);
BF(t8, t1, t3, t1);
BF(t7, t2, t2, t4);
BF(z[4].re, z[0].re, z[0].re, t1);
BF(z[4].im, z[0].im, z[0].im, t2);
BF(z[6].re, z[2].re, z[2].re, t7);
BF(z[6].im, z[2].im, z[2].im, t8);
BUTTERFLIES(z[0],z[2],z[4],z[6]);
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf); TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf);
} }