Reland "Upconvert various types to int.", ilbc portion.

This reverts portions of commit cb180976dd0e9672cde4523d87b5f4857478b5e9, which
reverted commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24.  Specifically, the
files in webrtc/modules/audio_coding/codecs/ilbc/ are relanded.

The original commit message is below:

Upconvert various types to int.

Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
TBR=kwiberg

Review URL: https://codereview.webrtc.org/1184643002

Cr-Commit-Position: refs/heads/master@{#9423}
This commit is contained in:
Peter Kasting
2015-06-11 18:51:20 -07:00
parent aba07ef6d9
commit a8b335c709
18 changed files with 59 additions and 56 deletions

View File

@ -88,10 +88,10 @@ int16_t WebRtcIlbcfix_EncoderInit(IlbcEncoderInstance* iLBCenc_inst,
}
}
int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst,
const int16_t* speechIn,
int16_t len,
uint8_t* encoded) {
int WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst,
const int16_t* speechIn,
int16_t len,
uint8_t* encoded) {
int16_t pos = 0;
int16_t encpos = 0;
@ -141,11 +141,11 @@ int16_t WebRtcIlbcfix_Decoderinit30Ms(IlbcDecoderInstance *iLBCdec_inst) {
}
int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
int WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
{
int i=0;
/* Allow for automatic switching between the frame sizes
@ -194,11 +194,11 @@ int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
return(i*((IlbcDecoder*)iLBCdec_inst)->blockl);
}
int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
int WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
{
int i=0;
if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)||
@ -222,11 +222,11 @@ int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
return(i*((IlbcDecoder*)iLBCdec_inst)->blockl);
}
int16_t WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
int WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
const uint8_t* encoded,
int16_t len,
int16_t* decoded,
int16_t* speechType)
{
int i=0;
if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)||