ref: 646fcc33d7fee7fbca5a6ef82d0f6bd5233ff39f
parent: 3c60bae2d74b4b9898b5f4925d4a1fb464a3fa43
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Fri Jul 22 07:47:01 EDT 2016
PLC overflow fix
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -660,6 +660,10 @@
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