From bc4a0023698a32163b1661c893466efbf7ebaa17 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Sat, 6 Nov 2010 18:11:06 -0400 Subject: [PATCH] PLC fixes Fixed an off-by-one in the handling of the IIR filter memory and disabled "TDAC blending" at the beginning of a lost packet until it can be made to work properly. --- libcelt/celt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libcelt/celt.c b/libcelt/celt.c index fc581449..58d653fa 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -1433,6 +1433,8 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); } + for (i=0;imode->overlap;i++) e[i] = MULT16_32_Q15(fade, e[i]); iir(e, lpc+c*LPC_ORDER, e, len+st->mode->overlap, LPC_ORDER, mem); @@ -1515,8 +1517,13 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p 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); } +#if 0 for (i=0;i