Index: apps/codecs/lib/codeclib.h =================================================================== --- apps/codecs/lib/codeclib.h (revision 24686) +++ apps/codecs/lib/codeclib.h (working copy) @@ -68,11 +68,11 @@ extern void mdct_backward(int n, int32_t *in, int32_t *out); /* -2- ffmpeg fft-based mdct */ extern int ff_mdct_init(MDCTContext *s, int nbits, int inverse); -extern void ff_imdct_half(MDCTContext *s, int32_t *output, const int32_t *input); -extern void ff_imdct_calc(MDCTContext *s, int32_t *output, const int32_t *input); +extern void ff_imdct_half(int nbits, int32_t *output, const int32_t *input); +extern void ff_imdct_calc(int nbits, int32_t *output, const int32_t *input); /*ffmpeg fft (can be used without mdct)*/ extern void ff_fft_calc_c(int nbits, FFTComplex *z); -extern int ff_fft_init(void *s, int nbits, int inverse); +//extern int ff_fft_init(void *s, int nbits, int inverse); #if defined(CPU_ARM) && (ARM_ARCH == 4) /* optimised unsigned integer division for ARMv4, in IRAM */ Index: apps/codecs/lib/mdct.c =================================================================== --- apps/codecs/lib/mdct.c (revision 24686) +++ apps/codecs/lib/mdct.c (working copy) @@ -56,12 +56,12 @@ * NOTE - CANNOT CURRENTLY OPERATE IN PLACE (input and output must * not overlap or intersect at all) */ -void ff_imdct_half(MDCTContext *s, fixed32 *output, const fixed32 *input) +void ff_imdct_half(int nbits, fixed32 *output, const fixed32 *input) { int n8, n4, n2, n, j; const fixed32 *in1, *in2; - n = 1 << s->nbits; + n = 1 << nbits; n2 = n >> 1; n4 = n >> 2; @@ -74,8 +74,8 @@ in2 = input + n2 - 1; /* revtab comes from the fft; revtab table is sized for N=4096 size fft = 2^12. - The fft is size N/4 so s->nbits-2, so our shift needs to be (12-(nbits-2)) */ - const int revtab_shift = (14- s->nbits); + The fft is size N/4 so nbits-2, so our shift needs to be (12-(nbits-2)) */ + const int revtab_shift = (14- nbits); /* bitreverse reorder the input and rotate; result here is in OUTPUT ... */ /* (note that when using the current split radix, the bitreverse ordering is @@ -93,7 +93,7 @@ an mdct-local set of twiddles to do that part) */ const int32_t *T = sincos_lookup0; - const int step = 2<<(12-s->nbits); + const int step = 2<<(12-nbits); const uint16_t * p_revtab=revtab; { const uint16_t * const p_revtab_end = p_revtab + n8; @@ -134,10 +134,10 @@ /* ... and so fft runs in OUTPUT buffer */ - ff_fft_calc_c(s->nbits-2, z); + ff_fft_calc_c(nbits-2, z); /* post rotation + reordering. now keeps the result within the OUTPUT buffer */ - switch( s->nbits ) + switch( nbits ) { default: { @@ -266,9 +266,9 @@ * <-----------output-----------> * */ -void ff_imdct_calc(MDCTContext *s, fixed32 *output, const fixed32 *input) +void ff_imdct_calc(int nbits, fixed32 *output, const fixed32 *input) { - const int n = (1<nbits); + const int n = (1<>1); const int n4 = (n>>2); Index: apps/codecs/lib/mdct.h =================================================================== --- apps/codecs/lib/mdct.h (revision 24680) +++ apps/codecs/lib/mdct.h (working copy) @@ -35,8 +35,8 @@ MDCTContext; int ff_mdct_init(MDCTContext *s, int nbits, int inverse); -void ff_imdct_calc(MDCTContext *s, fixed32 *output, const fixed32 *input); -void ff_imdct_half(MDCTContext *s, fixed32 *output, const fixed32 *input); +void ff_imdct_calc(int nbits, fixed32 *output, const fixed32 *input); +void ff_imdct_half(int nbits, fixed32 *output, const fixed32 *input); #ifdef CPU_ARM Index: apps/codecs/libwma/wmadeci.c =================================================================== --- apps/codecs/libwma/wmadeci.c (revision 24680) +++ apps/codecs/libwma/wmadeci.c (working copy) @@ -1253,7 +1253,7 @@ mdct_backward( (1 << (s->block_len_bits+1)), (int32_t*)(*(s->coefs))[ch], (int32_t*)scratch_buffer); */ /*slower but more easily understood IMDCT from FFMPEG*/ - ff_imdct_calc(&s->mdct_ctx[bsize], + ff_imdct_calc(s->block_len_bits+1, (int32_t*)scratch_buffer, (*(s->coefs))[ch]);