Chromium Code Reviews| 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 e890c806cbac26fb330920c95815f28dbc8f83b7..27cc2eca3fa33e22b0e9c8cbac6eaaf6ebade0bf 100644 |
| --- a/webrtc/common_audio/signal_processing/levinson_durbin.c |
| +++ b/webrtc/common_audio/signal_processing/levinson_durbin.c |
| @@ -51,8 +51,7 @@ int16_t WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K, |
| // K = A[1] = -R[1] / R[0] |
| - temp2W32 = WEBRTC_SPL_LSHIFT_W32((int32_t)R_hi[1],16) |
| - + WEBRTC_SPL_LSHIFT_W32((int32_t)R_low[1],1); // R[1] in Q31 |
|
ivoc
2016/12/14 09:10:44
This code is putting the upper and lower bits toge
|
| + temp2W32 = (R[1] * (1 << norm)); // R[1] in Q31 |
|
hlundin-webrtc
2016/12/14 08:24:05
You can drop the outer parentheses.
hlundin-webrtc
2016/12/14 08:24:05
Since the code at line 49 is quite obscure, did yo
ivoc
2016/12/14 09:10:44
I verified that it gives exactly the same values.
|
| temp3W32 = WEBRTC_SPL_ABS_W32(temp2W32); // abs R[1] |
| temp1W32 = WebRtcSpl_DivW32HiLow(temp3W32, R_hi[0], R_low[0]); // abs(R[1])/R[0] in Q31 |
| // Put back the sign on R[1] |