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

Side by Side Diff: webrtc/modules/audio_processing/aec/aec_core_neon.cc

Issue 1887003002: Added support in the AEC for refined filter adaptation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Corrected the issue with the missing const specifier in the header file 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) 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
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // 120 //
121 // Note: The precision did not improve after 2 iterations. 121 // Note: The precision did not improve after 2 iterations.
122 for (i = 0; i < 2; i++) { 122 for (i = 0; i < 2; i++) {
123 x = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, x), s), x); 123 x = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, x), s), x);
124 } 124 }
125 // sqrt(s) = s * 1/sqrt(s) 125 // sqrt(s) = s * 1/sqrt(s)
126 return vmulq_f32(s, x); 126 return vmulq_f32(s, x);
127 } 127 }
128 #endif // WEBRTC_ARCH_ARM64 128 #endif // WEBRTC_ARCH_ARM64
129 129
130 static void ScaleErrorSignalNEON(int extended_filter_enabled, 130 static void ScaleErrorSignalNEON(float mu,
131 float normal_mu, 131 float error_threshold,
132 float normal_error_threshold,
133 float x_pow[PART_LEN1], 132 float x_pow[PART_LEN1],
134 float ef[2][PART_LEN1]) { 133 float ef[2][PART_LEN1]) {
135 const float mu = extended_filter_enabled ? kExtendedMu : normal_mu;
136 const float error_threshold = extended_filter_enabled
137 ? kExtendedErrorThreshold
138 : normal_error_threshold;
139 const float32x4_t k1e_10f = vdupq_n_f32(1e-10f); 134 const float32x4_t k1e_10f = vdupq_n_f32(1e-10f);
140 const float32x4_t kMu = vmovq_n_f32(mu); 135 const float32x4_t kMu = vmovq_n_f32(mu);
141 const float32x4_t kThresh = vmovq_n_f32(error_threshold); 136 const float32x4_t kThresh = vmovq_n_f32(error_threshold);
142 int i; 137 int i;
143 // vectorized code (four at once) 138 // vectorized code (four at once)
144 for (i = 0; i + 3 < PART_LEN1; i += 4) { 139 for (i = 0; i + 3 < PART_LEN1; i += 4) {
145 const float32x4_t x_pow_local = vld1q_f32(&x_pow[i]); 140 const float32x4_t x_pow_local = vld1q_f32(&x_pow[i]);
146 const float32x4_t ef_re_base = vld1q_f32(&ef[0][i]); 141 const float32x4_t ef_re_base = vld1q_f32(&ef[0][i]);
147 const float32x4_t ef_im_base = vld1q_f32(&ef[1][i]); 142 const float32x4_t ef_im_base = vld1q_f32(&ef[1][i]);
148 const float32x4_t xPowPlus = vaddq_f32(x_pow_local, k1e_10f); 143 const float32x4_t xPowPlus = vaddq_f32(x_pow_local, k1e_10f);
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 WebRtcAec_FilterFar = FilterFarNEON; 717 WebRtcAec_FilterFar = FilterFarNEON;
723 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON; 718 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON;
724 WebRtcAec_FilterAdaptation = FilterAdaptationNEON; 719 WebRtcAec_FilterAdaptation = FilterAdaptationNEON;
725 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON; 720 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON;
726 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON; 721 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON;
727 WebRtcAec_StoreAsComplex = StoreAsComplexNEON; 722 WebRtcAec_StoreAsComplex = StoreAsComplexNEON;
728 WebRtcAec_PartitionDelay = PartitionDelayNEON; 723 WebRtcAec_PartitionDelay = PartitionDelayNEON;
729 WebRtcAec_WindowData = WindowDataNEON; 724 WebRtcAec_WindowData = WindowDataNEON;
730 } 725 }
731 } // namespace webrtc 726 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698