Commit 41327cca authored by Mans Rullgard's avatar Mans Rullgard

FFT: simplify fft8()

Part of the fft8() function corresponds to the BUTTERFLIES macro,
so use it.
Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
parent b41a1089
......@@ -246,21 +246,16 @@ static void fft4(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);
BF(t1, z[5].re, z[4].re, -z[5].re);
BF(t2, z[5].im, z[4].im, -z[5].im);
BF(t3, z[7].re, z[6].re, -z[7].re);
BF(t4, 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);
BF(t5, z[7].re, z[6].re, -z[7].re);
BF(t6, z[7].im, z[6].im, -z[7].im);
BUTTERFLIES(z[0],z[2],z[4],z[6]);
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment