diff options
Diffstat (limited to 'apps/codecs/libwmapro/wmapro_mdct.c')
-rw-r--r-- | apps/codecs/libwmapro/wmapro_mdct.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/codecs/libwmapro/wmapro_mdct.c b/apps/codecs/libwmapro/wmapro_mdct.c index 12cd8ce024..aaa95dccdf 100644 --- a/apps/codecs/libwmapro/wmapro_mdct.c +++ b/apps/codecs/libwmapro/wmapro_mdct.c | |||
@@ -5,10 +5,10 @@ | |||
5 | #include "../lib/fft.h" /* for FFT data structures */ | 5 | #include "../lib/fft.h" /* for FFT data structures */ |
6 | #include "codeclib.h" | 6 | #include "codeclib.h" |
7 | #include "../lib/codeclib_misc.h" /* for XNPROD31 */ | 7 | #include "../lib/codeclib_misc.h" /* for XNPROD31 */ |
8 | #include "wmapro_math.h" | ||
8 | 9 | ||
9 | void imdct_half(unsigned int nbits, int32_t *output, const int32_t *input){ | 10 | void imdct_half(unsigned int nbits, int32_t *output, const int32_t *input){ |
10 | int k, n8, n4, n2, n, j; | 11 | int k, n8, n4, n2, n, j; |
11 | //const uint16_t *revtab = s->revtab; | ||
12 | const int32_t *in1, *in2; | 12 | const int32_t *in1, *in2; |
13 | FFTComplex *z = (FFTComplex *)output; | 13 | FFTComplex *z = (FFTComplex *)output; |
14 | 14 | ||
@@ -23,10 +23,9 @@ void imdct_half(unsigned int nbits, int32_t *output, const int32_t *input){ | |||
23 | const int revtab_shift = (14- nbits); | 23 | const int revtab_shift = (14- nbits); |
24 | in1 = input; | 24 | in1 = input; |
25 | in2 = input + n2 - 1; | 25 | in2 = input + n2 - 1; |
26 | int step = 2<<(12-nbits); | ||
27 | for(k = 0; k < n4; k++) { | 26 | for(k = 0; k < n4; k++) { |
28 | j=revtab[k]>>revtab_shift; | 27 | j=revtab[k]>>revtab_shift; |
29 | XNPROD31(*in2, *in1, T[1]<<16, T[0]<<16, &z[j].re, &z[j].im ); | 28 | XNPROD31(*in2<<2, *in1<<2, T[1]<<14, T[0]<<14, &z[j].re, &z[j].im ); |
30 | in1 += 2; | 29 | in1 += 2; |
31 | in2 -= 2; | 30 | in2 -= 2; |
32 | T += 2; | 31 | T += 2; |
@@ -39,8 +38,8 @@ void imdct_half(unsigned int nbits, int32_t *output, const int32_t *input){ | |||
39 | const int32_t *V = T; | 38 | const int32_t *V = T; |
40 | for(k = 0; k < n8; k++) { | 39 | for(k = 0; k < n8; k++) { |
41 | int32_t r0, i0, r1, i1; | 40 | int32_t r0, i0, r1, i1; |
42 | XNPROD31(z[n8-k-1].im, z[n8-k-1].re, T[0]<<16, T[1]<<16, &r0, &i1 ); | 41 | XNPROD31(z[n8-k-1].im, z[n8-k-1].re, T[0]<<8, T[1]<<8, &r0, &i1 ); |
43 | XNPROD31(z[n8+k ].im, z[n8+k ].re, V[0]<<16, V[1]<<16, &r1, &i0 ); | 42 | XNPROD31(z[n8+k ].im, z[n8+k ].re, V[0]<<8, V[1]<<8, &r1, &i0 ); |
44 | z[n8-k-1].re = r0; | 43 | z[n8-k-1].re = r0; |
45 | z[n8-k-1].im = i0; | 44 | z[n8-k-1].im = i0; |
46 | z[n8+k ].re = r1; | 45 | z[n8+k ].re = r1; |