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

Side by Side Diff: webrtc/modules/audio_processing/aec3/matched_filter.h

Issue 3007833002: Further utilizing the AEC3 config struct for constants (Closed)
Patch Set: Created 3 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 float accuracy = 0.f; 76 float accuracy = 0.f;
77 bool reliable = false; 77 bool reliable = false;
78 size_t lag = 0; 78 size_t lag = 0;
79 bool updated = false; 79 bool updated = false;
80 }; 80 };
81 81
82 MatchedFilter(ApmDataDumper* data_dumper, 82 MatchedFilter(ApmDataDumper* data_dumper,
83 Aec3Optimization optimization, 83 Aec3Optimization optimization,
84 size_t window_size_sub_blocks, 84 size_t window_size_sub_blocks,
85 int num_matched_filters, 85 int num_matched_filters,
86 size_t alignment_shift_sub_blocks); 86 size_t alignment_shift_sub_blocks,
87 float excitation_limit);
87 88
88 ~MatchedFilter(); 89 ~MatchedFilter();
89 90
90 // Updates the correlation with the values in the capture buffer. 91 // Updates the correlation with the values in the capture buffer.
91 void Update(const DownsampledRenderBuffer& render_buffer, 92 void Update(const DownsampledRenderBuffer& render_buffer,
92 const std::array<float, kSubBlockSize>& capture); 93 const std::array<float, kSubBlockSize>& capture);
93 94
94 // Resets the matched filter. 95 // Resets the matched filter.
95 void Reset(); 96 void Reset();
96 97
97 // Returns the current lag estimates. 98 // Returns the current lag estimates.
98 rtc::ArrayView<const MatchedFilter::LagEstimate> GetLagEstimates() const { 99 rtc::ArrayView<const MatchedFilter::LagEstimate> GetLagEstimates() const {
99 return lag_estimates_; 100 return lag_estimates_;
100 } 101 }
101 102
102 // Returns the number of lag estimates produced using the shifted signals. 103 // Returns the number of lag estimates produced using the shifted signals.
103 size_t NumLagEstimates() const { return filters_.size(); } 104 size_t NumLagEstimates() const { return filters_.size(); }
104 105
105 private: 106 private:
106 ApmDataDumper* const data_dumper_; 107 ApmDataDumper* const data_dumper_;
107 const Aec3Optimization optimization_; 108 const Aec3Optimization optimization_;
108 const size_t filter_intra_lag_shift_; 109 const size_t filter_intra_lag_shift_;
109 std::vector<std::vector<float>> filters_; 110 std::vector<std::vector<float>> filters_;
110 std::vector<LagEstimate> lag_estimates_; 111 std::vector<LagEstimate> lag_estimates_;
112 const float excitation_limit_;
111 113
112 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilter); 114 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilter);
113 }; 115 };
114 116
115 } // namespace webrtc 117 } // namespace webrtc
116 118
117 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_ 119 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698