ref: 52ded42ad9da32119c86e836ed603fe5c3d29f9f
parent: 1a37d4e15ccb189373dac9fb7b3d3e028051b121
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Sun Jul 24 13:48:40 EDT 2016
More headroom in PLC code extrapolation_len can be up to 960+120, so we we need a shift of 10 if the values are very large.
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -636,7 +636,7 @@
tmp = ROUND16(
buf[DECODE_BUFFER_SIZE-MAX_PERIOD-N+extrapolation_offset+j],
SIG_SHIFT);
- S1 += SHR32(MULT16_16(tmp, tmp), 9);
+ S1 += SHR32(MULT16_16(tmp, tmp), 10);
}
#ifdef FIXED_POINT
/* For fixed-point, apply bandwidth expansion until we can guarantee that
@@ -680,7 +680,7 @@
for (i=0;i<extrapolation_len;i++)
{
opus_val16 tmp = ROUND16(buf[DECODE_BUFFER_SIZE-N+i], SIG_SHIFT);
- S2 += SHR32(MULT16_16(tmp, tmp), 9);
+ S2 += SHR32(MULT16_16(tmp, tmp), 10);
}
/* This checks for an "explosion" in the synthesis. */
#ifdef FIXED_POINT