Index: webrtc/common_audio/signal_processing/vector_scaling_operations.c |
diff --git a/webrtc/common_audio/signal_processing/vector_scaling_operations.c b/webrtc/common_audio/signal_processing/vector_scaling_operations.c |
index 9ae7480eb781178408136ebbd6120f7229ddef55..fdefd0676079ad0ec409aa589ea459bb7afdc85e 100644 |
--- a/webrtc/common_audio/signal_processing/vector_scaling_operations.c |
+++ b/webrtc/common_audio/signal_processing/vector_scaling_operations.c |
@@ -22,10 +22,10 @@ |
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" |
-void WebRtcSpl_VectorBitShiftW16(int16_t *res, int16_t length, |
+void WebRtcSpl_VectorBitShiftW16(int16_t *res, size_t length, |
const int16_t *in, int16_t right_shifts) |
{ |
- int i; |
+ size_t i; |
if (right_shifts > 0) |
{ |
@@ -43,11 +43,11 @@ void WebRtcSpl_VectorBitShiftW16(int16_t *res, int16_t length, |
} |
void WebRtcSpl_VectorBitShiftW32(int32_t *out_vector, |
- int16_t vector_length, |
+ size_t vector_length, |
const int32_t *in_vector, |
int16_t right_shifts) |
{ |
- int i; |
+ size_t i; |
if (right_shifts > 0) |
{ |
@@ -64,9 +64,9 @@ void WebRtcSpl_VectorBitShiftW32(int32_t *out_vector, |
} |
} |
-void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, int length, |
+void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, size_t length, |
const int32_t* in, int right_shifts) { |
- int i; |
+ size_t i; |
int32_t tmp_w32; |
if (right_shifts >= 0) { |
@@ -84,11 +84,11 @@ void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, int length, |
} |
void WebRtcSpl_ScaleVector(const int16_t *in_vector, int16_t *out_vector, |
- int16_t gain, int16_t in_vector_length, |
+ int16_t gain, size_t in_vector_length, |
int16_t right_shifts) |
{ |
// Performs vector operation: out_vector = (gain*in_vector)>>right_shifts |
- int i; |
+ size_t i; |
const int16_t *inptr; |
int16_t *outptr; |
@@ -102,11 +102,11 @@ void WebRtcSpl_ScaleVector(const int16_t *in_vector, int16_t *out_vector, |
} |
void WebRtcSpl_ScaleVectorWithSat(const int16_t *in_vector, int16_t *out_vector, |
- int16_t gain, int16_t in_vector_length, |
+ int16_t gain, size_t in_vector_length, |
int16_t right_shifts) |
{ |
// Performs vector operation: out_vector = (gain*in_vector)>>right_shifts |
- int i; |
+ size_t i; |
const int16_t *inptr; |
int16_t *outptr; |
@@ -120,10 +120,10 @@ void WebRtcSpl_ScaleVectorWithSat(const int16_t *in_vector, int16_t *out_vector, |
void WebRtcSpl_ScaleAndAddVectors(const int16_t *in1, int16_t gain1, int shift1, |
const int16_t *in2, int16_t gain2, int shift2, |
- int16_t *out, int vector_length) |
+ int16_t *out, size_t vector_length) |
{ |
// Performs vector operation: out = (gain1*in1)>>shift1 + (gain2*in2)>>shift2 |
- int i; |
+ size_t i; |
const int16_t *in1ptr; |
const int16_t *in2ptr; |
int16_t *outptr; |
@@ -146,12 +146,12 @@ int WebRtcSpl_ScaleAndAddVectorsWithRoundC(const int16_t* in_vector1, |
int16_t in_vector2_scale, |
int right_shifts, |
int16_t* out_vector, |
- int length) { |
- int i = 0; |
+ size_t length) { |
+ size_t i = 0; |
int round_value = (1 << right_shifts) >> 1; |
if (in_vector1 == NULL || in_vector2 == NULL || out_vector == NULL || |
- length <= 0 || right_shifts < 0) { |
+ length == 0 || right_shifts < 0) { |
return -1; |
} |