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

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

Issue 1844583003: Only split into bands when the reverse stream is analyzed in the APM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 4 years, 9 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_impl.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index a09c1c9acf3362f53cbd9f968ad5a4b6a5cf0932..9fd18fcb65eb1341071c3fdba527025ae737aea7 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1099,7 +1099,7 @@ VoiceDetection* AudioProcessingImpl::voice_detection() const {
return public_submodules_->voice_detection.get();
}
-bool AudioProcessingImpl::is_data_processed() const {
+bool AudioProcessingImpl::is_fwd_processed() const {
// The beamformer, noise suppressor and highpass filter
// modify the data.
if (capture_nonlocked_.beamformer_enabled ||
@@ -1119,16 +1119,16 @@ bool AudioProcessingImpl::output_copy_needed() const {
// Check if we've upmixed or downmixed the audio.
return ((formats_.api_format.output_stream().num_channels() !=
formats_.api_format.input_stream().num_channels()) ||
- is_data_processed() || capture_.transient_suppressor_enabled);
+ is_fwd_processed() || capture_.transient_suppressor_enabled);
}
bool AudioProcessingImpl::fwd_synthesis_needed() const {
- return (is_data_processed() &&
+ return (is_fwd_processed() &&
is_multi_band(capture_nonlocked_.fwd_proc_format.sample_rate_hz()));
}
bool AudioProcessingImpl::fwd_analysis_needed() const {
- if (!is_data_processed() &&
+ if (!is_fwd_processed() &&
!public_submodules_->voice_detection->is_enabled() &&
!capture_.transient_suppressor_enabled) {
// Only public_submodules_->level_estimator is enabled.
@@ -1152,7 +1152,11 @@ bool AudioProcessingImpl::rev_synthesis_needed() const {
}
bool AudioProcessingImpl::rev_analysis_needed() const {
- return is_multi_band(formats_.rev_proc_format.sample_rate_hz());
+ return is_multi_band(formats_.rev_proc_format.sample_rate_hz()) &&
+ (is_rev_processed() ||
+ public_submodules_->echo_cancellation->is_enabled() ||
+ public_submodules_->echo_control_mobile->is_enabled() ||
+ public_submodules_->gain_control->is_enabled());
}
bool AudioProcessingImpl::render_check_rev_conversion_needed() const {
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698