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

Unified Diff: webrtc/modules/audio_processing/aec3/matched_filter.h

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/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..b9580c48f9be3725fb31caecc86c834c8d89e0b3 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 buffer.
+ 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);
};

Powered by Google App Engine
This is Rietveld 408576698