This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSP_FFT AND IFFT

Hi!

 

I have to filter a 512 *512 image (.raw file).  

Just to familiarise with the functions for 16 bit FFT, IFFT and twiddle factor generators, I tried to take FFT and IFFT of a single row (consisting of 512 elements) of the data.

The IFFT doesn't give the original data. The IFFT result doesn't seem to have any relation with the original data.

Is there any sort of scaling done while calculating the FFT or IFFT.

 

Thank you

Sohal

 

  • Sohal,

    THere is data scaling to avoid overflow in both FFT and IFFT functions. Please refer to this wiki to implment FFT with no scaling

    http://processors.wiki.ti.com/index.php/FFT_Implementation_With_No_Data_Scaling

    Thers is also an FFT example in the lexamples folder of the library package that demonstrates the use of FFT and IFFT to obtain the original data back. Please refer to that example and let us know if you have any questions or suggestions.

    Regards,

    Rahul

  • Hi Sohal.

     

    I recently spent a fair amount of time trying to get the FFT/IFFTs working when moving my software from a C64 to the C66, so I want to share with you what my problem was in case this helps you. I took an IFFT of some simple freq-domain data and then took an FFT expecting to get my original data back, but did not. Furthermore, with a slightly more complicated freq-domain signal my IFFT output was not correct. It turns out that with my old versions of the FFT and IFFT (from 2003) the same twiddle factors were used for the FFT and IFFT functions. With the current library there are unique twiddles for each. Thus, make sure you use the functions they give you to generate the FFT and IFFT twiddles separately. (In my case I used gen_twiddle_fft32x32 and gen_twiddle_ifft32x32.)  Also, the output of the FFT must be scaled by 1/FFTSIZE to get correct results. Oh, and make sure the twiddle factor buffers, the time-domain buffer, and the freq-domain buffer are all aligned on 8-byte boundaries. You can do this in C code using the DATA_ALIGN pragma as follows:

    #pragma

     

    DATA_ALIGN(L1FTXi_timeDomainSymbolBuffer,8);

     

    Denise Cammarata