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.

c6678 fft



专家好:

   本人愚钝,在使用dsplib中的函数

void DSPF_sp_fftSPxSP ( int  N,
float *  ptr_x,
float *  ptr_w,
float *  ptr_y,
unsigned char *  brev,
int  n_min,
int  offset,
int  n_max  

)

时,弄不清unsigned char * brev,

int n_min,

int offset,

int n_max这几个参数到底是什么意思?

int n_min好像是选择基2或基4fft算法?

请专家帮忙解答或发个链接有详细说明的,谢谢!

另外用于生成float * ptr_w,的参考代码哪里有,麻烦发个链接!

  • API在c66\DSPF_sp_fftSPxSP.h中有说明
    * @param N length of FFT in complex samples
    * @param ptr_x pointer to complex data input
    * @param ptr_w pointer to complex twiddle factor
    * @param ptr_y pointer to complex output data
    * @param brev pointer to bit reverse table containing 64 entries
    * @param n_min should be 4 if N can be represented as Power of 4 else, n_min should be 2

     --- 如果点数是64, 256,1024等4的幂次,那设成基4(n_min=4)效率高些,如果只是2的幂次,如128,512等那只能设成(n_min=2)
    * @param offset index in complex samples of sub-fft from start of main fft

    --- 如果是把大点FFT拆成小的FFT那么offset要配置,如果是独立的FFT那配置成0

    * @param n_max size of main fft in complex samples

    --- 如果是独立的FFT那么n_max= N

    蝶形因子的计算在 DSPF_sp_fftSPxSP_d.c line244 函数 void tw_gen (float *w, int n)实现

  • 谢谢James Li2的回答,很到位,很好。

    但是还有“param brev pointer”,这个unsigned char *的指针参数是做什么用的?


    “param brev pointer to bit reverse table containing 64 entries”

    参数breve指向包含64项的位反转表

    什么作用??请James Li2不吝赐教!

  • 不太清楚,就按照例子输入给它吧
    DSPF_sp_fftSPxSP_opt 的API也有这个参数,但没有用到