Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t. This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects. This was be reviewed and approved in pieces: https://codereview.webrtc.org/1224093003 https://codereview.webrtc.org/1224123002 https://codereview.webrtc.org/1224163002 https://codereview.webrtc.org/1225133003 https://codereview.webrtc.org/1225173002 https://codereview.webrtc.org/1227163003 https://codereview.webrtc.org/1227203003 https://codereview.webrtc.org/1227213002 https://codereview.webrtc.org/1227893002 https://codereview.webrtc.org/1228793004 https://codereview.webrtc.org/1228803003 https://codereview.webrtc.org/1228823002 https://codereview.webrtc.org/1228823003 https://codereview.webrtc.org/1228843002 https://codereview.webrtc.org/1230693002 https://codereview.webrtc.org/1231713002 The change is being landed as TBR to all the folks who reviewed the above. BUG=chromium:81439 TEST=none R=andrew@webrtc.org, pbos@webrtc.org TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher Review URL: https://codereview.webrtc.org/1230503003 . Cr-Commit-Position: refs/heads/master@{#9768}
This commit is contained in:
@ -44,7 +44,7 @@ void WebRtcIlbcfix_DecodeImpl(
|
||||
int16_t mode /* (i) 0: bad packet, PLC,
|
||||
1: normal */
|
||||
) {
|
||||
int i;
|
||||
size_t i;
|
||||
int16_t order_plus_one;
|
||||
|
||||
int16_t last_bit;
|
||||
@ -106,7 +106,7 @@ void WebRtcIlbcfix_DecodeImpl(
|
||||
WebRtcIlbcfix_DoThePlc(
|
||||
PLCresidual, PLClpc, 0, decresidual,
|
||||
syntdenum + (LPC_FILTERORDER + 1) * (iLBCdec_inst->nsub - 1),
|
||||
(int16_t)(iLBCdec_inst->last_lag), iLBCdec_inst);
|
||||
iLBCdec_inst->last_lag, iLBCdec_inst);
|
||||
|
||||
/* Use the output from doThePLC */
|
||||
WEBRTC_SPL_MEMCPY_W16(decresidual, PLCresidual, iLBCdec_inst->blockl);
|
||||
@ -122,7 +122,7 @@ void WebRtcIlbcfix_DecodeImpl(
|
||||
/* packet loss conceal */
|
||||
|
||||
WebRtcIlbcfix_DoThePlc(PLCresidual, PLClpc, 1, decresidual, syntdenum,
|
||||
(int16_t)(iLBCdec_inst->last_lag), iLBCdec_inst);
|
||||
iLBCdec_inst->last_lag, iLBCdec_inst);
|
||||
|
||||
WEBRTC_SPL_MEMCPY_W16(decresidual, PLCresidual, iLBCdec_inst->blockl);
|
||||
|
||||
@ -188,18 +188,18 @@ void WebRtcIlbcfix_DecodeImpl(
|
||||
WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->syntMem, &data[iLBCdec_inst->blockl-LPC_FILTERORDER], LPC_FILTERORDER);
|
||||
|
||||
} else { /* Enhancer not activated */
|
||||
int16_t lag;
|
||||
size_t lag;
|
||||
|
||||
/* Find last lag (since the enhancer is not called to give this info) */
|
||||
lag = 20;
|
||||
if (iLBCdec_inst->mode==20) {
|
||||
lag = (int16_t)WebRtcIlbcfix_XcorrCoef(
|
||||
lag = WebRtcIlbcfix_XcorrCoef(
|
||||
&decresidual[iLBCdec_inst->blockl-60],
|
||||
&decresidual[iLBCdec_inst->blockl-60-lag],
|
||||
60,
|
||||
80, lag, -1);
|
||||
} else {
|
||||
lag = (int16_t)WebRtcIlbcfix_XcorrCoef(
|
||||
lag = WebRtcIlbcfix_XcorrCoef(
|
||||
&decresidual[iLBCdec_inst->blockl-ENH_BLOCKL],
|
||||
&decresidual[iLBCdec_inst->blockl-ENH_BLOCKL-lag],
|
||||
ENH_BLOCKL,
|
||||
|
||||
Reference in New Issue
Block a user