Chris@434: #ifndef KISS_FTR_H Chris@434: #define KISS_FTR_H Chris@434: Chris@434: #include "kiss_fft.h" Chris@434: #ifdef __cplusplus Chris@434: extern "C" { Chris@434: #endif Chris@434: Chris@434: Chris@434: /* Chris@434: Chris@434: Real optimized version can save about 45% cpu time vs. complex fft of a real seq. Chris@434: Chris@434: Chris@434: Chris@434: */ Chris@434: Chris@434: typedef struct kiss_fftr_state *kiss_fftr_cfg; Chris@434: Chris@434: Chris@434: kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem); Chris@434: /* Chris@434: nfft must be even Chris@434: Chris@434: If you don't care to allocate space, use mem = lenmem = NULL Chris@434: */ Chris@434: Chris@434: Chris@434: void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata); Chris@434: /* Chris@434: input timedata has nfft scalar points Chris@434: output freqdata has nfft/2+1 complex points Chris@434: */ Chris@434: Chris@434: void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata); Chris@434: /* Chris@434: input freqdata has nfft/2+1 complex points Chris@434: output timedata has nfft scalar points Chris@434: */ Chris@434: Chris@434: #define kiss_fftr_free free Chris@434: Chris@434: #ifdef __cplusplus Chris@434: } Chris@434: #endif Chris@434: #endif