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

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

Issue 3007833002: Further utilizing the AEC3 config struct for constants (Closed)
Patch Set: Created 3 years, 4 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.cc
diff --git a/webrtc/modules/audio_processing/aec3/matched_filter.cc b/webrtc/modules/audio_processing/aec3/matched_filter.cc
index 4c6e0d70525ad9eba85cb52043d49b82751af999..5414cfcb31282d89d40854e5442bbce7863c9e84 100644
--- a/webrtc/modules/audio_processing/aec3/matched_filter.cc
+++ b/webrtc/modules/audio_processing/aec3/matched_filter.cc
@@ -291,13 +291,15 @@ MatchedFilter::MatchedFilter(ApmDataDumper* data_dumper,
Aec3Optimization optimization,
size_t window_size_sub_blocks,
int num_matched_filters,
- size_t alignment_shift_sub_blocks)
+ size_t alignment_shift_sub_blocks,
+ float excitation_limit)
: data_dumper_(data_dumper),
optimization_(optimization),
filter_intra_lag_shift_(alignment_shift_sub_blocks * kSubBlockSize),
filters_(num_matched_filters,
std::vector<float>(window_size_sub_blocks * kSubBlockSize, 0.f)),
- lag_estimates_(num_matched_filters) {
+ lag_estimates_(num_matched_filters),
+ excitation_limit_(excitation_limit) {
RTC_DCHECK(data_dumper);
RTC_DCHECK_LT(0, window_size_sub_blocks);
}
@@ -318,7 +320,8 @@ void MatchedFilter::Update(const DownsampledRenderBuffer& render_buffer,
const std::array<float, kSubBlockSize>& capture) {
const std::array<float, kSubBlockSize>& y = capture;
- const float x2_sum_threshold = filters_[0].size() * 150.f * 150.f;
+ const float x2_sum_threshold =
+ filters_[0].size() * excitation_limit_ * excitation_limit_;
// Apply all matched filters.
size_t alignment_shift = 0;
« no previous file with comments | « webrtc/modules/audio_processing/aec3/matched_filter.h ('k') | webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698