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

Unified Diff: webrtc/common_audio/signal_processing/min_max_operations_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/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;
}
« no previous file with comments | « webrtc/common_audio/signal_processing/min_max_operations_mips.c ('k') | webrtc/common_audio/signal_processing/resample_by_2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698