Refactor audio_coding/ilbc: removes 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. Also removes unnecessary casts to int32_t from int16_t. BUG=3348,3353 TESTED=locally on linux and trybots R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/48519004 Cr-Commit-Position: refs/heads/master@{#8800} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8800 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -77,11 +77,11 @@ void WebRtcIlbcfix_HpInput(
|
||||
} else if (tmpW32<-268435456) {
|
||||
tmpW32 = WEBRTC_SPL_WORD32_MIN;
|
||||
} else {
|
||||
tmpW32 = WEBRTC_SPL_LSHIFT_W32(tmpW32, 3);
|
||||
tmpW32 <<= 3;
|
||||
}
|
||||
|
||||
y[0] = (int16_t)(tmpW32 >> 16);
|
||||
y[1] = (int16_t)((tmpW32 - WEBRTC_SPL_LSHIFT_W32((int32_t)y[0], 16))>>1);
|
||||
y[1] = (int16_t)((tmpW32 - (y[0] << 16)) >> 1);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user