OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 "webrtc/modules/audio_processing/aecm/aecm_core.h" | 11 #include "webrtc/modules/audio_processing/aecm/aecm_core.h" |
12 | 12 |
13 #include <arm_neon.h> | 13 #include <arm_neon.h> |
14 | 14 |
15 #include "webrtc/base/checks.h" | |
16 #include "webrtc/common_audio/signal_processing/include/real_fft.h" | 15 #include "webrtc/common_audio/signal_processing/include/real_fft.h" |
| 16 #include "webrtc/rtc_base/checks.h" |
17 | 17 |
18 // TODO(kma): Re-write the corresponding assembly file, the offset | 18 // TODO(kma): Re-write the corresponding assembly file, the offset |
19 // generating script and makefile, to replace these C functions. | 19 // generating script and makefile, to replace these C functions. |
20 | 20 |
21 static inline void AddLanes(uint32_t* ptr, uint32x4_t v) { | 21 static inline void AddLanes(uint32_t* ptr, uint32x4_t v) { |
22 #if defined(WEBRTC_ARCH_ARM64) | 22 #if defined(WEBRTC_ARCH_ARM64) |
23 *(ptr) = vaddvq_u32(v); | 23 *(ptr) = vaddvq_u32(v); |
24 #else | 24 #else |
25 uint32x2_t tmp_v; | 25 uint32x2_t tmp_v; |
26 tmp_v = vadd_u32(vget_low_u32(v), vget_high_u32(v)); | 26 tmp_v = vadd_u32(vget_low_u32(v), vget_high_u32(v)); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 vst1q_s32(start_adapt32_p, adapt32_v_low); | 190 vst1q_s32(start_adapt32_p, adapt32_v_low); |
191 vst1q_s32(start_adapt32_p + 4, adapt32_v_high); | 191 vst1q_s32(start_adapt32_p + 4, adapt32_v_high); |
192 | 192 |
193 start_stored_p += 8; | 193 start_stored_p += 8; |
194 start_adapt16_p += 8; | 194 start_adapt16_p += 8; |
195 start_adapt32_p += 8; | 195 start_adapt32_p += 8; |
196 } | 196 } |
197 aecm->channelAdapt16[PART_LEN] = aecm->channelStored[PART_LEN]; | 197 aecm->channelAdapt16[PART_LEN] = aecm->channelStored[PART_LEN]; |
198 aecm->channelAdapt32[PART_LEN] = (int32_t)aecm->channelStored[PART_LEN] << 16; | 198 aecm->channelAdapt32[PART_LEN] = (int32_t)aecm->channelStored[PART_LEN] << 16; |
199 } | 199 } |
OLD | NEW |