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

Unified Diff: webrtc/common_audio/signal_processing/cross_correlation_neon.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/common_audio/signal_processing/cross_correlation_neon.c
diff --git a/webrtc/common_audio/signal_processing/cross_correlation_neon.c b/webrtc/common_audio/signal_processing/cross_correlation_neon.c
index 9bf16cfb6bad19eda6f03f6be189e914bd4d9b3c..918b6715cd3371c59ecdc1840262a721499bdd44 100644
--- a/webrtc/common_audio/signal_processing/cross_correlation_neon.c
+++ b/webrtc/common_audio/signal_processing/cross_correlation_neon.c
@@ -15,19 +15,14 @@
static inline void DotProductWithScaleNeon(int32_t* cross_correlation,
const int16_t* vector1,
const int16_t* vector2,
- int length,
+ size_t length,
int scaling) {
- int i = 0;
- int len1 = length >> 3;
- int len2 = length & 7;
+ size_t i = 0;
+ size_t len1 = length >> 3;
+ size_t len2 = length & 7;
int64x2_t sum0 = vdupq_n_s64(0);
int64x2_t sum1 = vdupq_n_s64(0);
- if (length < 0) {
- *cross_correlation = 0;
- return;
- }
-
for (i = len1; i > 0; i -= 1) {
int16x8_t seq1_16x8 = vld1q_s16(vector1);
int16x8_t seq2_16x8 = vld1q_s16(vector2);
@@ -72,11 +67,11 @@ static inline void DotProductWithScaleNeon(int32_t* cross_correlation,
void WebRtcSpl_CrossCorrelationNeon(int32_t* cross_correlation,
const int16_t* seq1,
const int16_t* seq2,
- int16_t dim_seq,
- int16_t dim_cross_correlation,
+ size_t dim_seq,
+ size_t dim_cross_correlation,
int right_shifts,
int step_seq2) {
- int i = 0;
+ size_t i = 0;
for (i = 0; i < dim_cross_correlation; i++) {
const int16_t* seq1_ptr = seq1;

Powered by Google App Engine
This is Rietveld 408576698