Index: webrtc/common_audio/signal_processing/levinson_durbin.c |
diff --git a/webrtc/common_audio/signal_processing/levinson_durbin.c b/webrtc/common_audio/signal_processing/levinson_durbin.c |
index 2983c56dd61f8f44f92c622601c3c3876ec69ba8..61f3721977ccb2fc16def78694aef13c0cbd99b6 100644 |
--- a/webrtc/common_audio/signal_processing/levinson_durbin.c |
+++ b/webrtc/common_audio/signal_processing/levinson_durbin.c |
@@ -193,7 +193,7 @@ int16_t WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K, |
// Alpha = Alpha * (1-K^2) |
- temp1W32 = ((K_hi * K_low >> 14) + K_hi * K_hi) << 1; // K*K in Q31 |
+ temp1W32 = ((K_hi * K_low >> 14) + K_hi * K_hi) * 2; // K*K in Q31 |
ivoc
2017/01/09 16:52:35
When K_hi is negative and K_low is positive, ((K_h
kwiberg-webrtc
2017/01/09 17:51:36
Umm... I would've thought that K*K would always be
ivoc
2017/01/10 09:18:27
This is from the testcase that the fuzzer came up
kwiberg-webrtc
2017/01/10 10:08:01
Hmm. (a+b)^2 = a^2 + 2*a*b + b^2 should be nonzero
ivoc
2017/01/10 10:17:24
In the line below this one they guard against temp
hlundin-webrtc
2017/01/10 10:18:40
I say leave it like this.
kwiberg-webrtc
2017/01/10 10:32:58
Yes. (I'm not sure that leaving out the small term
|
temp1W32 = WEBRTC_SPL_ABS_W32(temp1W32); // Guard against <0 |
temp1W32 = (int32_t)0x7fffffffL - temp1W32; // 1 - K*K in Q31 |