AnsweredAssumed Answered

FFT/IFFT Audio distortion

Question asked by Krishnamangegowda on Dec 28, 2012
Latest reply on Jan 7, 2013 by Mitesh

Hi,

I am using ADSP 21489 SHARC processor and we are planning to use the fast version of library function to compute the spectrum. I was testing the various library functions and we are interested in SIMD version of cfftf and ifftf.

 

I have tested cfftf and ifftf in series with some audio data and it seems to work fine if I don't modify the spectrum of the signal. If I change the amplitude of some frequency bins, then the output from the ifftf produces some distortion. After modifying the frequency bins, I arrange the spectrum as follows before calling ifftf:

 

#define N_FFT 128

fft_output_re[0] = fft_output_im[0] = fft_output_re[N_FFT/2] = fft_output_im[N_FFT/2] = 0.0F; // DC and Nyquist frequency

/* To take care of the negative frequencies */

for(index = 1; index < N_FFT/2; index++)

{

     fft_output_re[N_FFT - index] = fft_output_re[index];

     fft_output_im[N_FFT- index] = -fft_output_im[index];

}

then I call the ifftf library function, but the audio is always gets distorted. Am I missing anything here?

 

Waiting for your reply.

 

Thanks,

Krishna.

Outcomes