Home arrow Support arrow Forums

Luminary Micro Forums

imellen

Fresh Boarder
Click here to see the profile of this user

2008/05/30 17:04

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

      Topics Author Date
    thread link
hand optimized FFT/IFFT for Cortex-M3 attached
imellen 2008/03/29 09:17
    thread link
thread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/16 11:16
    thread link
thread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/16 17:49
    thread link
thread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/17 04:10
    thread link
thread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/17 11:00
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/18 14:22
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/19 22:43
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/20 02:36
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
imellen 2008/05/21 11:30
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/22 14:47
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/22 19:58
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
imellen 2008/05/23 12:44
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/23 15:23
    thread link
thread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/26 14:51
    thread link
thread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
paulkimelman 2008/05/26 23:57
    thread link
thread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/29 14:41
    thread link
thread linkthread linkthread linkthread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
imellen 2008/05/30 17:04
    thread link
thread linkthread link Re:hand optimized FFT/IFFT for Cortex-M3 attached
ProARM 2008/05/26 14:51