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.
Hi
I think I'm having unexpectd result using DSPF_sp_fftSPxSP (dsplib_c66x_3_4_0_0)
Pseudo code:
#define N_FFT 64
#pragma DATA_ALIGN(inputFFT, 8);
float inputFFT [2*N_FFT];
#pragma DATA_ALIGN(outputFFT, 8);
float outputFFT [2*N_FFT];
for (i = 0; i < N_FFT; i++)
{
inputFFT[2*i] = sinWaveMag * (float)cos(sinWaveIncFreq*i);
inputFFT[2*i + 1] = 0.0;
}
DSPF_sp_fftSPxSP(N_FFT,inputFFT,w_sp,outputFFT,brev,4,0,N_FFT);
This is ok, I get the result as in the following figure (OK)
Second test:
I use a 16 samples input function, zero padding in the time domain by adding 64-16 = 48 zeros
Pseudo code
/* Clear the input floating point array */
for (i = 0; i < N_FFT; i++)
{
inputFFT[2*i] = (float)0.0;
inputFFT[2*i + 1] = (float)0.0;
}
for (i = 0; i < 16; i++)
{
inputFFT[2*i] = sinWaveMag * (float)cos(sinWaveIncFreq*i);
inputFFT[2*i + 1] = 0.0;
}
I get unexpected result, see following figure
The expected result (using another DFT function) is the following:
am i doing something wrong?
Thank you
Fabio