diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-08-27 08:16:38 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-08-27 08:18:01 +0400 |
commit | f6c26e00005127bc6127618e8367fa815d755032 (patch) | |
tree | bff4c5bc692dd5a9f17f02c04917f97e79db4b5f /silk | |
parent | ad333d0dc490f284dea152c43234cf0a4860df61 (diff) |
Fixes an overflow in silk_log2lin() that was triggered only in debug mode
Diffstat (limited to 'silk')
-rw-r--r-- | silk/log2lin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/silk/log2lin.c b/silk/log2lin.c index b0026e64..33a19ad1 100644 --- a/silk/log2lin.c +++ b/silk/log2lin.c @@ -47,7 +47,7 @@ opus_int32 silk_log2lin( frac_Q7 = inLog_Q7 & 0x7F; if( inLog_Q7 < 2048 ) { /* Piece-wise parabolic approximation */ - out = silk_ADD_RSHIFT( out, silk_MUL( out, silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ), 7 ); + out = silk_ADD_RSHIFT32( out, silk_MUL( out, silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ), 7 ); } else { /* Piece-wise parabolic approximation */ out = silk_MLA( out, silk_RSHIFT( out, 7 ), silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ); |