From ef0eac497f762e1dce7f338a573c27aa6a94dea7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 3 Jan 2014 23:55:52 -0500 Subject: [PATCH] Moving the radix-2 to expose trivial twiddle factors --- celt/kiss_fft.c | 67 +++++++++++++++++++++++++++------------ celt/static_modes_fixed.h | 26 +++++++-------- celt/static_modes_float.h | 26 +++++++-------- 3 files changed, 73 insertions(+), 46 deletions(-) diff --git a/celt/kiss_fft.c b/celt/kiss_fft.c index a7bdde81..fa6cd568 100644 --- a/celt/kiss_fft.c +++ b/celt/kiss_fft.c @@ -47,32 +47,55 @@ static void kf_bfly2( kiss_fft_cpx * Fout, - const size_t fstride, - const kiss_fft_state *st, int m, - int N, - int mm + int N ) { kiss_fft_cpx * Fout2; - const kiss_twiddle_cpx * tw1; - int i,j; - kiss_fft_cpx * Fout_beg = Fout; - for (i=0;itwiddles; - /* For non-custom modes, m is guaranteed to be a multiple of 4. */ - for(j=0;jtwiddles; - /* For non-custom modes, m=4, otherwise m is guaranteed to be a - multiple of 4. */ + /* m is guaranteed to be a multiple of 4. */ for (j=0;j 1) + { + facbuf[2*stages] = 4; + facbuf[2] = 2; + } stages++; } while (n > 1); n = nbak; @@ -503,7 +530,7 @@ void opus_fft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout) switch (st->factors[2*i]) { case 2: - kf_bfly2(fout,fstride[i]<