summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 11:47:01 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 12:10:20 -0400
commita97fc436f114060791b77d5cdd684effe441d9d8 (patch)
tree665abec403ca99e5f403d49bd87361b080e4b796
parent88dc7cff870b81f6857a4e86647cae5c6ba1706e (diff)
downloadopus-a97fc436f114060791b77d5cdd684effe441d9d8.tar.gz
PLC overflow fix
-rw-r--r--celt/celt_decoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c
index 1d2aeaa0..fd744a2f 100644
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -660,6 +660,10 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
celt_iir(buf+DECODE_BUFFER_SIZE-N, lpc+c*LPC_ORDER,
buf+DECODE_BUFFER_SIZE-N, extrapolation_len, LPC_ORDER,
lpc_mem, st->arch);
+#ifdef FIXED_POINT
+ for (i=0; i < extrapolation_len; i++)
+ buf[DECODE_BUFFER_SIZE-N+i] = SATURATE(buf[DECODE_BUFFER_SIZE-N+i], SIG_SAT);
+#endif
}
/* Check if the synthesis energy is higher than expected, which can