FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ kf_bfly4()

static void kf_bfly4 ( kiss_fft_cpx * Fout,
const size_t fstride,
const kiss_fft_cfg st,
const size_t m )
static

Definition at line 38 of file kiss_fft.c.

44{
45 kiss_fft_cpx *tw1,*tw2,*tw3;
46 kiss_fft_cpx scratch[6];
47 size_t k=m;
48 const size_t m2=2*m;
49 const size_t m3=3*m;
50
51
52 tw3 = tw2 = tw1 = st->twiddles;
53
54 do {
55 C_FIXDIV(*Fout,4); C_FIXDIV(Fout[m],4); C_FIXDIV(Fout[m2],4); C_FIXDIV(Fout[m3],4);
56
57 C_MUL(scratch[0],Fout[m] , *tw1 );
58 C_MUL(scratch[1],Fout[m2] , *tw2 );
59 C_MUL(scratch[2],Fout[m3] , *tw3 );
60
61 C_SUB( scratch[5] , *Fout, scratch[1] );
62 C_ADDTO(*Fout, scratch[1]);
63 C_ADD( scratch[3] , scratch[0] , scratch[2] );
64 C_SUB( scratch[4] , scratch[0] , scratch[2] );
65 C_SUB( Fout[m2], *Fout, scratch[3] );
66 tw1 += fstride;
67 tw2 += fstride*2;
68 tw3 += fstride*3;
69 C_ADDTO( *Fout , scratch[3] );
70
71 if(st->inverse) {
72 Fout[m].r = scratch[5].r - scratch[4].i;
73 Fout[m].i = scratch[5].i + scratch[4].r;
74 Fout[m3].r = scratch[5].r + scratch[4].i;
75 Fout[m3].i = scratch[5].i - scratch[4].r;
76 }else{
77 Fout[m].r = scratch[5].r + scratch[4].i;
78 Fout[m].i = scratch[5].i - scratch[4].r;
79 Fout[m3].r = scratch[5].r - scratch[4].i;
80 Fout[m3].i = scratch[5].i + scratch[4].r;
81 }
82 ++Fout;
83 }while(--k);
84}
#define C_FIXDIV(c, div)
#define C_ADD(res, a, b)
#define C_ADDTO(res, a)
#define C_SUB(res, a, b)
#define C_MUL(m, a, b)
kiss_fft_cpx twiddles[1]
kiss_fft_scalar r
Definition kiss_fft.h:73
kiss_fft_scalar i
Definition kiss_fft.h:74

References C_ADD, C_ADDTO, C_FIXDIV, C_MUL, C_SUB, kiss_fft_cpx::i, kiss_fft_state::inverse, kiss_fft_cpx::r, and kiss_fft_state::twiddles.

Referenced by kf_work().

+ Here is the caller graph for this function: