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

Side by Side Diff: webrtc/modules/audio_processing/aecm/aecm_core_neon.cc

Issue 1857153002: Changed AECM to be built using C++ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added external declaration to the delay estimator wrapper inclusion Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 #include <assert.h> 14 #include <assert.h>
15 15
16 #include "webrtc/common_audio/signal_processing/include/real_fft.h" 16 #include "webrtc/common_audio/signal_processing/include/real_fft.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 // Square root of Hanning window in Q14.
22 const ALIGN8_BEG int16_t WebRtcAecm_kSqrtHanning[] ALIGN8_END = {
23 0,
24 399, 798, 1196, 1594, 1990, 2386, 2780, 3172,
25 3562, 3951, 4337, 4720, 5101, 5478, 5853, 6224,
26 6591, 6954, 7313, 7668, 8019, 8364, 8705, 9040,
27 9370, 9695, 10013, 10326, 10633, 10933, 11227, 11514,
28 11795, 12068, 12335, 12594, 12845, 13089, 13325, 13553,
29 13773, 13985, 14189, 14384, 14571, 14749, 14918, 15079,
30 15231, 15373, 15506, 15631, 15746, 15851, 15947, 16034,
31 16111, 16179, 16237, 16286, 16325, 16354, 16373, 16384
32 };
33
34 static inline void AddLanes(uint32_t* ptr, uint32x4_t v) { 21 static inline void AddLanes(uint32_t* ptr, uint32x4_t v) {
35 #if defined(WEBRTC_ARCH_ARM64) 22 #if defined(WEBRTC_ARCH_ARM64)
36 *(ptr) = vaddvq_u32(v); 23 *(ptr) = vaddvq_u32(v);
37 #else 24 #else
38 uint32x2_t tmp_v; 25 uint32x2_t tmp_v;
39 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));
40 tmp_v = vpadd_u32(tmp_v, tmp_v); 27 tmp_v = vpadd_u32(tmp_v, tmp_v);
41 *(ptr) = vget_lane_u32(tmp_v, 0); 28 *(ptr) = vget_lane_u32(tmp_v, 0);
42 #endif 29 #endif
43 } 30 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 vst1q_s32(start_adapt32_p, adapt32_v_low); 190 vst1q_s32(start_adapt32_p, adapt32_v_low);
204 vst1q_s32(start_adapt32_p + 4, adapt32_v_high); 191 vst1q_s32(start_adapt32_p + 4, adapt32_v_high);
205 192
206 start_stored_p += 8; 193 start_stored_p += 8;
207 start_adapt16_p += 8; 194 start_adapt16_p += 8;
208 start_adapt32_p += 8; 195 start_adapt32_p += 8;
209 } 196 }
210 aecm->channelAdapt16[PART_LEN] = aecm->channelStored[PART_LEN]; 197 aecm->channelAdapt16[PART_LEN] = aecm->channelStored[PART_LEN];
211 aecm->channelAdapt32[PART_LEN] = (int32_t)aecm->channelStored[PART_LEN] << 16; 198 aecm->channelAdapt32[PART_LEN] = (int32_t)aecm->channelStored[PART_LEN] << 16;
212 } 199 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_neon.c ('k') | webrtc/modules/audio_processing/aecm/echo_control_mobile.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698