summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2007-10-01 13:46:07 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2007-10-01 13:46:07 +0000
commitb8753ffdaa141740e42d8c57d6f0c1aca5e6a8de (patch)
treed912174b68dda4378addd1c4aeb733a86e97af4b
parent6b559b21886d4da8b59bb4fe11dddb2835f31180 (diff)
downloadrockbox-b8753ffdaa141740e42d8c57d6f0c1aca5e6a8de.tar.gz
rockbox-b8753ffdaa141740e42d8c57d6f0c1aca5e6a8de.zip
move structures around in the header files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14941 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libwma/fft.c3
-rw-r--r--apps/codecs/libwma/fft.h21
-rw-r--r--apps/codecs/libwma/mdct.c4
-rw-r--r--apps/codecs/libwma/mdct.h12
-rw-r--r--apps/codecs/libwma/types.h5
-rw-r--r--apps/codecs/libwma/wmadec.h35
-rw-r--r--apps/codecs/libwma/wmadeci.c1
-rw-r--r--apps/codecs/libwma/wmafixed.h1
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
23FFTComplex exptab0[512] IBSS_ATTR; 24FFTComplex 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
22typedef fixed32 FFTSample;
23
24typedef struct FFTComplex
25{
26 fixed32 re, im;
27}
28FFTComplex;
29
30typedef 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}
39FFTContext;
40
20int fft_calc_unscaled(FFTContext *s, FFTComplex *z); 41int fft_calc_unscaled(FFTContext *s, FFTComplex *z);
21int fft_init_global(void); 42int 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
25fixed32 tcos0[1024], tsin0[1024]; //these are the sin and cos rotations used by the MDCT 23fixed32 tcos0[1024], tsin0[1024]; //these are the sin and cos rotations used by the MDCT
26uint16_t revtab0[1024]; 24uint16_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
23typedef 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}
30MDCTContext;
31
20int ff_mdct_init(MDCTContext *s, int nbits, int inverse); 32int ff_mdct_init(MDCTContext *s, int nbits, int inverse);
21void ff_imdct_calc(MDCTContext *s, fixed32 *output, fixed32 *input); 33void ff_imdct_calc(MDCTContext *s, fixed32 *output, fixed32 *input);
22int mdct_init_global(void); 34int 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
58typedef fixed32 FFTSample;
59
60typedef struct FFTComplex
61{
62 fixed32 re, im;
63}
64FFTComplex;
65
66typedef 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}
75FFTContext;
76
77typedef 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}
86MDCTContext;
87
88typedef struct WMADecodeContext 57typedef 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