From 23a7219a101e131b74b0a2fd06352c353088338e Mon Sep 17 00:00:00 2001 From: markun Date: Mon, 1 Oct 2007 13:46:07 +0000 Subject: [PATCH] move structures around in the header files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14941 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwma/fft.c | 3 ++- apps/codecs/libwma/fft.h | 21 +++++++++++++++++++++ apps/codecs/libwma/mdct.c | 4 +--- apps/codecs/libwma/mdct.h | 12 ++++++++++++ apps/codecs/libwma/types.h | 5 +++++ apps/codecs/libwma/wmadec.h | 35 ++--------------------------------- apps/codecs/libwma/wmadeci.c | 1 - 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 e934e3c1c..f19dac0ae 100644 --- a/apps/codecs/libwma/fft.c +++ b/apps/codecs/libwma/fft.c @@ -17,7 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "wmadec.h" +//#include "types.h" +#include "fft.h" #include "wmafixed.h" FFTComplex exptab0[512] IBSS_ATTR; diff --git a/apps/codecs/libwma/fft.h b/apps/codecs/libwma/fft.h index 2342140ef..f3aaf2fcc 100644 --- a/apps/codecs/libwma/fft.h +++ b/apps/codecs/libwma/fft.h @@ -17,6 +17,27 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "types.h" + +typedef fixed32 FFTSample; + +typedef struct FFTComplex +{ + fixed32 re, im; +} +FFTComplex; + +typedef struct FFTContext +{ + int nbits; + int inverse; + uint16_t *revtab; + FFTComplex *exptab; + FFTComplex *exptab1; /* only used by SSE code */ + int (*fft_calc)(struct FFTContext *s, FFTComplex *z); +} +FFTContext; + int fft_calc_unscaled(FFTContext *s, FFTComplex *z); int fft_init_global(void); diff --git a/apps/codecs/libwma/mdct.c b/apps/codecs/libwma/mdct.c index 838bda47a..e66be0e82 100644 --- a/apps/codecs/libwma/mdct.c +++ b/apps/codecs/libwma/mdct.c @@ -17,10 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include "wmadec.h" #include "wmafixed.h" -#include "fft.h" +#include "mdct.h" fixed32 tcos0[1024], tsin0[1024]; //these are the sin and cos rotations used by the MDCT uint16_t revtab0[1024]; diff --git a/apps/codecs/libwma/mdct.h b/apps/codecs/libwma/mdct.h index bfa279b19..67f510164 100644 --- a/apps/codecs/libwma/mdct.h +++ b/apps/codecs/libwma/mdct.h @@ -17,6 +17,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +//#include "types.h" +#include "fft.h" + +typedef struct MDCTContext +{ + int n; /* size of MDCT (i.e. number of input data * 2) */ + int nbits; /* n = 2^nbits */ + /* pre/post rotation tables */ + FFTContext fft; +} +MDCTContext; + int ff_mdct_init(MDCTContext *s, int nbits, int inverse); void ff_imdct_calc(MDCTContext *s, fixed32 *output, fixed32 *input); int mdct_init_global(void); diff --git a/apps/codecs/libwma/types.h b/apps/codecs/libwma/types.h index e69de29bb..8a5e2a992 100644 --- a/apps/codecs/libwma/types.h +++ b/apps/codecs/libwma/types.h @@ -0,0 +1,5 @@ +#include + +#define fixed32 int32_t +#define fixed64 int64_t + diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h index 1d5a67d8a..f7434ed75 100644 --- a/apps/codecs/libwma/wmadec.h +++ b/apps/codecs/libwma/wmadec.h @@ -22,6 +22,8 @@ #include "asf.h" #include "bitstream.h" /* For GetBitContext */ +#include "types.h" +#include "mdct.h" //#include "dsputil.h" /* For MDCTContext */ @@ -52,39 +54,6 @@ #define LSP_POW_BITS 7 -#define fixed32 int32_t -#define fixed64 int64_t - -typedef fixed32 FFTSample; - -typedef struct FFTComplex -{ - fixed32 re, im; -} -FFTComplex; - -typedef struct FFTContext -{ - int nbits; - int inverse; - uint16_t *revtab; - FFTComplex *exptab; - FFTComplex *exptab1; /* only used by SSE code */ - int (*fft_calc)(struct FFTContext *s, FFTComplex *z); -} -FFTContext; - -typedef struct MDCTContext -{ - int n; /* size of MDCT (i.e. number of input data * 2) */ - int nbits; /* n = 2^nbits */ - /* pre/post rotation tables */ - fixed32 *tcos; - fixed32 *tsin; - FFTContext fft; -} -MDCTContext; - typedef struct WMADecodeContext { GetBitContext gb; diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 8523beafb..8b4c698eb 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -28,7 +28,6 @@ #include "wmadec.h" #include "wmafixed.h" #include "bitstream.h" -#include "mdct.h" #define VLCBITS 7 /*7 is the lowest without glitching*/ diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h index 8db1014a5..32386dc9b 100644 --- a/apps/codecs/libwma/wmafixed.h +++ b/apps/codecs/libwma/wmafixed.h @@ -7,6 +7,7 @@ */ +#include "types.h" #define PRECISION 16 #define PRECISION64 16 -- 2.11.4.GIT