ref: 41880805ab61f3484a4147ff891111eca10ec8d5
parent: 30e1b4d36c432b5211e7be7d0066e91a846ce04d
author: Jean-Marc Valin <[email protected]>
date: Tue Apr 22 03:50:50 EDT 2008
non-negative mdct input index
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -161,7 +161,7 @@
N4 = (N-overlap)>>1;
if (C==1)
{
- mdct_forward(lookup, in-N4, out, window, overlap);
+ mdct_forward(lookup, in, out, window, overlap);
} else {
VARDECL(celt_word32_t, x);
VARDECL(celt_word32_t, tmp);
@@ -175,7 +175,7 @@
x[j+N4] = in[C*j+c];
CELT_MEMSET(x, 0, N4);
CELT_MEMSET(x+2*N-N4, 0, N4);
- mdct_forward(lookup, x, tmp, window, overlap);
+ mdct_forward(lookup, x+N4, tmp, window, overlap);
/* Interleaving the sub-frames */
for (j=0;j<N;j++)
out[C*j+c] = tmp[j];
--- a/libcelt/mdct.c
+++ b/libcelt/mdct.c
@@ -101,8 +101,8 @@
/* Shuffle, fold, pre-rotate (part 1) */
{
/* Temp pointers to make it really clear to the compiler what we're doing */
- const kiss_fft_scalar * restrict xp1 = in+N4;
- const kiss_fft_scalar * restrict xp2 = in+N2+N4-1;
+ const kiss_fft_scalar * restrict xp1 = in+overlap/2;
+ const kiss_fft_scalar * restrict xp2 = in+N2-1+overlap/2;
kiss_fft_scalar * restrict yp = out;
kiss_fft_scalar *t = &l->trig[0];
const celt_word16_t * restrict wp1 = window+overlap/2;