Chromium Code Reviews| Index: webrtc/modules/audio_processing/aec3/matched_filter.h |
| diff --git a/webrtc/modules/audio_processing/aec3/matched_filter.h b/webrtc/modules/audio_processing/aec3/matched_filter.h |
| index 4be4cc2d59cceb00880d581ba6433dbd67cf7467..bd37b46169459ceb2fbaa872aeda0d805de22886 100644 |
| --- a/webrtc/modules/audio_processing/aec3/matched_filter.h |
| +++ b/webrtc/modules/audio_processing/aec3/matched_filter.h |
| @@ -18,6 +18,7 @@ |
| #include "webrtc/base/constructormagic.h" |
| #include "webrtc/base/optional.h" |
| #include "webrtc/modules/audio_processing/aec3/aec3_common.h" |
| +#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h" |
| namespace webrtc { |
| namespace aec3 { |
| @@ -73,10 +74,13 @@ class MatchedFilter { |
| ~MatchedFilter(); |
| - // Updates the correlation with the values in render and capture. |
| - void Update(const std::array<float, kSubBlockSize>& render, |
| + // Updates the correlation with the values in the capture. |
|
ivoc
2017/03/31 13:58:31
I think it looks a bit strange now. I could live w
peah-webrtc
2017/04/03 08:02:33
Done.
|
| + void Update(const DownsampledRenderBuffer& render_buffer, |
| const std::array<float, kSubBlockSize>& capture); |
| + // Resets the matched filter. |
| + void Reset(); |
| + |
| // Returns the current lag estimates. |
| rtc::ArrayView<const MatchedFilter::LagEstimate> GetLagEstimates() const { |
| return lag_estimates_; |
| @@ -86,22 +90,11 @@ class MatchedFilter { |
| size_t NumLagEstimates() const { return filters_.size(); } |
| private: |
| - // Provides buffer with a related index. |
| - struct IndexedBuffer { |
| - explicit IndexedBuffer(size_t size); |
| - ~IndexedBuffer(); |
| - |
| - std::vector<float> data; |
| - int index = 0; |
| - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedBuffer); |
| - }; |
| - |
| ApmDataDumper* const data_dumper_; |
| const Aec3Optimization optimization_; |
| const size_t filter_intra_lag_shift_; |
| std::vector<std::vector<float>> filters_; |
| std::vector<LagEstimate> lag_estimates_; |
| - IndexedBuffer x_buffer_; |
| RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilter); |
| }; |