From bc8074474d3da08ce00d44362a5ae0d772bbf3a2 Mon Sep 17 00:00:00 2001 From: kwiberg Date: Mon, 31 Oct 2016 02:26:10 -0700 Subject: [PATCH] Eliminate left shift of negative value by using multiplication instead NOPRESUBMIT=true BUG=chromium:653267 Review-Url: https://codereview.webrtc.org/2439353003 Cr-Commit-Position: refs/heads/master@{#14837} --- webrtc/modules/audio_coding/codecs/g722/g722_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c index 4ebdb58364..71646c5f84 100644 --- a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c +++ b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c @@ -77,7 +77,7 @@ static void block4(G722DecoderState *s, int band, int d) /* Block 4, UPPOL2 */ for (i = 0; i < 3; i++) s->band[band].sg[i] = s->band[band].p[i] >> 15; - wd1 = saturate(s->band[band].a[1] << 2); + wd1 = saturate(s->band[band].a[1] * 4); wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1; if (wd2 > 32767)