Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc

Issue 2784023002: Major AEC3 render pipeline changes (Closed)
Patch Set: Disabled one more DEATH test that caused issues due to bug on bots Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
diff --git a/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc b/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
index 6472bcb1fb034ce446abcf4a48ac09cd4e8bf8e6..be6a2aacc1560d81f0efcce7434a82eba385a4b9 100644
--- a/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
+++ b/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
@@ -21,11 +21,6 @@ namespace webrtc {
namespace {
-constexpr size_t kNumMatchedFilters = 4;
-constexpr size_t kMatchedFilterWindowSizeSubBlocks = 32;
-constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks =
- kMatchedFilterWindowSizeSubBlocks * 3 / 4;
-
constexpr int kDownSamplingFactor = 4;
} // namespace
@@ -43,19 +38,19 @@ EchoPathDelayEstimator::EchoPathDelayEstimator(ApmDataDumper* data_dumper)
EchoPathDelayEstimator::~EchoPathDelayEstimator() = default;
+void EchoPathDelayEstimator::Reset() {
+ matched_filter_lag_aggregator_.Reset();
+ matched_filter_.Reset();
+}
+
rtc::Optional<size_t> EchoPathDelayEstimator::EstimateDelay(
- rtc::ArrayView<const float> render,
+ const DownsampledRenderBuffer& render_buffer,
rtc::ArrayView<const float> capture) {
RTC_DCHECK_EQ(kBlockSize, capture.size());
- RTC_DCHECK_EQ(render.size(), capture.size());
- std::array<float, kSubBlockSize> downsampled_render;
std::array<float, kSubBlockSize> downsampled_capture;
-
- render_decimator_.Decimate(render, &downsampled_render);
- capture_decimator_.Decimate(capture, &downsampled_capture);
-
- matched_filter_.Update(downsampled_render, downsampled_capture);
+ capture_decimator_.Decimate(capture, downsampled_capture);
+ matched_filter_.Update(render_buffer, downsampled_capture);
rtc::Optional<size_t> aggregated_matched_filter_lag =
matched_filter_lag_aggregator_.Aggregate(

Powered by Google App Engine
This is Rietveld 408576698