diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-09-23 21:08:04 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-09-23 21:08:04 +0400 |
commit | 1ee139bca076a1a3606a8a924a698d356d40cbb8 (patch) | |
tree | 84496f0f25c53b14e2791646466d276cf9185006 /silk/NSQ_del_dec.c | |
parent | 44ce46dc129f136c93da492299562c1f0fcd519d (diff) |
Making the left shift macros use unsigned to avoid undefined behaviour
Result should be bit-identical on most machines/compilers, minus the undefined
behaviour
Diffstat (limited to 'silk/NSQ_del_dec.c')
-rw-r--r-- | silk/NSQ_del_dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/silk/NSQ_del_dec.c b/silk/NSQ_del_dec.c index fa4fdcd5..140aa844 100644 --- a/silk/NSQ_del_dec.c +++ b/silk/NSQ_del_dec.c @@ -439,7 +439,7 @@ static inline void silk_noise_shape_quantizer_del_dec( /* 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 ); |