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

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

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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/cb_search_core.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c
index 3deb08a75c9eb5b7558bbec8abd1af1c635aa210..d297b1556c68ec9d814c1dc97d2d40fcf40fbefb 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c
@@ -21,13 +21,13 @@
void WebRtcIlbcfix_CbSearchCore(
int32_t *cDot, /* (i) Cross Correlation */
- int16_t range, /* (i) Search range */
+ size_t range, /* (i) Search range */
int16_t stage, /* (i) Stage of this search */
int16_t *inverseEnergy, /* (i) Inversed energy */
int16_t *inverseEnergyShift, /* (i) Shifts of inversed energy
with the offset 2*16-29 */
int32_t *Crit, /* (o) The criteria */
- int16_t *bestIndex, /* (o) Index that corresponds to
+ size_t *bestIndex, /* (o) Index that corresponds to
maximum criteria (in this
vector) */
int32_t *bestCrit, /* (o) Value of critera for the
@@ -37,7 +37,7 @@ void WebRtcIlbcfix_CbSearchCore(
{
int32_t maxW32, tmp32;
int16_t max, sh, tmp16;
- int i;
+ size_t i;
int32_t *cDotPtr;
int16_t cDotSqW16;
int16_t *inverseEnergyPtr;
@@ -103,7 +103,7 @@ void WebRtcIlbcfix_CbSearchCore(
}
/* Find the index of the best value */
- *bestIndex = WebRtcSpl_MaxIndexW32(Crit, range);
+ *bestIndex = (size_t)WebRtcSpl_MaxIndexW32(Crit, range);
*bestCrit = Crit[*bestIndex];
/* Calculate total shifts of this criteria */

Powered by Google App Engine
This is Rietveld 408576698