| 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/aec_state.h" | 11 #include "webrtc/modules/audio_processing/aec3/aec_state.h" |
| 12 | 12 |
| 13 #include <math.h> | 13 #include <math.h> |
| 14 #include <numeric> | 14 #include <numeric> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/api/array_view.h" |
| 17 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" | 18 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" |
| 18 #include "webrtc/rtc_base/array_view.h" | |
| 19 #include "webrtc/rtc_base/atomicops.h" | 19 #include "webrtc/rtc_base/atomicops.h" |
| 20 #include "webrtc/rtc_base/checks.h" | 20 #include "webrtc/rtc_base/checks.h" |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Computes delay of the adaptive filter. | 25 // Computes delay of the adaptive filter. |
| 26 rtc::Optional<size_t> EstimateFilterDelay( | 26 rtc::Optional<size_t> EstimateFilterDelay( |
| 27 const std::vector<std::array<float, kFftLengthBy2Plus1>>& | 27 const std::vector<std::array<float, kFftLengthBy2Plus1>>& |
| 28 adaptive_filter_frequency_response) { | 28 adaptive_filter_frequency_response) { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 max_nearend_ = e_abs; | 309 max_nearend_ = e_abs; |
| 310 max_nearend_counter_ = 0; | 310 max_nearend_counter_ = 0; |
| 311 } else { | 311 } else { |
| 312 if (++max_nearend_counter_ > 5 * kNumBlocksPerSecond) { | 312 if (++max_nearend_counter_ > 5 * kNumBlocksPerSecond) { |
| 313 max_nearend_ *= 0.995f; | 313 max_nearend_ *= 0.995f; |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace webrtc | 318 } // namespace webrtc |
| OLD | NEW |