Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments + resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c
index 169218aa85022a7a9107b4bb06b1806c03512af6..c04fd991187db2547a66c36db858844ada7044fa 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c
@@ -41,7 +41,7 @@ void WebRtcIlbcfix_DecodeResidual(
int16_t *syntdenum /* (i) the decoded synthesis filter
coefficients */
) {
- int16_t meml_gotten, Nfor, Nback, diff, start_pos;
+ int16_t meml_gotten, diff, start_pos;
int16_t subcount, subframe;
int16_t *reverseDecresidual = iLBCdec_inst->enh_buf; /* Reversed decoded data, used for decoding backwards in time (reuse memory in state) */
int16_t *memVec = iLBCdec_inst->prevResidual; /* Memory for codebook and filter state (reuse memory in state) */
@@ -110,9 +110,7 @@ void WebRtcIlbcfix_DecodeResidual(
/* forward prediction of subframes */
- Nfor = iLBCdec_inst->nsub-iLBC_encbits->startIdx-1;
-
- if( Nfor > 0 ) {
+ if (iLBCdec_inst->nsub > iLBC_encbits->startIdx + 1) {
/* setup memory */
WebRtcSpl_MemSetW16(mem, 0, CB_MEML-STATE_LEN);
@@ -121,6 +119,7 @@ void WebRtcIlbcfix_DecodeResidual(
/* loop over subframes to encode */
+ int16_t Nfor = iLBCdec_inst->nsub - iLBC_encbits->startIdx - 1;
for (subframe=0; subframe<Nfor; subframe++) {
/* construct decoded vector */
@@ -143,9 +142,7 @@ void WebRtcIlbcfix_DecodeResidual(
/* backward prediction of subframes */
- Nback = iLBC_encbits->startIdx-1;
-
- if( Nback > 0 ){
+ if (iLBC_encbits->startIdx > 1) {
/* setup memory */
@@ -160,6 +157,7 @@ void WebRtcIlbcfix_DecodeResidual(
/* loop over subframes to decode */
+ int16_t Nback = iLBC_encbits->startIdx - 1;
for (subframe=0; subframe<Nback; subframe++) {
/* construct decoded vector */
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/cb_search.c ('k') | webrtc/modules/audio_coding/codecs/ilbc/do_plc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698