Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 764 private_submodules_->agc_manager->AnalyzePreProcess( | 764 private_submodules_->agc_manager->AnalyzePreProcess( |
| 765 ca->channels()[0], ca->num_channels(), | 765 ca->channels()[0], ca->num_channels(), |
| 766 capture_nonlocked_.fwd_proc_format.num_frames()); | 766 capture_nonlocked_.fwd_proc_format.num_frames()); |
| 767 } | 767 } |
| 768 | 768 |
| 769 bool data_processed = is_data_processed(); | 769 bool data_processed = is_data_processed(); |
| 770 if (analysis_needed(data_processed)) { | 770 if (analysis_needed(data_processed)) { |
| 771 ca->SplitIntoFrequencyBands(); | 771 ca->SplitIntoFrequencyBands(); |
| 772 } | 772 } |
| 773 | 773 |
| 774 if (constants_.intelligibility_enabled) { | |
| 775 public_submodules_->intelligibility_enhancer->AnalyzeCaptureAudio( | |
| 776 ca->split_channels_f(kBand0To8kHz), capture_nonlocked_.split_rate, | |
| 777 ca->num_channels()); | |
| 778 } | |
| 779 | |
| 780 if (capture_nonlocked_.beamformer_enabled) { | 774 if (capture_nonlocked_.beamformer_enabled) { |
| 781 private_submodules_->beamformer->ProcessChunk(*ca->split_data_f(), | 775 private_submodules_->beamformer->ProcessChunk(*ca->split_data_f(), |
| 782 ca->split_data_f()); | 776 ca->split_data_f()); |
| 783 ca->set_num_channels(1); | 777 ca->set_num_channels(1); |
| 784 } | 778 } |
| 785 | 779 |
| 786 public_submodules_->high_pass_filter->ProcessCaptureAudio(ca); | 780 public_submodules_->high_pass_filter->ProcessCaptureAudio(ca); |
| 787 RETURN_ON_ERR(public_submodules_->gain_control->AnalyzeCaptureAudio(ca)); | 781 RETURN_ON_ERR(public_submodules_->gain_control->AnalyzeCaptureAudio(ca)); |
| 788 public_submodules_->noise_suppression->AnalyzeCaptureAudio(ca); | 782 public_submodules_->noise_suppression->AnalyzeCaptureAudio(ca); |
| 789 RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio(ca)); | 783 RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio(ca)); |
| 790 | 784 |
| 791 if (public_submodules_->echo_control_mobile->is_enabled() && | 785 if (public_submodules_->echo_control_mobile->is_enabled() && |
| 792 public_submodules_->noise_suppression->is_enabled()) { | 786 public_submodules_->noise_suppression->is_enabled()) { |
| 793 ca->CopyLowPassToReference(); | 787 ca->CopyLowPassToReference(); |
| 794 } | 788 } |
| 795 public_submodules_->noise_suppression->ProcessCaptureAudio(ca); | 789 public_submodules_->noise_suppression->ProcessCaptureAudio(ca); |
| 790 if (constants_.intelligibility_enabled && | |
| 791 public_submodules_->noise_suppression->is_enabled()) { | |
|
turaj
2016/02/09 16:40:33
Can we have noise estimation part of NS to be auto
aluebs-webrtc
2016/02/09 19:13:35
I thought about pulling out the noise-estimation f
hlundin-webrtc
2016/02/09 19:25:03
You could add a (D)CHECK in a strategic position t
aluebs-webrtc
2016/02/09 23:09:09
Done.
| |
| 792 public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate( | |
| 793 public_submodules_->noise_suppression->noise_estimate()); | |
| 794 } | |
| 796 RETURN_ON_ERR( | 795 RETURN_ON_ERR( |
| 797 public_submodules_->echo_control_mobile->ProcessCaptureAudio(ca)); | 796 public_submodules_->echo_control_mobile->ProcessCaptureAudio(ca)); |
| 798 public_submodules_->voice_detection->ProcessCaptureAudio(ca); | 797 public_submodules_->voice_detection->ProcessCaptureAudio(ca); |
| 799 | 798 |
| 800 if (constants_.use_new_agc && | 799 if (constants_.use_new_agc && |
| 801 public_submodules_->gain_control->is_enabled() && | 800 public_submodules_->gain_control->is_enabled() && |
| 802 (!capture_nonlocked_.beamformer_enabled || | 801 (!capture_nonlocked_.beamformer_enabled || |
| 803 private_submodules_->beamformer->is_target_present())) { | 802 private_submodules_->beamformer->is_target_present())) { |
| 804 private_submodules_->agc_manager->Process( | 803 private_submodules_->agc_manager->Process( |
| 805 ca->split_bands_const(0)[kBand0To8kHz], ca->num_frames_per_band(), | 804 ca->split_bands_const(0)[kBand0To8kHz], ca->num_frames_per_band(), |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1543 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1542 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
| 1544 | 1543 |
| 1545 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1544 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1546 &debug_dump_.num_bytes_left_for_log_, | 1545 &debug_dump_.num_bytes_left_for_log_, |
| 1547 &crit_debug_, &debug_dump_.capture)); | 1546 &crit_debug_, &debug_dump_.capture)); |
| 1548 return kNoError; | 1547 return kNoError; |
| 1549 } | 1548 } |
| 1550 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1549 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1551 | 1550 |
| 1552 } // namespace webrtc | 1551 } // namespace webrtc |
| OLD | NEW |