diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/libwma/fft.c | 3 | ||||
-rw-r--r-- | apps/codecs/libwma/fft.h | 21 | ||||
-rw-r--r-- | apps/codecs/libwma/mdct.c | 4 | ||||
-rw-r--r-- | apps/codecs/libwma/mdct.h | 12 | ||||
-rw-r--r-- | apps/codecs/libwma/types.h | 5 | ||||
-rw-r--r-- | apps/codecs/libwma/wmadec.h | 35 | ||||
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 1 | ||||
-rw-r--r-- | apps/codecs/libwma/wmafixed.h | 1 |
8 files changed, 44 insertions, 38 deletions
diff --git a/apps/codecs/libwma/fft.c b/apps/codecs/libwma/fft.c index e934e3c1ce..f19dac0aed 100644 --- a/apps/codecs/libwma/fft.c +++ b/apps/codecs/libwma/fft.c | |||
@@ -17,7 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "wmadec.h" | 20 | //#include "types.h" |
21 | #include "fft.h" | ||
21 | #include "wmafixed.h" | 22 | #include "wmafixed.h" |
22 | 23 | ||
23 | FFTComplex exptab0[512] IBSS_ATTR; | 24 | FFTComplex exptab0[512] IBSS_ATTR; |
diff --git a/apps/codecs/libwma/fft.h b/apps/codecs/libwma/fft.h index 2342140ef4..f3aaf2fcc8 100644 --- a/apps/codecs/libwma/fft.h +++ b/apps/codecs/libwma/fft.h | |||
@@ -17,6 +17,27 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "types.h" | ||
21 | |||
22 | typedef fixed32 FFTSample; | ||
23 | |||
24 | typedef struct FFTComplex | ||
25 | { | ||
26 | fixed32 re, im; | ||
27 | } | ||
28 | FFTComplex; | ||
29 | |||
30 | typedef struct FFTContext | ||
31 | { | ||
32 | int nbits; | ||
33 | int inverse; | ||
34 | uint16_t *revtab; | ||
35 | FFTComplex *exptab; | ||
36 | FFTComplex *exptab1; /* only used by SSE code */ | ||
37 | int (*fft_calc)(struct FFTContext *s, FFTComplex *z); | ||
38 | } | ||
39 | FFTContext; | ||
40 | |||
20 | int fft_calc_unscaled(FFTContext *s, FFTComplex *z); | 41 | int fft_calc_unscaled(FFTContext *s, FFTComplex *z); |
21 | int fft_init_global(void); | 42 | int fft_init_global(void); |
22 | 43 | ||
diff --git a/apps/codecs/libwma/mdct.c b/apps/codecs/libwma/mdct.c index 838bda47a7..e66be0e825 100644 --- a/apps/codecs/libwma/mdct.c +++ b/apps/codecs/libwma/mdct.c | |||
@@ -17,10 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <codecs/lib/codeclib.h> | ||
21 | #include "wmadec.h" | ||
22 | #include "wmafixed.h" | 20 | #include "wmafixed.h" |
23 | #include "fft.h" | 21 | #include "mdct.h" |
24 | 22 | ||
25 | fixed32 tcos0[1024], tsin0[1024]; //these are the sin and cos rotations used by the MDCT | 23 | fixed32 tcos0[1024], tsin0[1024]; //these are the sin and cos rotations used by the MDCT |
26 | uint16_t revtab0[1024]; | 24 | uint16_t revtab0[1024]; |
diff --git a/apps/codecs/libwma/mdct.h b/apps/codecs/libwma/mdct.h index bfa279b199..67f510164b 100644 --- a/apps/codecs/libwma/mdct.h +++ b/apps/codecs/libwma/mdct.h | |||
@@ -17,6 +17,18 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | //#include "types.h" | ||
21 | #include "fft.h" | ||
22 | |||
23 | typedef struct MDCTContext | ||
24 | { | ||
25 | int n; /* size of MDCT (i.e. number of input data * 2) */ | ||
26 | int nbits; /* n = 2^nbits */ | ||
27 | /* pre/post rotation tables */ | ||
28 | FFTContext fft; | ||
29 | } | ||
30 | MDCTContext; | ||
31 | |||
20 | int ff_mdct_init(MDCTContext *s, int nbits, int inverse); | 32 | int ff_mdct_init(MDCTContext *s, int nbits, int inverse); |
21 | void ff_imdct_calc(MDCTContext *s, fixed32 *output, fixed32 *input); | 33 | void ff_imdct_calc(MDCTContext *s, fixed32 *output, fixed32 *input); |
22 | int mdct_init_global(void); | 34 | int mdct_init_global(void); |
diff --git a/apps/codecs/libwma/types.h b/apps/codecs/libwma/types.h index e69de29bb2..8a5e2a992e 100644 --- a/apps/codecs/libwma/types.h +++ b/apps/codecs/libwma/types.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #include <codecs/lib/codeclib.h> | ||
2 | |||
3 | #define fixed32 int32_t | ||
4 | #define fixed64 int64_t | ||
5 | |||
diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h index 1d5a67d8a9..f7434ed759 100644 --- a/apps/codecs/libwma/wmadec.h +++ b/apps/codecs/libwma/wmadec.h | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include "asf.h" | 23 | #include "asf.h" |
24 | #include "bitstream.h" /* For GetBitContext */ | 24 | #include "bitstream.h" /* For GetBitContext */ |
25 | #include "types.h" | ||
26 | #include "mdct.h" | ||
25 | //#include "dsputil.h" /* For MDCTContext */ | 27 | //#include "dsputil.h" /* For MDCTContext */ |
26 | 28 | ||
27 | 29 | ||
@@ -52,39 +54,6 @@ | |||
52 | 54 | ||
53 | #define LSP_POW_BITS 7 | 55 | #define LSP_POW_BITS 7 |
54 | 56 | ||
55 | #define fixed32 int32_t | ||
56 | #define fixed64 int64_t | ||
57 | |||
58 | typedef fixed32 FFTSample; | ||
59 | |||
60 | typedef struct FFTComplex | ||
61 | { | ||
62 | fixed32 re, im; | ||
63 | } | ||
64 | FFTComplex; | ||
65 | |||
66 | typedef struct FFTContext | ||
67 | { | ||
68 | int nbits; | ||
69 | int inverse; | ||
70 | uint16_t *revtab; | ||
71 | FFTComplex *exptab; | ||
72 | FFTComplex *exptab1; /* only used by SSE code */ | ||
73 | int (*fft_calc)(struct FFTContext *s, FFTComplex *z); | ||
74 | } | ||
75 | FFTContext; | ||
76 | |||
77 | typedef struct MDCTContext | ||
78 | { | ||
79 | int n; /* size of MDCT (i.e. number of input data * 2) */ | ||
80 | int nbits; /* n = 2^nbits */ | ||
81 | /* pre/post rotation tables */ | ||
82 | fixed32 *tcos; | ||
83 | fixed32 *tsin; | ||
84 | FFTContext fft; | ||
85 | } | ||
86 | MDCTContext; | ||
87 | |||
88 | typedef struct WMADecodeContext | 57 | typedef struct WMADecodeContext |
89 | { | 58 | { |
90 | GetBitContext gb; | 59 | GetBitContext gb; |
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 8523beafbf..8b4c698ebc 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "wmadec.h" | 28 | #include "wmadec.h" |
29 | #include "wmafixed.h" | 29 | #include "wmafixed.h" |
30 | #include "bitstream.h" | 30 | #include "bitstream.h" |
31 | #include "mdct.h" | ||
32 | 31 | ||
33 | 32 | ||
34 | #define VLCBITS 7 /*7 is the lowest without glitching*/ | 33 | #define VLCBITS 7 /*7 is the lowest without glitching*/ |
diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h index 8db1014a52..32386dc9bd 100644 --- a/apps/codecs/libwma/wmafixed.h +++ b/apps/codecs/libwma/wmafixed.h | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "types.h" | ||
10 | 11 | ||
11 | #define PRECISION 16 | 12 | #define PRECISION 16 |
12 | #define PRECISION64 16 | 13 | #define PRECISION64 16 |