FastLED 3.9.15
Loading...
Searching...
No Matches

◆ 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 37 of file kiss_fft.cpp.

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