| 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 ee8bef1a9c2294691876fcee8169cc80b82a6bfe..6fbbf94ee052092273578b032819953941304eca 100644
|
| --- a/webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| +++ b/webrtc/common_audio/signal_processing/min_max_operations_neon.c
|
| @@ -9,6 +9,7 @@
|
| */
|
|
|
| #include <arm_neon.h>
|
| +#include <assert.h>
|
| #include <stdlib.h>
|
|
|
| #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
| @@ -17,9 +18,7 @@
|
| int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length) {
|
| int absolute = 0, maximum = 0;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return -1;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int16_t* p_start = vector;
|
| size_t rest = length & 7;
|
| @@ -77,9 +76,7 @@ int32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, size_t length) {
|
| size_t i = 0;
|
| size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return -1;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int32_t* p_start = vector;
|
| uint32x4_t max32x4_0 = vdupq_n_u32(0);
|
| @@ -131,9 +128,7 @@ int16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, size_t length) {
|
| size_t i = 0;
|
| size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return maximum;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int16_t* p_start = vector;
|
| int16x8_t max16x8 = vdupq_n_s16(WEBRTC_SPL_WORD16_MIN);
|
| @@ -171,9 +166,7 @@ int32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, size_t length) {
|
| size_t i = 0;
|
| size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return maximum;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int32_t* p_start = vector;
|
| int32x4_t max32x4_0 = vdupq_n_s32(WEBRTC_SPL_WORD32_MIN);
|
| @@ -215,9 +208,7 @@ int16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, size_t length) {
|
| size_t i = 0;
|
| size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return minimum;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int16_t* p_start = vector;
|
| int16x8_t min16x8 = vdupq_n_s16(WEBRTC_SPL_WORD16_MAX);
|
| @@ -255,9 +246,7 @@ int32_t WebRtcSpl_MinValueW32Neon(const int32_t* vector, size_t length) {
|
| size_t i = 0;
|
| size_t residual = length & 0x7;
|
|
|
| - if (vector == NULL || length == 0) {
|
| - return minimum;
|
| - }
|
| + assert(length > 0);
|
|
|
| const int32_t* p_start = vector;
|
| int32x4_t min32x4_0 = vdupq_n_s32(WEBRTC_SPL_WORD32_MAX);
|
|
|