Index: webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c |
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c |
index 2379ba50661f2bac040ab2044ddc38a80be8b18a..c9ddf935801090e5959df3ee45bf38334011a4be 100644 |
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c |
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c |
@@ -392,13 +392,13 @@ static void GenerateDitherQ7(int16_t *bufQ7, |
seed = WEBRTC_SPL_UMUL(seed, 196314165) + 907633515; |
/* fixed-point dither sample between -64 and 64 (Q7) */ |
- dither1_Q7 = (int16_t)(((int32_t)seed + 16777216) >> 25); |
+ dither1_Q7 = (int16_t)(((int32_t)(seed + 16777216)) >> 25); |
/* new random unsigned int32_t */ |
seed = WEBRTC_SPL_UMUL(seed, 196314165) + 907633515; |
/* fixed-point dither sample between -64 and 64 */ |
- dither2_Q7 = (int16_t)((seed + 16777216) >> 25); |
+ dither2_Q7 = (int16_t)(((int32_t)(seed + 16777216)) >> 25); |
kwiberg-webrtc
2016/02/25 11:57:00
Here, I'm actually changing the behavior. The old
tlegrand-webrtc
2016/02/26 10:21:40
I think this changes should be fine.
|
shft = (int16_t)(WEBRTC_SPL_RSHIFT_U32(seed, 25) & 15); |
if (shft < 5) |
@@ -432,7 +432,7 @@ static void GenerateDitherQ7(int16_t *bufQ7, |
seed = WEBRTC_SPL_UMUL(seed, 196314165) + 907633515; |
/* fixed-point dither sample between -64 and 64 */ |
- dither1_Q7 = (int16_t)(((int32_t)seed + 16777216) >> 25); |
+ dither1_Q7 = (int16_t)(((int32_t)(seed + 16777216)) >> 25); |
/* dither sample is placed in either even or odd index */ |
shft = (int16_t)(WEBRTC_SPL_RSHIFT_U32(seed, 25) & 1); /* either 0 or 1 */ |