kiss_fftr.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef KISS_FTR_H
  2. #define KISS_FTR_H
  3. #include "kiss_fft.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /*
  8. Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
  9. */
  10. typedef struct kiss_fftr_state *kiss_fftr_cfg;
  11. kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
  12. /*
  13. nfft must be even
  14. If you don't care to allocate space, use mem = lenmem = NULL
  15. */
  16. void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
  17. /*
  18. input timedata has nfft scalar points
  19. output freqdata has nfft/2+1 complex points
  20. */
  21. void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
  22. void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
  23. void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
  24. /*
  25. input freqdata has nfft/2+1 complex points
  26. output timedata has nfft scalar points
  27. */
  28. #define kiss_fftr_free speex_free
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif