ref: 027a202151ecddadfea7c772060fa1cd4fd3fbff
parent: cacb5661b36ed8d7497a32e611fa43df916e3426
author: Jean-Marc Valin <[email protected]>
date: Sat Dec 1 17:00:53 EST 2012
More comments in the PLC
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -507,11 +507,14 @@
attenuation = MULT16_16_Q15(attenuation, decay);
}
e[i] = SHL32(EXTEND32(MULT16_16_Q15(attenuation, exc[offset+i])), SIG_SHIFT);
+ /* Compute the energy of the previously decoded signal whose
+ excitation we're copying */
tmp = ROUND16(out_mem[c][-N+offset+i],SIG_SHIFT);
S1 += SHR32(MULT16_16(tmp,tmp),8);
}
- /* Last samples correctly decoded so we can have a continuous signal */
+ /* Copy the last decoded samples (prior to the overlap region) to
+ synthesis filter memory so we can have a continuous signal. */
for (i=0;i<LPC_ORDER;i++)
mem[i] = ROUND16(out_mem[c][MAX_PERIOD-N-1-i], SIG_SHIFT);
/* Apply the fading if not the first loss */