Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: webrtc/common_audio/signal_processing/levinson_durbin.c

Issue 2569193002: Fix for left shift of negative value in NetEq. (Closed)
Patch Set: Removed parenthesis Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2983c56dd61f8f44f92c622601c3c3876ec69ba8 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
+ temp2W32 = R[1] * (1 << norm); // R[1] in Q31
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]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698