| Index: webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| diff --git a/webrtc/common_audio/signal_processing/min_max_operations_neon.c b/webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| index e4b3041e3fa9de51cb409d8bb27540510a2d9e3b..ee8bef1a9c2294691876fcee8169cc80b82a6bfe 100644
|
| --- a/webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| +++ b/webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| @@ -14,15 +14,15 @@
|
| #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
|
|
| // Maximum absolute value of word16 vector. C version for generic platforms.
|
| -int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, int length) {
|
| +int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length) {
|
| int absolute = 0, maximum = 0;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return -1;
|
| }
|
|
|
| const int16_t* p_start = vector;
|
| - int rest = length & 7;
|
| + size_t rest = length & 7;
|
| const int16_t* p_end = vector + length - rest;
|
|
|
| int16x8_t v;
|
| @@ -69,15 +69,15 @@ int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, int length) {
|
|
|
| // Maximum absolute value of word32 vector. NEON intrinsics version for
|
| // ARM 32-bit/64-bit platforms.
|
| -int32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, int length) {
|
| +int32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, size_t length) {
|
| // Use uint32_t for the local variables, to accommodate the return value
|
| // of abs(0x80000000), which is 0x80000000.
|
|
|
| uint32_t absolute = 0, maximum = 0;
|
| - int i = 0;
|
| - int residual = length & 0x7;
|
| + size_t i = 0;
|
| + size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return -1;
|
| }
|
|
|
| @@ -126,12 +126,12 @@ int32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, int length) {
|
|
|
| // Maximum value of word16 vector. NEON intrinsics version for
|
| // ARM 32-bit/64-bit platforms.
|
| -int16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, int length) {
|
| +int16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, size_t length) {
|
| int16_t maximum = WEBRTC_SPL_WORD16_MIN;
|
| - int i = 0;
|
| - int residual = length & 0x7;
|
| + size_t i = 0;
|
| + size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return maximum;
|
| }
|
|
|
| @@ -166,12 +166,12 @@ int16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, int length) {
|
|
|
| // Maximum value of word32 vector. NEON intrinsics version for
|
| // ARM 32-bit/64-bit platforms.
|
| -int32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, int length) {
|
| +int32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, size_t length) {
|
| int32_t maximum = WEBRTC_SPL_WORD32_MIN;
|
| - int i = 0;
|
| - int residual = length & 0x7;
|
| + size_t i = 0;
|
| + size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return maximum;
|
| }
|
|
|
| @@ -210,12 +210,12 @@ int32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, int length) {
|
|
|
| // Minimum value of word16 vector. NEON intrinsics version for
|
| // ARM 32-bit/64-bit platforms.
|
| -int16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, int length) {
|
| +int16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, size_t length) {
|
| int16_t minimum = WEBRTC_SPL_WORD16_MAX;
|
| - int i = 0;
|
| - int residual = length & 0x7;
|
| + size_t i = 0;
|
| + size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return minimum;
|
| }
|
|
|
| @@ -250,12 +250,12 @@ int16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, int length) {
|
|
|
| // Minimum value of word32 vector. NEON intrinsics version for
|
| // ARM 32-bit/64-bit platforms.
|
| -int32_t WebRtcSpl_MinValueW32Neon(const int32_t* vector, int length) {
|
| +int32_t WebRtcSpl_MinValueW32Neon(const int32_t* vector, size_t length) {
|
| int32_t minimum = WEBRTC_SPL_WORD32_MAX;
|
| - int i = 0;
|
| - int residual = length & 0x7;
|
| + size_t i = 0;
|
| + size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length <= 0) {
|
| + if (vector == NULL || length == 0) {
|
| return minimum;
|
| }
|
|
|
|
|