47 #ifndef NE10_FFT_GENERIC_FLOAT32_H 48 #define NE10_FFT_GENERIC_FLOAT32_H 61 scratch_out[0] = scratch_in[0];
69 FFT2_MUL_TW (scratch_out, scratch_in, scratch_tw);
77 FFT3_MUL_TW (scratch_out, scratch_in, scratch_tw);
88 { 0.70711, -0.70711 },
89 { 0.00000, -1.00000 },
90 { -0.70711, -0.70711 },
93 #define NE10_BUTTERFLY_INDEX_F32(OUT,IN,OUT_I,OUT_J,IN_I,IN_J) \ 95 NE10_CPX_ADD (OUT[OUT_I],IN[IN_I],IN[IN_J]); \ 96 NE10_CPX_SUB (OUT[OUT_J],IN[IN_I],IN[IN_J]); \ 112 #define NE10_CPX_MUL_TW8_F32(OUT,TW_8_TABLE,OUT_I,TW_J) \ 114 ne10_fft_cpx_float32_t TW_TMP = TW_8_TABLE[TW_J]; \ 115 NE10_CPX_MUL_F32 (OUT[OUT_I],OUT[OUT_I],TW_TMP); \ 136 #undef NE10_CPX_MUL_TW8_F32 158 FFT4_MUL_TW (scratch_out, scratch_in, scratch_tw);
171 NE10_CPX_ADD (scratch_out[0], scratch_in[0], scratch_in[1]);
172 NE10_CPX_SUB (scratch_out[1], scratch_in[0], scratch_in[1]);
181 scratch_in[0] = Fin[0];
182 scratch_in[1] = Fin[1];
183 scratch_in[2] = Fin[2];
185 scratch[1] = scratch_in[1];
186 scratch[2] = scratch_in[2];
191 scratch_in[1].
r = scratch_in[0].
r - scratch[3].
r * 0.5;
192 scratch_in[1].
i = scratch_in[0].
i - scratch[3].
i * 0.5;
194 scratch[0].
r *= -TW_3I_F32;
195 scratch[0].
i *= -TW_3I_F32;
197 scratch_in[0].
r += scratch[3].
r;
198 scratch_in[0].
i += scratch[3].
i;
200 scratch_in[2].
r = scratch_in[1].
r + scratch[0].
i;
201 scratch_in[2].
i = scratch_in[1].
i - scratch[0].
r;
203 scratch_in[1].
r -= scratch[0].
i;
204 scratch_in[1].
i += scratch[0].
r;
206 Fout[0] = scratch_in[0];
207 Fout[1] = scratch_in[1];
208 Fout[2] = scratch_in[2];
216 NE10_CPX_ADD (scratch[0], scratch_in[0], scratch_in[2]);
217 NE10_CPX_SUB (scratch[1], scratch_in[0], scratch_in[2]);
218 NE10_CPX_ADD (scratch[2], scratch_in[1], scratch_in[3]);
219 NE10_CPX_SUB (scratch[3], scratch_in[1], scratch_in[3]);
224 scratch_out[1].
r = scratch[1].
r + scratch[3].
i;
225 scratch_out[1].
i = scratch[1].
i - scratch[3].
r;
226 scratch_out[3].
r = scratch[1].
r - scratch[3].
i;
227 scratch_out[3].
i = scratch[1].
i + scratch[3].
r;
234 NE10_CPX_ADD (scratch[0], scratch_out[0], scratch_out[2]);
235 NE10_CPX_SUB (scratch[1], scratch_out[0], scratch_out[2]);
236 NE10_CPX_ADD (scratch[2], scratch_out[1], scratch_out[3]);
237 NE10_CPX_SUB (scratch[3], scratch_out[1], scratch_out[3]);
242 scratch_out[1].
r = scratch[1].
r + scratch[3].
i;
243 scratch_out[1].
i = scratch[1].
i - scratch[3].
r;
244 scratch_out[3].
r = scratch[1].
r - scratch[3].
i;
245 scratch_out[3].
i = scratch[1].
i + scratch[3].
r;
253 scratch_in[0] = Fin[0];
254 scratch_in[1] = Fin[1];
255 scratch_in[2] = Fin[2];
256 scratch_in[3] = Fin[3];
257 scratch_in[4] = Fin[4];
259 scratch[0] = scratch_in[0];
260 scratch[1] = scratch_in[1];
261 scratch[2] = scratch_in[2];
262 scratch[3] = scratch_in[3];
263 scratch[4] = scratch_in[4];
270 scratch_in[0].
r += scratch[7].
r + scratch[8].
r;
271 scratch_in[0].
i += scratch[7].
i + scratch[8].
i;
273 scratch[5].
r = scratch[0].
r 276 scratch[5].
i = scratch[0].
i 288 scratch[11].
r = scratch[0].
r 291 scratch[11].
i = scratch[0].
i 295 scratch[12].
r = -
NE10_S_MUL (scratch[10].i, TW_5B_F32.
i)
303 Fout[0] = scratch_in[0];
304 Fout[1] = scratch_in[1];
305 Fout[2] = scratch_in[2];
306 Fout[3] = scratch_in[3];
307 Fout[4] = scratch_in[4];
309 #endif // NE10_FFT_GENERIC_FLOAT32_H #define NE10_BUTTERFLY_INDEX_F32(OUT, IN, OUT_I, OUT_J, IN_I, IN_J)
#define NE10_CPX_MUL_TW8_F32(OUT, TW_8_TABLE, OUT_I, TW_J)
#define NE10_CPX_ADD(Z, A, B)
#define NE10_CPX_MUL_F32(Z, A, B)
#define NE10_CPX_SUB(Z, A, B)