From 027a202151ecddadfea7c772060fa1cd4fd3fbff Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jmvalin@jmvalin.ca> Date: Sat, 1 Dec 2012 22:00:53 -0500 Subject: [PATCH] More comments in the PLC --- celt/celt_decoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c index 78d5f2144..79e4df715 100644 --- a/celt/celt_decoder.c +++ b/celt/celt_decoder.c @@ -507,11 +507,14 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, opus_val16 * OPUS_R 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 */ -- GitLab