| 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 /* | 11 /* |
| 12 * The core AEC algorithm, neon version of speed-critical functions. | 12 * The core AEC algorithm, neon version of speed-critical functions. |
| 13 * | 13 * |
| 14 * Based on aec_core_sse2.c. | 14 * Based on aec_core_sse2.c. |
| 15 */ | 15 */ |
| 16 | 16 |
| 17 #include <arm_neon.h> | 17 #include <arm_neon.h> |
| 18 #include <math.h> | 18 #include <math.h> |
| 19 #include <string.h> // memset | 19 #include <string.h> // memset |
| 20 | 20 |
| 21 extern "C" { | 21 extern "C" { |
| 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 23 } | 23 } |
| 24 #include "webrtc/modules/audio_processing/aec/aec_common.h" | 24 #include "webrtc/modules/audio_processing/aec/aec_common.h" |
| 25 #include "webrtc/modules/audio_processing/aec/aec_core_internal.h" | 25 #include "webrtc/modules/audio_processing/aec/aec_core_internal.h" |
| 26 extern "C" { | 26 extern "C" { |
| 27 #include "webrtc/modules/audio_processing/aec/aec_rdft.h" | 27 #include "webrtc/modules/audio_processing/aec/aec_rdft.h" |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace webrtc { |
| 31 |
| 30 enum { kShiftExponentIntoTopMantissa = 8 }; | 32 enum { kShiftExponentIntoTopMantissa = 8 }; |
| 31 enum { kFloatExponentShift = 23 }; | 33 enum { kFloatExponentShift = 23 }; |
| 32 | 34 |
| 33 __inline static float MulRe(float aRe, float aIm, float bRe, float bIm) { | 35 __inline static float MulRe(float aRe, float aIm, float bRe, float bIm) { |
| 34 return aRe * bRe - aIm * bIm; | 36 return aRe * bRe - aIm * bIm; |
| 35 } | 37 } |
| 36 | 38 |
| 37 __inline static float MulIm(float aRe, float aIm, float bRe, float bIm) { | 39 __inline static float MulIm(float aRe, float aIm, float bRe, float bIm) { |
| 38 return aRe * bIm + aIm * bRe; | 40 return aRe * bIm + aIm * bRe; |
| 39 } | 41 } |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 void WebRtcAec_InitAec_neon(void) { | 723 void WebRtcAec_InitAec_neon(void) { |
| 722 WebRtcAec_FilterFar = FilterFarNEON; | 724 WebRtcAec_FilterFar = FilterFarNEON; |
| 723 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON; | 725 WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON; |
| 724 WebRtcAec_FilterAdaptation = FilterAdaptationNEON; | 726 WebRtcAec_FilterAdaptation = FilterAdaptationNEON; |
| 725 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON; | 727 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppressNEON; |
| 726 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON; | 728 WebRtcAec_SubbandCoherence = SubbandCoherenceNEON; |
| 727 WebRtcAec_StoreAsComplex = StoreAsComplexNEON; | 729 WebRtcAec_StoreAsComplex = StoreAsComplexNEON; |
| 728 WebRtcAec_PartitionDelay = PartitionDelayNEON; | 730 WebRtcAec_PartitionDelay = PartitionDelayNEON; |
| 729 WebRtcAec_WindowData = WindowDataNEON; | 731 WebRtcAec_WindowData = WindowDataNEON; |
| 730 } | 732 } |
| 733 } // namespace webrtc |
| OLD | NEW |