summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/lib/fft.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/lib/fft.h')
-rw-r--r--lib/rbcodec/codecs/lib/fft.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/lib/fft.h b/lib/rbcodec/codecs/lib/fft.h
new file mode 100644
index 0000000000..302a3b3996
--- /dev/null
+++ b/lib/rbcodec/codecs/lib/fft.h
@@ -0,0 +1,64 @@
1/*
2 * WMA compatible decoder
3 * Copyright (c) 2002 The FFmpeg Project.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef CODECLIB_FFT_H_INCLUDED
20#define CODECLIB_FFT_H_INCLUDED
21
22#include <inttypes.h>
23typedef int32_t fixed32;
24typedef int64_t fixed64;
25
26#define FFT_FIXED
27
28#ifdef FFT_FIXED
29typedef fixed32 FFTSample;
30#else /* FFT_FIXED */
31typedef float FFTSample;
32#endif /* FFT_FIXED */
33
34typedef struct FFTComplex {
35 FFTSample re, im;
36} FFTComplex;
37
38typedef struct FFTContext {
39 int nbits;
40 int inverse;
41 uint16_t *revtab;
42 int mdct_size; /* size of MDCT (i.e. number of input data * 2) */
43 int mdct_bits; /* n = 2^nbits */
44 /* pre/post rotation tables */
45 FFTSample *tcos;
46 FFTSample *tsin;
47 void (*fft_permute)(struct FFTContext *s, FFTComplex *z);
48 void (*fft_calc)(struct FFTContext *s, FFTComplex *z);
49 void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
50 void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
51 void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
52 int split_radix;
53 int permutation;
54#define FF_MDCT_PERM_NONE 0
55#define FF_MDCT_PERM_INTERLEAVE 1
56} FFTContext;
57
58// internal api (fft<->mdct)
59//int fft_calc_unscaled(FFTContext *s, FFTComplex *z);
60//void ff_fft_permute_c(FFTContext *s, FFTComplex *z); // internal only?
61void ff_fft_calc_c(int nbits, FFTComplex *z);
62
63#endif // CODECLIB_FFT_H_INCLUDED
64