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

◆ kf_bfly5()

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

Definition at line 130 of file kiss_fft.c.

136{
137 kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
138 int u;
139 kiss_fft_cpx scratch[13];
140 kiss_fft_cpx * twiddles = st->twiddles;
141 kiss_fft_cpx *tw;
142 kiss_fft_cpx ya,yb;
143 ya = twiddles[fstride*m];
144 yb = twiddles[fstride*2*m];
145
146 Fout0=Fout;
147 Fout1=Fout0+m;
148 Fout2=Fout0+2*m;
149 Fout3=Fout0+3*m;
150 Fout4=Fout0+4*m;
151
152 tw=st->twiddles;
153 for ( u=0; u<m; ++u ) {
154 C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
155 scratch[0] = *Fout0;
156
157 C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
158 C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
159 C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
160 C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
161
162 C_ADD( scratch[7],scratch[1],scratch[4]);
163 C_SUB( scratch[10],scratch[1],scratch[4]);
164 C_ADD( scratch[8],scratch[2],scratch[3]);
165 C_SUB( scratch[9],scratch[2],scratch[3]);
166
167 Fout0->r += scratch[7].r + scratch[8].r;
168 Fout0->i += scratch[7].i + scratch[8].i;
169
170 scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);
171 scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);
172
173 scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);
174 scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);
175
176 C_SUB(*Fout1,scratch[5],scratch[6]);
177 C_ADD(*Fout4,scratch[5],scratch[6]);
178
179 scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);
180 scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);
181 scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);
182 scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);
183
184 C_ADD(*Fout2,scratch[11],scratch[12]);
185 C_SUB(*Fout3,scratch[11],scratch[12]);
186
187 ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;
188 }
189}
#define C_FIXDIV(c, div)
#define C_ADD(res, a, b)
#define C_SUB(res, a, b)
#define S_MUL(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_FIXDIV, C_MUL, C_SUB, kiss_fft_cpx::i, kiss_fft_cpx::r, S_MUL, and kiss_fft_state::twiddles.

Referenced by kf_work().

+ Here is the caller graph for this function: