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 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(int extended_filter_enabled, |
131 float normal_mu, | 131 float mu, |
132 float normal_error_threshold, | 132 float normal_error_threshold, |
133 float x_pow[PART_LEN1], | 133 float x_pow[PART_LEN1], |
134 float ef[2][PART_LEN1]) { | 134 float ef[2][PART_LEN1]) { |
tlegrand-webrtc
2016/04/14 14:32:42
Same comments as for the main function.
peah-webrtc
2016/04/14 22:12:41
Done.
| |
135 const float mu = extended_filter_enabled ? kExtendedMu : normal_mu; | |
136 const float error_threshold = extended_filter_enabled | 135 const float error_threshold = extended_filter_enabled |
137 ? kExtendedErrorThreshold | 136 ? kExtendedErrorThreshold |
138 : normal_error_threshold; | 137 : normal_error_threshold; |
139 const float32x4_t k1e_10f = vdupq_n_f32(1e-10f); | 138 const float32x4_t k1e_10f = vdupq_n_f32(1e-10f); |
140 const float32x4_t kMu = vmovq_n_f32(mu); | 139 const float32x4_t kMu = vmovq_n_f32(mu); |
141 const float32x4_t kThresh = vmovq_n_f32(error_threshold); | 140 const float32x4_t kThresh = vmovq_n_f32(error_threshold); |
142 int i; | 141 int i; |
143 // vectorized code (four at once) | 142 // vectorized code (four at once) |
144 for (i = 0; i + 3 < PART_LEN1; i += 4) { | 143 for (i = 0; i + 3 < PART_LEN1; i += 4) { |
145 const float32x4_t x_pow_local = vld1q_f32(&x_pow[i]); | 144 const float32x4_t x_pow_local = vld1q_f32(&x_pow[i]); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
722 WebRtcAec_FilterFar = FilterFarNEON; | 721 WebRtcAec_FilterFar = FilterFarNEON; |
723 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON; | 722 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON; |
724 WebRtcAec_FilterAdaptation = FilterAdaptationNEON; | 723 WebRtcAec_FilterAdaptation = FilterAdaptationNEON; |
725 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON; | 724 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON; |
726 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON; | 725 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON; |
727 WebRtcAec_StoreAsComplex = StoreAsComplexNEON; | 726 WebRtcAec_StoreAsComplex = StoreAsComplexNEON; |
728 WebRtcAec_PartitionDelay = PartitionDelayNEON; | 727 WebRtcAec_PartitionDelay = PartitionDelayNEON; |
729 WebRtcAec_WindowData = WindowDataNEON; | 728 WebRtcAec_WindowData = WindowDataNEON; |
730 } | 729 } |
731 } // namespace webrtc | 730 } // namespace webrtc |
OLD | NEW |