Gets rid of a "safe" signed overflow in silk_noise_shape_quantizer_del_dec()
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 11 Oct 2011 22:00:23 +0000 (18:00 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 11 Oct 2011 22:00:23 +0000 (18:00 -0400)
silk/NSQ_del_dec.c

index 52295ca..b84f944 100644 (file)
@@ -588,7 +588,7 @@ static inline void silk_noise_shape_quantizer_del_dec(
             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;
         }