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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 2784023002: Major AEC3 render pipeline changes (Closed)
Patch Set: Disabled one more DEATH test that caused issues due to bug on bots Created 3 years, 8 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 capture_nonlocked_.capture_processing_format = 562 capture_nonlocked_.capture_processing_format =
563 StreamConfig(capture_processing_rate); 563 StreamConfig(capture_processing_rate);
564 564
565 int render_processing_rate = FindNativeProcessRateToUse( 565 int render_processing_rate = FindNativeProcessRateToUse(
566 std::min(formats_.api_format.reverse_input_stream().sample_rate_hz(), 566 std::min(formats_.api_format.reverse_input_stream().sample_rate_hz(),
567 formats_.api_format.reverse_output_stream().sample_rate_hz()), 567 formats_.api_format.reverse_output_stream().sample_rate_hz()),
568 submodule_states_.CaptureMultiBandSubModulesActive() || 568 submodule_states_.CaptureMultiBandSubModulesActive() ||
569 submodule_states_.RenderMultiBandSubModulesActive()); 569 submodule_states_.RenderMultiBandSubModulesActive());
570 // TODO(aluebs): Remove this restriction once we figure out why the 3-band 570 // TODO(aluebs): Remove this restriction once we figure out why the 3-band
571 // splitting filter degrades the AEC performance. 571 // splitting filter degrades the AEC performance.
572 if (render_processing_rate > kSampleRate32kHz) { 572 if (render_processing_rate > kSampleRate32kHz &&
573 !config_.echo_canceller3.enabled) {
573 render_processing_rate = submodule_states_.RenderMultiBandProcessingActive() 574 render_processing_rate = submodule_states_.RenderMultiBandProcessingActive()
574 ? kSampleRate32kHz 575 ? kSampleRate32kHz
575 : kSampleRate16kHz; 576 : kSampleRate16kHz;
576 } 577 }
577 // If the forward sample rate is 8 kHz, the render stream is also processed 578 // If the forward sample rate is 8 kHz, the render stream is also processed
578 // at this rate. 579 // at this rate.
579 if (capture_nonlocked_.capture_processing_format.sample_rate_hz() == 580 if (capture_nonlocked_.capture_processing_format.sample_rate_hz() ==
580 kSampleRate8kHz) { 581 kSampleRate8kHz) {
581 render_processing_rate = kSampleRate8kHz; 582 render_processing_rate = kSampleRate8kHz;
582 } else { 583 } else {
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 #if WEBRTC_INTELLIGIBILITY_ENHANCER 1434 #if WEBRTC_INTELLIGIBILITY_ENHANCER
1434 if (capture_nonlocked_.intelligibility_enabled) { 1435 if (capture_nonlocked_.intelligibility_enabled) {
1435 public_submodules_->intelligibility_enhancer->ProcessRenderAudio( 1436 public_submodules_->intelligibility_enhancer->ProcessRenderAudio(
1436 render_buffer); 1437 render_buffer);
1437 } 1438 }
1438 #endif 1439 #endif
1439 1440
1440 QueueRenderAudio(render_buffer); 1441 QueueRenderAudio(render_buffer);
1441 // TODO(peah): Perform the queueing ínside QueueRenderAudiuo(). 1442 // TODO(peah): Perform the queueing ínside QueueRenderAudiuo().
1442 if (private_submodules_->echo_canceller3) { 1443 if (private_submodules_->echo_canceller3) {
1443 if (!private_submodules_->echo_canceller3->AnalyzeRender(render_buffer)) { 1444 private_submodules_->echo_canceller3->AnalyzeRender(render_buffer);
1444 // TODO(peah): Lock and empty render queue, and try again.
1445 }
1446 } 1445 }
1447 1446
1448 if (submodule_states_.RenderMultiBandProcessingActive() && 1447 if (submodule_states_.RenderMultiBandProcessingActive() &&
1449 SampleRateSupportsMultiBand( 1448 SampleRateSupportsMultiBand(
1450 formats_.render_processing_format.sample_rate_hz())) { 1449 formats_.render_processing_format.sample_rate_hz())) {
1451 render_buffer->MergeFrequencyBands(); 1450 render_buffer->MergeFrequencyBands();
1452 } 1451 }
1453 1452
1454 return kNoError; 1453 return kNoError;
1455 } 1454 }
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 capture_processing_format(kSampleRate16kHz), 1988 capture_processing_format(kSampleRate16kHz),
1990 split_rate(kSampleRate16kHz) {} 1989 split_rate(kSampleRate16kHz) {}
1991 1990
1992 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; 1991 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default;
1993 1992
1994 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; 1993 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default;
1995 1994
1996 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; 1995 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default;
1997 1996
1998 } // namespace webrtc 1997 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698