shithub: opus

Download patch

ref: 4a7c9859cbea913e2d024d523cc10f2bd955d540
parent: 1e0805d74f440adbf5829c8a8179fc30a24c5746
author: Gregory Maxwell <[email protected]>
date: Mon Oct 3 10:04:32 EDT 2011

Correct C99 undefined behavior in silk/NSQ.c, parallel change to 1ee139bc.

--- a/silk/NSQ.c
+++ b/silk/NSQ.c
@@ -292,7 +292,7 @@
 
         /* Flip sign depending on dither */
         r_Q10 = r_Q10 ^ dither;
-        r_Q10 = silk_LIMIT_32( r_Q10, -31 << 10, 30 << 10 );
+        r_Q10 = silk_LIMIT_32( r_Q10, -(31 << 10), 30 << 10 );
 
         /* Find two quantization level candidates and measure their rate-distortion */
         q1_Q10 = silk_SUB32( r_Q10, offset_Q10 );