Index: webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c |
diff --git a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c |
index 1f6974a456250a4b280beeb100fc1b02352233c8..a0c166a6c37c7e06bac98f2d991aad2754ef9e5d 100644 |
--- a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c |
+++ b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c |
@@ -35,7 +35,7 @@ typedef struct WebRtcCngDecoder_ { |
} WebRtcCngDecoder; |
typedef struct WebRtcCngEncoder_ { |
- int16_t enc_nrOfCoefs; |
+ size_t enc_nrOfCoefs; |
int enc_sampfreq; |
int16_t enc_interval; |
int16_t enc_msSinceSID; |
@@ -228,8 +228,8 @@ int16_t WebRtcCng_FreeDec(CNG_dec_inst* cng_inst) { |
* -1 - Error |
*/ |
int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, |
- int16_t nrOfSamples, uint8_t* SIDdata, |
- int16_t* bytesOut, int16_t forceSID) { |
+ size_t nrOfSamples, uint8_t* SIDdata, |
+ size_t* bytesOut, int16_t forceSID) { |
WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst; |
int16_t arCoefs[WEBRTC_CNG_MAX_LPC_ORDER + 1]; |
@@ -240,10 +240,11 @@ int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, |
int16_t ReflBetaComp = 13107; /* 0.4 in q15. */ |
int32_t outEnergy; |
int outShifts; |
- int i, stab; |
+ size_t i; |
+ int stab; |
int acorrScale; |
- int index; |
- int16_t ind, factor; |
+ size_t index; |
+ size_t ind, factor; |
int32_t* bptr; |
int32_t blo, bhi; |
int16_t negate; |
@@ -281,7 +282,7 @@ int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, |
outShifts--; |
} |
} |
- outEnergy = WebRtcSpl_DivW32W16(outEnergy, factor); |
+ outEnergy = WebRtcSpl_DivW32W16(outEnergy, (int16_t)factor); |
if (outEnergy > 1) { |
/* Create Hanning Window. */ |
@@ -390,7 +391,7 @@ int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, |
inst->enc_msSinceSID += |
(int16_t)((1000 * nrOfSamples) / inst->enc_sampfreq); |
- return inst->enc_nrOfCoefs + 1; |
+ return (int)(inst->enc_nrOfCoefs + 1); |
} else { |
inst->enc_msSinceSID += |
(int16_t)((1000 * nrOfSamples) / inst->enc_sampfreq); |
@@ -475,10 +476,10 @@ int16_t WebRtcCng_UpdateSid(CNG_dec_inst* cng_inst, uint8_t* SID, |
* -1 - Error |
*/ |
int16_t WebRtcCng_Generate(CNG_dec_inst* cng_inst, int16_t* outData, |
- int16_t nrOfSamples, int16_t new_period) { |
+ size_t nrOfSamples, int16_t new_period) { |
WebRtcCngDecoder* inst = (WebRtcCngDecoder*) cng_inst; |
- int i; |
+ size_t i; |
int16_t excitation[WEBRTC_CNG_MAX_OUTSIZE_ORDER]; |
int16_t low[WEBRTC_CNG_MAX_OUTSIZE_ORDER]; |
int16_t lpPoly[WEBRTC_CNG_MAX_LPC_ORDER + 1]; |