Mercurial > hg > qm-dsp
annotate dsp/transforms/kissfft/kiss_fftr.h @ 289:befe5aa6b450
* Refactor FFT a little bit so as to separate construction and processing
rather than have a single static method -- will make it easier to use a
different implementation
* pull in KissFFT implementation (not hooked up yet)
| author | Chris Cannam <c.cannam@qmul.ac.uk> |
|---|---|
| date | Wed, 13 May 2009 09:19:12 +0000 |
| parents | |
| children |
| rev | line source |
|---|---|
| c@289 | 1 #ifndef KISS_FTR_H |
| c@289 | 2 #define KISS_FTR_H |
| c@289 | 3 |
| c@289 | 4 #include "kiss_fft.h" |
| c@289 | 5 #ifdef __cplusplus |
| c@289 | 6 extern "C" { |
| c@289 | 7 #endif |
| c@289 | 8 |
| c@289 | 9 |
| c@289 | 10 /* |
| c@289 | 11 |
| c@289 | 12 Real optimized version can save about 45% cpu time vs. complex fft of a real seq. |
| c@289 | 13 |
| c@289 | 14 |
| c@289 | 15 |
| c@289 | 16 */ |
| c@289 | 17 |
| c@289 | 18 typedef struct kiss_fftr_state *kiss_fftr_cfg; |
| c@289 | 19 |
| c@289 | 20 |
| c@289 | 21 kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem); |
| c@289 | 22 /* |
| c@289 | 23 nfft must be even |
| c@289 | 24 |
| c@289 | 25 If you don't care to allocate space, use mem = lenmem = NULL |
| c@289 | 26 */ |
| c@289 | 27 |
| c@289 | 28 |
| c@289 | 29 void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata); |
| c@289 | 30 /* |
| c@289 | 31 input timedata has nfft scalar points |
| c@289 | 32 output freqdata has nfft/2+1 complex points |
| c@289 | 33 */ |
| c@289 | 34 |
| c@289 | 35 void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata); |
| c@289 | 36 /* |
| c@289 | 37 input freqdata has nfft/2+1 complex points |
| c@289 | 38 output timedata has nfft scalar points |
| c@289 | 39 */ |
| c@289 | 40 |
| c@289 | 41 #define kiss_fftr_free free |
| c@289 | 42 |
| c@289 | 43 #ifdef __cplusplus |
| c@289 | 44 } |
| c@289 | 45 #endif |
| c@289 | 46 #endif |
