From 6069032ebb9026bc22ae18d1c4b8e8315140a907 Mon Sep 17 00:00:00 2001 From: "bjornv@webrtc.org" Date: Fri, 20 Mar 2015 07:03:28 +0000 Subject: [PATCH] Refactor audio_coding/isac: removed usage of macro WEBRTC_SPL_LSHIFT_W32 The macro is defined as #define WEBRTC_SPL_LSHIFT_W32(a, b) ((a) << (b)) It is a trivial operation that need no macro. In fact it may be confusing for to the user, since it can be interpreted as having an implicit cast to int32_t. BUG=3348,3353 TESTED=locally on linux and trybots R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/44659004 Cr-Commit-Position: refs/heads/master@{#8801} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8801 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/codecs/isac/main/source/entropy_coding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c index c8d37e53d0..dd1d64af7b 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c @@ -128,7 +128,7 @@ static void FindInvArSpec(const int16_t* ARCoefQ12, sum >>= 15; CorrQ11[k] = (sum * tmpGain + round) >> shftVal; } - sum = WEBRTC_SPL_LSHIFT_W32(CorrQ11[0], 7); + sum = CorrQ11[0] << 7; for (n = 0; n < FRAMESAMPLES / 8; n++) { CurveQ16[n] = sum; } @@ -163,8 +163,8 @@ static void FindInvArSpec(const int16_t* ARCoefQ12, for (k = 0; k < FRAMESAMPLES / 8; k++) { CurveQ16[FRAMESAMPLES_QUARTER - 1 - k] = CurveQ16[k] - - WEBRTC_SPL_LSHIFT_W32(diffQ16[k], shftVal); - CurveQ16[k] += WEBRTC_SPL_LSHIFT_W32(diffQ16[k], shftVal); + (diffQ16[k] << shftVal); + CurveQ16[k] += diffQ16[k] << shftVal; } }