Mercurial > hg > vamp-plugin-sdk
annotate src/vamp-sdk/ext/vamp_kiss_fftr.h @ 527:bc5e76e90e95 c++11-mutex
A better way, I think, of handling static initialisation order
author | Chris Cannam |
---|---|
date | Wed, 11 Sep 2019 14:55:16 +0100 |
parents | 90571dcc371a |
children |
rev | line source |
---|---|
Chris@501 | 1 #ifndef VAMP_KISS_FFTR_H |
Chris@501 | 2 #define VAMP_KISS_FFTR_H |
Chris@434 | 3 |
Chris@501 | 4 #include "vamp_kiss_fft.h" |
Chris@493 | 5 |
Chris@501 | 6 #ifndef VAMP_KISSFFT_USE_CPP_LINKAGE |
Chris@434 | 7 #ifdef __cplusplus |
Chris@434 | 8 extern "C" { |
Chris@434 | 9 #endif |
Chris@493 | 10 #endif |
Chris@434 | 11 |
Chris@434 | 12 |
Chris@434 | 13 /* |
Chris@434 | 14 |
Chris@434 | 15 Real optimized version can save about 45% cpu time vs. complex fft of a real seq. |
Chris@434 | 16 |
Chris@434 | 17 |
Chris@434 | 18 |
Chris@434 | 19 */ |
Chris@434 | 20 |
Chris@501 | 21 typedef struct vamp_kiss_fftr_state *vamp_kiss_fftr_cfg; |
Chris@434 | 22 |
Chris@434 | 23 |
Chris@501 | 24 vamp_kiss_fftr_cfg vamp_kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem); |
Chris@434 | 25 /* |
Chris@434 | 26 nfft must be even |
Chris@434 | 27 |
Chris@434 | 28 If you don't care to allocate space, use mem = lenmem = NULL |
Chris@434 | 29 */ |
Chris@434 | 30 |
Chris@434 | 31 |
Chris@501 | 32 void vamp_kiss_fftr(vamp_kiss_fftr_cfg cfg,const vamp_kiss_fft_scalar *timedata,vamp_kiss_fft_cpx *freqdata); |
Chris@434 | 33 /* |
Chris@434 | 34 input timedata has nfft scalar points |
Chris@434 | 35 output freqdata has nfft/2+1 complex points |
Chris@434 | 36 */ |
Chris@434 | 37 |
Chris@501 | 38 void vamp_kiss_fftri(vamp_kiss_fftr_cfg cfg,const vamp_kiss_fft_cpx *freqdata,vamp_kiss_fft_scalar *timedata); |
Chris@434 | 39 /* |
Chris@434 | 40 input freqdata has nfft/2+1 complex points |
Chris@434 | 41 output timedata has nfft scalar points |
Chris@434 | 42 */ |
Chris@434 | 43 |
Chris@501 | 44 void vamp_kiss_fftr_free(void *); |
Chris@434 | 45 |
Chris@501 | 46 #ifndef VAMP_KISSFFT_USE_CPP_LINKAGE |
Chris@434 | 47 #ifdef __cplusplus |
Chris@434 | 48 } |
Chris@434 | 49 #endif |
Chris@434 | 50 #endif |
Chris@493 | 51 |
Chris@501 | 52 #ifdef VAMP_KISSFFT_USE_CPP_LINKAGE |
Chris@501 | 53 #define VAMP_KISSFFT_USED_CPP_LINKAGE 1 |
Chris@493 | 54 #endif |
Chris@493 | 55 |
Chris@493 | 56 #endif |