audio_coding: Replaced macro WEBRTC_SPL_RSHIFT_W16 with >>
Replaced trivial shift macro with >>. The actual implementation of the macro is simply >>. Affected codecs: * ilbc * isac/fix BUG=3348,3353 TESTED=locally on linux and trybots R=henrik.lundin@webrtc.org, kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/23889004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7396 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -100,7 +100,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */
|
||||
enh_buf+ENH_BUFL-inLen, /* Input samples */
|
||||
(int16_t)(inLen+ENH_BUFL_FILTEROVERHEAD),
|
||||
downsampled,
|
||||
(int16_t)WEBRTC_SPL_RSHIFT_W16(inLen, 1),
|
||||
(int16_t)(inLen / 2),
|
||||
(int16_t*)WebRtcIlbcfix_kLpFiltCoefs, /* Coefficients in Q12 */
|
||||
FILTERORDER_DS_PLUS1, /* Length of filter (order-1) */
|
||||
FACTOR_DS,
|
||||
@ -292,7 +292,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */
|
||||
|
||||
/* Calculate increase parameter for window part (16 last samples) */
|
||||
/* (1-2*SqrtEnChange)/16 in Q15 */
|
||||
inc=(2048-WEBRTC_SPL_RSHIFT_W16(SqrtEnChange, 3));
|
||||
inc = 2048 - (SqrtEnChange >> 3);
|
||||
|
||||
win=0;
|
||||
tmpW16ptr=&plc_pred[plc_blockl-16];
|
||||
|
||||
@ -41,7 +41,7 @@ void WebRtcIlbcfix_GetCbVec(
|
||||
base_size=lMem-cbveclen+1;
|
||||
|
||||
if (cbveclen==SUBL) {
|
||||
base_size+=WEBRTC_SPL_RSHIFT_W16(cbveclen,1);
|
||||
base_size += cbveclen / 2;
|
||||
}
|
||||
|
||||
/* No filter -> First codebook section */
|
||||
@ -60,7 +60,7 @@ void WebRtcIlbcfix_GetCbVec(
|
||||
|
||||
k=(int16_t)WEBRTC_SPL_MUL_16_16(2, (index-(lMem-cbveclen+1)))+cbveclen;
|
||||
|
||||
lag=WEBRTC_SPL_RSHIFT_W16(k, 1);
|
||||
lag = k / 2;
|
||||
|
||||
WebRtcIlbcfix_CreateAugmentedVec(lag, mem+lMem, cbvec);
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ void WebRtcIlbcfix_Lsf2Lsp(
|
||||
Lower 8 bits give the difference, which needs
|
||||
to be approximated linearly
|
||||
*/
|
||||
k = WEBRTC_SPL_RSHIFT_W16(freq, 8);
|
||||
k = freq >> 8;
|
||||
diff = (freq&0x00ff);
|
||||
|
||||
/* Guard against getting outside table */
|
||||
|
||||
@ -91,7 +91,7 @@ void WebRtcIlbcfix_Poly2Lsp(
|
||||
/* Run 4 times to reduce the interval */
|
||||
for (i = 0; i < 4; i++) {
|
||||
/* xmid =(xlow + xhigh)/2 */
|
||||
xmid = WEBRTC_SPL_RSHIFT_W16(xlow, 1) + WEBRTC_SPL_RSHIFT_W16(xhigh, 1);
|
||||
xmid = (xlow >> 1) + (xhigh >> 1);
|
||||
ymid = WebRtcIlbcfix_Chebyshev(xmid, f[fi_select]);
|
||||
|
||||
if (WEBRTC_SPL_MUL_16_16(ylow, ymid) <= 0) {
|
||||
|
||||
@ -53,7 +53,7 @@ void WebRtcIlbcfix_Refiner(
|
||||
|
||||
/* defining array bounds */
|
||||
|
||||
estSegPosRounded=WEBRTC_SPL_RSHIFT_W16((estSegPos - 2),2);
|
||||
estSegPosRounded = (estSegPos - 2) >> 2;
|
||||
|
||||
searchSegStartPos=estSegPosRounded-ENH_SLOP;
|
||||
|
||||
@ -103,7 +103,7 @@ void WebRtcIlbcfix_Refiner(
|
||||
bounds */
|
||||
*updStartPos = (int16_t)WEBRTC_SPL_MUL_16_16(searchSegStartPos,4) + tloc + 4;
|
||||
|
||||
tloc2 = WEBRTC_SPL_RSHIFT_W16((tloc+3), 2);
|
||||
tloc2 = (tloc + 3) >> 2;
|
||||
|
||||
st=searchSegStartPos+tloc2-ENH_FL0;
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ int32_t WebRtcIlbcfix_Smooth_odata(
|
||||
|
||||
errs=0;
|
||||
for(i=0;i<80;i++) {
|
||||
err=(int16_t)WEBRTC_SPL_RSHIFT_W16((psseq[i]-odata[i]), 3);
|
||||
err = (psseq[i] - odata[i]) >> 3;
|
||||
errs+=WEBRTC_SPL_MUL_16_16(err, err); /* errs in Q-6 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user