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:
@ -151,7 +151,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */
|
||||
corr16[i] = (int16_t)WEBRTC_SPL_SHIFT_W32(corrmax[i], corrSh);
|
||||
corr16[i] = (int16_t)((corr16[i] * corr16[i]) >> 16);
|
||||
en16[i] = (int16_t)WEBRTC_SPL_SHIFT_W32(ener, enerSh);
|
||||
totsh[i] = enerSh - WEBRTC_SPL_LSHIFT_W32(corrSh, 1);
|
||||
totsh[i] = enerSh - (corrSh << 1);
|
||||
}
|
||||
|
||||
/* Compare lagmax[0..3] for the (corr^2)/ener criteria */
|
||||
@ -278,8 +278,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */
|
||||
(int16_t)tmp1);
|
||||
|
||||
/* Calculate the Sqrt of the energy in Q15 ((14+16)/2) */
|
||||
SqrtEnChange = (int16_t)WebRtcSpl_SqrtFloor(
|
||||
WEBRTC_SPL_LSHIFT_W32((int32_t)EnChange, 14));
|
||||
SqrtEnChange = (int16_t)WebRtcSpl_SqrtFloor(EnChange << 14);
|
||||
|
||||
|
||||
/* Multiply first part of vector with 2*SqrtEnChange */
|
||||
|
Reference in New Issue
Block a user