mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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:
parent
b41a108914
commit
41327cca61
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user