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 #include "webrtc/modules/audio_processing/aec3/residual_echo_estimator.h" | 11 #include "webrtc/modules/audio_processing/aec3/residual_echo_estimator.h" |
12 | 12 |
13 #include <numeric> | 13 #include <numeric> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/rtc_base/checks.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Estimates the echo generating signal power as gated maximal power over a time | 21 // Estimates the echo generating signal power as gated maximal power over a time |
22 // window. | 22 // window. |
23 void EchoGeneratingPower(const RenderBuffer& render_buffer, | 23 void EchoGeneratingPower(const RenderBuffer& render_buffer, |
24 size_t min_delay, | 24 size_t min_delay, |
25 size_t max_delay, | 25 size_t max_delay, |
26 std::array<float, kFftLengthBy2Plus1>* X2) { | 26 std::array<float, kFftLengthBy2Plus1>* X2) { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } else { | 234 } else { |
235 std::copy(S2.begin(), S2.end(), S2_old_[S2_old_index_].begin()); | 235 std::copy(S2.begin(), S2.end(), S2_old_[S2_old_index_].begin()); |
236 } | 236 } |
237 | 237 |
238 // Add the power of the echo reverb to the residual echo power. | 238 // Add the power of the echo reverb to the residual echo power. |
239 std::transform(R2->begin(), R2->end(), R2_reverb_.begin(), R2->begin(), | 239 std::transform(R2->begin(), R2->end(), R2_reverb_.begin(), R2->begin(), |
240 std::plus<float>()); | 240 std::plus<float>()); |
241 } | 241 } |
242 | 242 |
243 } // namespace webrtc | 243 } // namespace webrtc |
OLD | NEW |