| Index: webrtc/common_audio/signal_processing/auto_correlation.c
|
| diff --git a/webrtc/common_audio/signal_processing/auto_correlation.c b/webrtc/common_audio/signal_processing/auto_correlation.c
|
| index 8d6c879ca77986ffdc30a0a28a7c23f3e6bc4346..fda4fffeed17db613bdbd8ccaaf4329578fbea59 100644
|
| --- a/webrtc/common_audio/signal_processing/auto_correlation.c
|
| +++ b/webrtc/common_audio/signal_processing/auto_correlation.c
|
| @@ -10,20 +10,19 @@
|
|
|
| #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
|
|
| -int WebRtcSpl_AutoCorrelation(const int16_t* in_vector,
|
| - size_t in_vector_length,
|
| - size_t order,
|
| - int32_t* result,
|
| - int* scale) {
|
| +#include <assert.h>
|
| +
|
| +size_t WebRtcSpl_AutoCorrelation(const int16_t* in_vector,
|
| + size_t in_vector_length,
|
| + size_t order,
|
| + int32_t* result,
|
| + int* scale) {
|
| int32_t sum = 0;
|
| size_t i = 0, j = 0;
|
| int16_t smax = 0;
|
| int scaling = 0;
|
|
|
| - if (order > in_vector_length) {
|
| - /* Undefined */
|
| - return -1;
|
| - }
|
| + assert(order <= in_vector_length);
|
|
|
| // Find the maximum absolute value of the samples.
|
| smax = WebRtcSpl_MaxAbsValueW16(in_vector, in_vector_length);
|
| @@ -62,5 +61,5 @@ int WebRtcSpl_AutoCorrelation(const int16_t* in_vector,
|
| }
|
|
|
| *scale = scaling;
|
| - return (int)(order + 1);
|
| + return order + 1;
|
| }
|
|
|