Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM, most questions you've asked is beyond the scope of this forum. FFT is workhorse in multiple DSP algorithms, I suggest you find some DSP literature how to use it. The fundamental questions is not "So, I have optimized FFT routine, where can I use it?" but "I need optmized FFT for my application, where can I find it?" Anyway, I'll try to answer most of your questions related directly to posted FFT routine: 1) 1Q15 coefficients - this is often used fixed decimal point notation. Number before Q meand number of integer bits (including sign if signed), number behind is number of fractional bits. Signed 1Q15 integer can represent values from -32768/32768 to +32767/32768 = -1 to 0.99996 2) example uses arrays of 512 words each - this is indeed for 256 point FFT test (256 x two 16 bit integers (real, imaginary) ) 3,4) input array x is complex, but input data real - yes, it means imaginary part=0. This is sort of inefficient use of complex FFT, as 2nd half of FFT output is symetrical copy. There are some tricks based on FFT properties how to calculate real FFT of length 2*N with complex FFT of length N. As I said it will be in version 2.0 (when I find more time for this) 5) FFT output scaled by N - this is inherent limitation of 16 bit arithmetics in order to avoid overflow. You have to multiply output by N in order to restore original values. 6) x - fft - ifft - your assumptions are correct, keep in mind scaling issues 7) can I reuse x - FFT reads x, writes output to y. x and y arrays has to be different. Your example will work, basic programing principles. 8) frequency bin separation is fs/N where fs is sampling frequency, N is fft size. For fs=44100Hz FFT bins are 172.265625 Hz apart. 9) audio filtering in frequency domain - it is complicated issue, make some research on convolution in frequency domain and mp3 principles. Process that you've described will work for single buffer (N samples) For continuous stream it will produce discontinuities at the buffer edges (you have to overlap buffers and use windowing)
hope this helps. Ivan P.S. I've finished updated FFT routine that also supports odd powers of two (N=8, 32, 128, 512 and 2048). I'll post it soon after cosmetic changes.
login or register to reply
|