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

Unified Diff: webrtc/modules/audio_coding/codecs/g722/g722_decode.c

Issue 2439353003: Eliminate left shift of negative value by using multiplication instead (Closed)
Patch Set: Created 4 years, 2 months 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/modules/audio_coding/codecs/g722/g722_decode.c
diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
index 4ebdb583644443c0752910aadf14ab377cf11cdf..71646c5f84f10877acfa1338ed6bc6dc1bdb2269 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)
« 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