| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <arm_neon.h> | 11 #include <arm_neon.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 | 13 |
| 14 #include "webrtc/base/checks.h" | 14 #include "webrtc/rtc_base/checks.h" |
| 15 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 15 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 16 | 16 |
| 17 // Maximum absolute value of word16 vector. C version for generic platforms. | 17 // Maximum absolute value of word16 vector. C version for generic platforms. |
| 18 int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length) { | 18 int16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length) { |
| 19 int absolute = 0, maximum = 0; | 19 int absolute = 0, maximum = 0; |
| 20 | 20 |
| 21 RTC_DCHECK_GT(length, 0); | 21 RTC_DCHECK_GT(length, 0); |
| 22 | 22 |
| 23 const int16_t* p_start = vector; | 23 const int16_t* p_start = vector; |
| 24 size_t rest = length & 7; | 24 size_t rest = length & 7; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 // Second part, do the remaining iterations (if any). | 275 // Second part, do the remaining iterations (if any). |
| 276 for (i = residual; i > 0; i--) { | 276 for (i = residual; i > 0; i--) { |
| 277 if (*p_start < minimum) | 277 if (*p_start < minimum) |
| 278 minimum = *p_start; | 278 minimum = *p_start; |
| 279 p_start++; | 279 p_start++; |
| 280 } | 280 } |
| 281 return minimum; | 281 return minimum; |
| 282 } | 282 } |
| 283 | 283 |
| OLD | NEW |