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

Unified Diff: webrtc/modules/audio_processing/splitting_filter.cc

Issue 1982183002: Pull out the PostFilter to its own NonlinearBeamformer API (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change Beamformer::ProcessChunk() to have one parameter Created 4 years, 7 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/splitting_filter.cc
diff --git a/webrtc/modules/audio_processing/splitting_filter.cc b/webrtc/modules/audio_processing/splitting_filter.cc
index e87a7f86218b9fd50c8fe109f55b128f8af7d04b..b6f642c09d4db448b320748538d485bd731d6449 100644
--- a/webrtc/modules/audio_processing/splitting_filter.cc
+++ b/webrtc/modules/audio_processing/splitting_filter.cc
@@ -72,8 +72,8 @@ void SplittingFilter::TwoBandsAnalysis(const IFChannelBuffer* data,
void SplittingFilter::TwoBandsSynthesis(const IFChannelBuffer* bands,
IFChannelBuffer* data) {
- RTC_DCHECK_EQ(two_bands_states_.size(), data->num_channels());
- for (size_t i = 0; i < two_bands_states_.size(); ++i) {
+ RTC_DCHECK_LE(data->num_channels(), two_bands_states_.size());
peah-webrtc 2016/06/01 14:51:01 Could you please explain why this change is needed
aluebs-webrtc 2016/06/01 22:13:20 When there is a change in number of channels betwe
peah-webrtc 2016/06/08 12:04:55 Do you mean that before this CL, the size in the c
aluebs-webrtc 2016/06/09 02:11:46 No. This was a bug. Before this CL the number of c
peah-webrtc 2016/06/09 09:36:30 Great find!! It would, however, be good to have th
aluebs-webrtc 2016/06/09 19:21:41 1) It is related to the Beamformer, since... 2) It
+ for (size_t i = 0; i < data->num_channels(); ++i) {
peah-webrtc 2016/06/01 14:51:01 Could you please explain why this change is needed
aluebs-webrtc 2016/06/01 22:13:20 Please see above.
WebRtcSpl_SynthesisQMF(bands->ibuf_const()->channels(0)[i],
bands->ibuf_const()->channels(1)[i],
bands->num_frames_per_band(),
@@ -95,8 +95,8 @@ void SplittingFilter::ThreeBandsAnalysis(const IFChannelBuffer* data,
void SplittingFilter::ThreeBandsSynthesis(const IFChannelBuffer* bands,
IFChannelBuffer* data) {
- RTC_DCHECK_EQ(three_band_filter_banks_.size(), data->num_channels());
- for (size_t i = 0; i < three_band_filter_banks_.size(); ++i) {
+ RTC_DCHECK_LE(data->num_channels(), three_band_filter_banks_.size());
peah-webrtc 2016/06/01 14:51:01 Could you please explain why this change is needed
aluebs-webrtc 2016/06/01 22:13:20 Please see above.
+ for (size_t i = 0; i < data->num_channels(); ++i) {
three_band_filter_banks_[i]->Synthesis(bands->fbuf_const()->bands(i),
bands->num_frames_per_band(),
data->fbuf()->channels()[i]);

Powered by Google App Engine
This is Rietveld 408576698