summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libspeex/kiss_fftr.h
diff options
context:
space:
mode:
authorSean Bartell <wingedtachikoma@gmail.com>2011-06-25 21:32:25 -0400
committerNils Wallménius <nils@rockbox.org>2012-04-25 22:13:20 +0200
commitf40bfc9267b13b54e6379dfe7539447662879d24 (patch)
tree9b20069d5e62809ff434061ad730096836f916f2 /lib/rbcodec/codecs/libspeex/kiss_fftr.h
parenta0009907de7a0107d49040d8a180f140e2eff299 (diff)
downloadrockbox-f40bfc9267b13b54e6379dfe7539447662879d24.tar.gz
rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.zip
Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/codecs/libspeex/kiss_fftr.h')
-rw-r--r--lib/rbcodec/codecs/libspeex/kiss_fftr.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libspeex/kiss_fftr.h b/lib/rbcodec/codecs/libspeex/kiss_fftr.h
new file mode 100644
index 0000000000..7bfb423340
--- /dev/null
+++ b/lib/rbcodec/codecs/libspeex/kiss_fftr.h
@@ -0,0 +1,51 @@
1#ifndef KISS_FTR_H
2#define KISS_FTR_H
3
4#include "kiss_fft.h"
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9
10/*
11
12 Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
13
14
15
16 */
17
18typedef struct kiss_fftr_state *kiss_fftr_cfg;
19
20
21kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
22/*
23 nfft must be even
24
25 If you don't care to allocate space, use mem = lenmem = NULL
26*/
27
28
29void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
30/*
31 input timedata has nfft scalar points
32 output freqdata has nfft/2+1 complex points
33*/
34
35void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
36
37void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
38
39void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
40
41/*
42 input freqdata has nfft/2+1 complex points
43 output timedata has nfft scalar points
44*/
45
46#define kiss_fftr_free speex_free
47
48#ifdef __cplusplus
49}
50#endif
51#endif