Reland "Upconvert various types to int.", misc. codecs portion.
This reverts portions of commit cb180976dd0e9672cde4523d87b5f4857478b5e9, which reverted commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24. Specifically, the files in webrtc/modules/audio_coding/codecs/ that are not in ilbc/ or isac/, as well as webrtc/modules/audio_coding/main/test/opus_test.cc, 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/1179093003 Cr-Commit-Position: refs/heads/master@{#9424}
This commit is contained in:
@ -64,11 +64,11 @@ int16_t WebRtcOpus_EncoderFree(OpusEncInst* inst);
|
||||
* Return value : >=0 - Length (in bytes) of coded data
|
||||
* -1 - Error
|
||||
*/
|
||||
int16_t WebRtcOpus_Encode(OpusEncInst* inst,
|
||||
const int16_t* audio_in,
|
||||
int16_t samples,
|
||||
int16_t length_encoded_buffer,
|
||||
uint8_t* encoded);
|
||||
int WebRtcOpus_Encode(OpusEncInst* inst,
|
||||
const int16_t* audio_in,
|
||||
int16_t samples,
|
||||
int16_t length_encoded_buffer,
|
||||
uint8_t* encoded);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcOpus_SetBitRate(...)
|
||||
@ -236,9 +236,9 @@ int16_t WebRtcOpus_DecoderInit(OpusDecInst* inst);
|
||||
* Return value : >0 - Samples per channel in decoded vector
|
||||
* -1 - Error
|
||||
*/
|
||||
int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
|
||||
int16_t encoded_bytes, int16_t* decoded,
|
||||
int16_t* audio_type);
|
||||
int WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
|
||||
int16_t encoded_bytes, int16_t* decoded,
|
||||
int16_t* audio_type);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcOpus_DecodePlc(...)
|
||||
@ -254,8 +254,8 @@ int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
|
||||
* Return value : >0 - number of samples in decoded PLC vector
|
||||
* -1 - Error
|
||||
*/
|
||||
int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
|
||||
int16_t number_of_lost_frames);
|
||||
int WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
|
||||
int number_of_lost_frames);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcOpus_DecodeFec(...)
|
||||
@ -275,9 +275,9 @@ int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
|
||||
* 0 - No FEC data in the packet
|
||||
* -1 - Error
|
||||
*/
|
||||
int16_t WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
|
||||
int16_t encoded_bytes, int16_t* decoded,
|
||||
int16_t* audio_type);
|
||||
int WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
|
||||
int16_t encoded_bytes, int16_t* decoded,
|
||||
int16_t* audio_type);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcOpus_DurationEst(...)
|
||||
|
||||
Reference in New Issue
Block a user