shithub: opus

Download patch

ref: a4885a5fd5165d4732929328de613a35a3d3b359
parent: 4541bbcc22c6289f3a2a70fda88a9aa372535b58
author: Jean-Marc Valin <[email protected]>
date: Tue Oct 11 14:00:23 EDT 2011

Gets rid of a "safe" signed overflow in silk_noise_shape_quantizer_del_dec()

--- a/silk/NSQ_del_dec.c
+++ b/silk/NSQ_del_dec.c
@@ -588,7 +588,7 @@
             psDD->Q_Q10[     *smpl_buf_idx ]         = psSS->Q_Q10;
             psDD->Pred_Q16[  *smpl_buf_idx ]         = psSS->LPC_exc_Q16;
             psDD->Shape_Q10[ *smpl_buf_idx ]         = psSS->sLTP_shp_Q10;
-            psDD->Seed                               = silk_ADD32( psDD->Seed, silk_RSHIFT_ROUND( psSS->Q_Q10, 10 ) );
+            psDD->Seed                               = silk_ADD32_ovflw( psDD->Seed, silk_RSHIFT_ROUND( psSS->Q_Q10, 10 ) );
             psDD->RandState[ *smpl_buf_idx ]         = psDD->Seed;
             psDD->RD_Q10                             = psSS->RD_Q10;
         }