Chromium Code Reviews| Index: webrtc/modules/audio_processing/aec3/residual_echo_estimator.h |
| diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4491037c8e962559cc9083804da43c2c57565cf |
| --- /dev/null |
| +++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h |
| @@ -0,0 +1,56 @@ |
| +/* |
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_ |
| +#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_ |
| + |
| +#include <algorithm> |
|
hlundin-webrtc
2017/02/21 16:34:02
<array> missing
peah-webrtc
2017/02/21 23:00:41
Done.
|
| +#include <vector> |
| + |
| +#include "webrtc/base/array_view.h" |
| +#include "webrtc/base/constructormagic.h" |
| +#include "webrtc/base/optional.h" |
|
hlundin-webrtc
2017/02/21 16:34:02
Not used.
peah-webrtc
2017/02/21 23:00:41
Done.
|
| +#include "webrtc/modules/audio_processing/aec3/aec3_common.h" |
| +#include "webrtc/modules/audio_processing/aec3/aec_state.h" |
| +#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h" |
|
hlundin-webrtc
2017/02/21 16:34:02
Not used?
peah-webrtc
2017/02/21 23:00:41
Done.
|
| +#include "webrtc/modules/audio_processing/aec3/erle_estimator.h" |
|
hlundin-webrtc
2017/02/21 16:34:02
Not used?
peah-webrtc
2017/02/21 23:00:41
Done.
|
| +#include "webrtc/modules/audio_processing/aec3/erl_estimator.h" |
|
hlundin-webrtc
2017/02/21 16:34:02
Not used?
peah-webrtc
2017/02/21 23:00:41
Done.
|
| +#include "webrtc/modules/audio_processing/aec3/fft_buffer.h" |
| +#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" |
|
hlundin-webrtc
2017/02/21 16:34:02
Not used.
peah-webrtc
2017/02/21 23:00:41
Done.
|
| + |
| +namespace webrtc { |
| + |
| +class ResidualEchoEstimator { |
| + public: |
| + ResidualEchoEstimator(); |
| + ~ResidualEchoEstimator(); |
| + |
| + void Estimate(bool using_subtractor_output, |
| + const AecState& aec_state, |
| + const FftBuffer& X_buffer, |
| + const std::vector<std::array<float, kFftLengthBy2Plus1>>& H2, |
| + const std::array<float, kFftLengthBy2Plus1>& E2_main, |
| + const std::array<float, kFftLengthBy2Plus1>& E2_shadow, |
| + const std::array<float, kFftLengthBy2Plus1>& S2_linear, |
| + const std::array<float, kFftLengthBy2Plus1>& S2_fallback, |
| + const std::array<float, kFftLengthBy2Plus1>& Y2, |
| + std::array<float, kFftLengthBy2Plus1>* R2); |
| + |
| + private: |
| + std::array<float, kFftLengthBy2Plus1> echo_path_gain_; |
| + size_t active_render_counter_ = 0; |
| + size_t blocks_since_last_saturation_ = 1000; |
| + |
| + RTC_DISALLOW_COPY_AND_ASSIGN(ResidualEchoEstimator); |
| +}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_ |