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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/encode.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/encode.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/encode.c b/webrtc/modules/audio_coding/codecs/ilbc/encode.c
index 1d46eff4324a21b93d8c9c94e9cc9975573ef814..3de84258a9afc4af74b444b9c64e943ac0829d2e 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/encode.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/encode.c
@@ -48,7 +48,7 @@ void WebRtcIlbcfix_EncodeImpl(
IlbcEncoder *iLBCenc_inst /* (i/o) the general encoder
state */
){
- int n, meml_gotten, Nfor, Nback;
+ int n, meml_gotten, Nfor;
int16_t diff, start_pos;
int index;
int subcount, subframe;
@@ -379,15 +379,14 @@ void WebRtcIlbcfix_EncodeImpl(
/* backward prediction of subframes */
- Nback = iLBCbits_inst->startIdx-1;
-
- if( Nback > 0 ){
+ if (iLBCbits_inst->startIdx > 1) {
/* create reverse order vectors
(The decresidual does not need to be copied since it is
contained in the same vector as the residual)
*/
+ int Nback = iLBCbits_inst->startIdx - 1;
WebRtcSpl_MemCpyReversedOrder(&reverseResidual[Nback*SUBL-1], residual, Nback*SUBL);
/* setup memory */
@@ -425,11 +424,11 @@ void WebRtcIlbcfix_EncodeImpl(
if (iLBCenc_inst->section == 1)
{
start_count = 0;
- end_count = WEBRTC_SPL_MAX (2 - Nfor, 0);
+ end_count = (Nfor >= 2) ? 0 : (2 - NFor);
}
if (iLBCenc_inst->section == 2)
{
- start_count = WEBRTC_SPL_MAX (2 - Nfor, 0);
+ start_count = (Nfor >= 2) ? 0 : (2 - NFor);
end_count = Nback;
}
}
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/do_plc.c ('k') | webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698