ref: d7231dd1a9268b8efdddf1eb39e12578815080e1
parent: bc4a0023698a32163b1661c893466efbf7ebaa17
author: Jean-Marc Valin <[email protected]>
date: Sat Nov 6 16:30:17 EDT 2010
Giving up on reusing the saved overlap in the PLC
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -1507,23 +1507,14 @@
previous and next frames */
for (i=0;i<overlap/2;i++)
{
- celt_word32 tmp1, tmp2;
- tmp1 = MULT16_32_Q15(st->mode->window[i ], e[i ]) -
- MULT16_32_Q15(st->mode->window[overlap-i-1], e[overlap-i-1]);
- tmp2 = MULT16_32_Q15(st->mode->window[i], e[N+overlap-1-i]) +
- MULT16_32_Q15(st->mode->window[overlap-i-1], e[N+i ]);
- out_mem[c][MAX_PERIOD+i] = MULT16_32_Q15(st->mode->window[overlap-i-1], tmp2);
- out_mem[c][MAX_PERIOD+overlap-i-1] = MULT16_32_Q15(st->mode->window[i], tmp2);
- out_mem[c][MAX_PERIOD-N+i] += MULT16_32_Q15(st->mode->window[i], tmp1);
- out_mem[c][MAX_PERIOD-N+overlap-i-1] -= MULT16_32_Q15(st->mode->window[overlap-i-1], tmp1);
+ celt_word32 tmp;
+ tmp = MULT16_32_Q15(st->mode->window[i], e[N+overlap-1-i]) +
+ MULT16_32_Q15(st->mode->window[overlap-i-1], e[N+i ]);
+ out_mem[c][MAX_PERIOD+i] = MULT16_32_Q15(st->mode->window[overlap-i-1], tmp);
+ out_mem[c][MAX_PERIOD+overlap-i-1] = MULT16_32_Q15(st->mode->window[i], tmp);
}
-#if 0
- for (i=0;i<N-overlap;i++)
- out_mem[c][MAX_PERIOD-N+overlap+i] = e[overlap+i];
-#else
for (i=0;i<N;i++)
out_mem[c][MAX_PERIOD-N+i] = e[i];
-#endif
#ifdef ENABLE_POSTFILTER
/* Apply pre-filter to the MDCT overlap for the next frame (post-filter will be applied then) */