annotate src/vamp-sdk/ext/kiss_fftr.h @ 434:e979a9c4ffb6 vampipe

Switch from Cross FFT with option of FFTW build, to KissFFT only (code bundled). This is much faster than the default build and simpler than managing two options.
author Chris Cannam
date Tue, 16 Aug 2016 16:04:09 +0100
parents
children 25e023bad200
rev   line source
Chris@434 1 #ifndef KISS_FTR_H
Chris@434 2 #define KISS_FTR_H
Chris@434 3
Chris@434 4 #include "kiss_fft.h"
Chris@434 5 #ifdef __cplusplus
Chris@434 6 extern "C" {
Chris@434 7 #endif
Chris@434 8
Chris@434 9
Chris@434 10 /*
Chris@434 11
Chris@434 12 Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
Chris@434 13
Chris@434 14
Chris@434 15
Chris@434 16 */
Chris@434 17
Chris@434 18 typedef struct kiss_fftr_state *kiss_fftr_cfg;
Chris@434 19
Chris@434 20
Chris@434 21 kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
Chris@434 22 /*
Chris@434 23 nfft must be even
Chris@434 24
Chris@434 25 If you don't care to allocate space, use mem = lenmem = NULL
Chris@434 26 */
Chris@434 27
Chris@434 28
Chris@434 29 void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
Chris@434 30 /*
Chris@434 31 input timedata has nfft scalar points
Chris@434 32 output freqdata has nfft/2+1 complex points
Chris@434 33 */
Chris@434 34
Chris@434 35 void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
Chris@434 36 /*
Chris@434 37 input freqdata has nfft/2+1 complex points
Chris@434 38 output timedata has nfft scalar points
Chris@434 39 */
Chris@434 40
Chris@434 41 #define kiss_fftr_free free
Chris@434 42
Chris@434 43 #ifdef __cplusplus
Chris@434 44 }
Chris@434 45 #endif
Chris@434 46 #endif