AEC3: Correct peak index at filter size reductions
Bug: chromium:1061933 Change-Id: I70745b82de1d8878d4a789c86af6a44e652c3e9e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172420 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30947}
This commit is contained in:
parent
d2aa8f97f1
commit
4b425aeef9
@ -116,12 +116,12 @@ void FilterAnalyzer::AnalyzeRegion(
|
||||
constexpr float kOneByBlockSize = 1.f / kBlockSize;
|
||||
for (size_t ch = 0; ch < filters_time_domain.size(); ++ch) {
|
||||
RTC_DCHECK_LT(region_.start_sample_, filters_time_domain[ch].size());
|
||||
RTC_DCHECK_LT(filter_analysis_states_[ch].peak_index,
|
||||
filters_time_domain[0].size());
|
||||
RTC_DCHECK_LT(region_.end_sample_, filters_time_domain[ch].size());
|
||||
|
||||
auto& st_ch = filter_analysis_states_[ch];
|
||||
RTC_DCHECK_EQ(h_highpass_[ch].size(), filters_time_domain[ch].size());
|
||||
RTC_DCHECK_GT(h_highpass_[ch].size(), 0);
|
||||
st_ch.peak_index = std::min(st_ch.peak_index, h_highpass_[ch].size() - 1);
|
||||
|
||||
st_ch.peak_index =
|
||||
FindPeakIndex(h_highpass_[ch], st_ch.peak_index, region_.start_sample_,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user