| Index: webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
|
| diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c b/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
|
| index 3ed776b5d3c3615d2e99e9870382d6482b6619e1..db78e6de2e351ab12b7b8c0a16c47e048e5d5118 100644
|
| --- a/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
|
| +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
|
| @@ -494,15 +494,15 @@ int16_t WebRtcIsac_EncoderInit(ISACStruct* ISAC_main_inst,
|
| * samples.
|
| * : -1 - Error
|
| */
|
| -int WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
|
| - const int16_t* speechIn,
|
| - uint8_t* encoded) {
|
| +int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
|
| + const int16_t* speechIn,
|
| + uint8_t* encoded) {
|
| float inFrame[FRAMESAMPLES_10ms];
|
| int16_t speechInLB[FRAMESAMPLES_10ms];
|
| int16_t speechInUB[FRAMESAMPLES_10ms];
|
| - int streamLenLB = 0;
|
| - int streamLenUB = 0;
|
| - int streamLen = 0;
|
| + int16_t streamLenLB = 0;
|
| + int16_t streamLenUB = 0;
|
| + int16_t streamLen = 0;
|
| int16_t k = 0;
|
| int garbageLen = 0;
|
| int32_t bottleneck = 0;
|
| @@ -601,8 +601,8 @@ int WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
|
|
|
| /* Tell to upper-band the number of bytes used so far.
|
| * This is for payload limitation. */
|
| - instUB->ISACencUB_obj.numBytesUsed =
|
| - (int16_t)(streamLenLB + 1 + LEN_CHECK_SUM_WORD8);
|
| + instUB->ISACencUB_obj.numBytesUsed = streamLenLB + 1 +
|
| + LEN_CHECK_SUM_WORD8;
|
| /* Encode upper-band. */
|
| switch (instISAC->bandwidthKHz) {
|
| case isac12kHz: {
|
| @@ -1045,12 +1045,12 @@ int16_t WebRtcIsac_UpdateBwEstimate(ISACStruct* ISAC_main_inst,
|
| return 0;
|
| }
|
|
|
| -static int Decode(ISACStruct* ISAC_main_inst,
|
| - const uint8_t* encoded,
|
| - int16_t lenEncodedBytes,
|
| - int16_t* decoded,
|
| - int16_t* speechType,
|
| - int16_t isRCUPayload) {
|
| +static int16_t Decode(ISACStruct* ISAC_main_inst,
|
| + const uint8_t* encoded,
|
| + int16_t lenEncodedBytes,
|
| + int16_t* decoded,
|
| + int16_t* speechType,
|
| + int16_t isRCUPayload) {
|
| /* Number of samples (480 or 960), output from decoder
|
| that were actually used in the encoder/decoder
|
| (determined on the fly). */
|
| @@ -1060,8 +1060,8 @@ static int Decode(ISACStruct* ISAC_main_inst,
|
| float outFrame[MAX_FRAMESAMPLES];
|
| int16_t outFrameLB[MAX_FRAMESAMPLES];
|
| int16_t outFrameUB[MAX_FRAMESAMPLES];
|
| - int numDecodedBytesLB;
|
| - int numDecodedBytesUB;
|
| + int16_t numDecodedBytesLB;
|
| + int16_t numDecodedBytesUB;
|
| int16_t lenEncodedLBBytes;
|
| int16_t validChecksum = 1;
|
| int16_t k;
|
| @@ -1350,11 +1350,11 @@ static int Decode(ISACStruct* ISAC_main_inst,
|
| * -1 - Error
|
| */
|
|
|
| -int WebRtcIsac_Decode(ISACStruct* ISAC_main_inst,
|
| - const uint8_t* encoded,
|
| - int16_t lenEncodedBytes,
|
| - int16_t* decoded,
|
| - int16_t* speechType) {
|
| +int16_t WebRtcIsac_Decode(ISACStruct* ISAC_main_inst,
|
| + const uint8_t* encoded,
|
| + int16_t lenEncodedBytes,
|
| + int16_t* decoded,
|
| + int16_t* speechType) {
|
| int16_t isRCUPayload = 0;
|
| return Decode(ISAC_main_inst, encoded, lenEncodedBytes, decoded,
|
| speechType, isRCUPayload);
|
| @@ -1382,11 +1382,11 @@ int WebRtcIsac_Decode(ISACStruct* ISAC_main_inst,
|
|
|
|
|
|
|
| -int WebRtcIsac_DecodeRcu(ISACStruct* ISAC_main_inst,
|
| - const uint8_t* encoded,
|
| - int16_t lenEncodedBytes,
|
| - int16_t* decoded,
|
| - int16_t* speechType) {
|
| +int16_t WebRtcIsac_DecodeRcu(ISACStruct* ISAC_main_inst,
|
| + const uint8_t* encoded,
|
| + int16_t lenEncodedBytes,
|
| + int16_t* decoded,
|
| + int16_t* speechType) {
|
| int16_t isRCUPayload = 1;
|
| return Decode(ISAC_main_inst, encoded, lenEncodedBytes, decoded,
|
| speechType, isRCUPayload);
|
| @@ -1485,7 +1485,7 @@ static int16_t ControlUb(ISACUBStruct* instISAC, double rate) {
|
|
|
| int16_t WebRtcIsac_Control(ISACStruct* ISAC_main_inst,
|
| int32_t bottleneckBPS,
|
| - int frameSize) {
|
| + int16_t frameSize) {
|
| ISACMainStruct* instISAC = (ISACMainStruct*)ISAC_main_inst;
|
| int16_t status;
|
| double rateLB;
|
| @@ -1526,7 +1526,7 @@ int16_t WebRtcIsac_Control(ISACStruct* ISAC_main_inst,
|
| return -1;
|
| }
|
|
|
| - status = ControlLb(&instISAC->instLB, rateLB, (int16_t)frameSize);
|
| + status = ControlLb(&instISAC->instLB, rateLB, frameSize);
|
| if (status < 0) {
|
| instISAC->errorCode = -status;
|
| return -1;
|
| @@ -1594,7 +1594,7 @@ int16_t WebRtcIsac_Control(ISACStruct* ISAC_main_inst,
|
| */
|
| int16_t WebRtcIsac_ControlBwe(ISACStruct* ISAC_main_inst,
|
| int32_t bottleneckBPS,
|
| - int frameSizeMs,
|
| + int16_t frameSizeMs,
|
| int16_t enforceFrameSize) {
|
| ISACMainStruct* instISAC = (ISACMainStruct*)ISAC_main_inst;
|
| enum ISACBandwidth bandwidth;
|
| @@ -1641,8 +1641,8 @@ int16_t WebRtcIsac_ControlBwe(ISACStruct* ISAC_main_inst,
|
| * will not change */
|
| if (frameSizeMs != 0) {
|
| if ((frameSizeMs == 30) || (frameSizeMs == 60)) {
|
| - instISAC->instLB.ISACencLB_obj.new_framelength =
|
| - (int16_t)((FS / 1000) * frameSizeMs);
|
| + instISAC->instLB.ISACencLB_obj.new_framelength = (FS / 1000) *
|
| + frameSizeMs;
|
| } else {
|
| instISAC->errorCode = ISAC_DISALLOWED_FRAME_LENGTH;
|
| return -1;
|
|
|