Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-25 00:48:40 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-25 04:35:24 +0300
commit52ded42ad9da32119c86e836ed603fe5c3d29f9f (patch)
tree73c75d6b8d852e630d1c1c8c095303e8474fd0bf
parent1a37d4e15ccb189373dac9fb7b3d3e028051b121 (diff)
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.
-rw-r--r--celt/celt_decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c
index 0d9364d8..8a3b3485 100644
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -636,7 +636,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
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 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
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