OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ |
13 | 13 |
14 #include "webrtc/typedefs.h" | 14 #include "webrtc/typedefs.h" |
15 #if defined(WEBRTC_ARCH_X86_FAMILY) | 15 #if defined(WEBRTC_ARCH_X86_FAMILY) |
16 #include <emmintrin.h> | 16 #include <emmintrin.h> |
17 #endif | 17 #endif |
18 #include <algorithm> | 18 #include <algorithm> |
19 #include <array> | 19 #include <array> |
20 | 20 |
21 #include "webrtc/base/array_view.h" | |
22 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" | 21 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" |
| 22 #include "webrtc/rtc_base/array_view.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 // Struct that holds imaginary data produced from 128 point real-valued FFTs. | 26 // Struct that holds imaginary data produced from 128 point real-valued FFTs. |
27 struct FftData { | 27 struct FftData { |
28 // Copies the data in src. | 28 // Copies the data in src. |
29 void Assign(const FftData& src) { | 29 void Assign(const FftData& src) { |
30 std::copy(src.re.begin(), src.re.end(), re.begin()); | 30 std::copy(src.re.begin(), src.re.end(), re.begin()); |
31 std::copy(src.im.begin(), src.im.end(), im.begin()); | 31 std::copy(src.im.begin(), src.im.end(), im.begin()); |
32 im[0] = im[kFftLengthBy2] = 0; | 32 im[0] = im[kFftLengthBy2] = 0; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 std::array<float, kFftLengthBy2Plus1> re; | 92 std::array<float, kFftLengthBy2Plus1> re; |
93 std::array<float, kFftLengthBy2Plus1> im; | 93 std::array<float, kFftLengthBy2Plus1> im; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace webrtc | 96 } // namespace webrtc |
97 | 97 |
98 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ | 98 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ |
OLD | NEW |