?? fft.h
字號(hào):
#ifndef _FFT_H
#define _FFT_H
#ifndef PI
#define PI 3.141592653589793
#endif
#ifndef PI2
#define PI2 6.283185307179586
#endif
/*define*/
#define maxPrimeFactor 37
#define maxPrimeFactorDiv2 (maxPrimeFactor+1)/2
#define maxFactorCount 20
/*static*/
static double c3_1 = -1.5000000000000E+00; /* c3_1 = cos(2*pi/3)-1; */
static double c3_2 = 8.6602540378444E-01; /* c3_2 = sin(2*pi/3); */
static double u5 = 1.2566370614359E+00; /* u5 = 2*pi/5; */
static double c5_1 = -1.2500000000000E+00; /* c5_1 = (cos(u5)+cos(2*u5))/2-1;*/
static double c5_2 = 5.5901699437495E-01; /* c5_2 = (cos(u5)-cos(2*u5))/2; */
static double c5_3 = -9.5105651629515E-01; /* c5_3 = -sin(u5); */
static double c5_4 = -1.5388417685876E+00; /* c5_4 = -(sin(u5)+sin(2*u5)); */
static double c5_5 = 3.6327126400268E-01; /* c5_5 = (sin(u5)-sin(2*u5)); */
static double c8 = 7.0710678118655E-01; /* c8 = 1/sqrt(2); */
int groupOffset,dataOffset,blockOffset,adr;
int groupNo,dataNo,blockNo,twNo;
double omega, tw_re,tw_im;
double twiddleRe[maxPrimeFactor], twiddleIm[maxPrimeFactor],
trigRe[maxPrimeFactor], trigIm[maxPrimeFactor],
zRe[maxPrimeFactor], zIm[maxPrimeFactor];
double vRe[maxPrimeFactorDiv2], vIm[maxPrimeFactorDiv2];
double wRe[maxPrimeFactorDiv2], wIm[maxPrimeFactorDiv2];
/*function*/
void factorize(int, int*, int*);
int transTableSetup(int*, int*, int*, int*,int*);
void permute(int, int,int* ,int* ,double* , double* ,double* , double* );
void initTrig(int);
void fft_4(double*, double*);
void fft_5(double*, double*);
void fft_8();
void fft_10();
void fft_odd(int);
void twiddleTransf(int, int, int, double*, double*);
int fft(int, double*, double*, double*, double*);
int ifft(int, double*, double*, double*, double*);
extern FILE *fp_error;
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -