summaryrefslogtreecommitdiff
path: root/chromium/third_party/webrtc/modules/audio_processing
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 15:06:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:48:58 +0000
commitdaa093eea7c773db06799a13bd7e4e2e2a9f8f14 (patch)
tree96cc5e7b9194c1b29eab927730bfa419e7111c25 /chromium/third_party/webrtc/modules/audio_processing
parentbe59a35641616a4cf23c4a13fa0632624b021c1b (diff)
downloadqtwebengine-chromium-daa093eea7c773db06799a13bd7e4e2e2a9f8f14.tar.gz
BASELINE: Update Chromium to 63.0.3239.58
Change-Id: Ia93b322a00ba4dd4004f3bcf1254063ba90e1605 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/webrtc/modules/audio_processing')
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/BUILD.gn44
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/DEPS9
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_common.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.cc28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_sse2.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.cc217
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.h30
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc22
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_unittest.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.h60
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc17
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc13
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.cc58
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.h18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc24
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc76
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h22
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc50
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc25
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h21
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc23
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.h30
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_output.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc114
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_integration_test.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.cc21
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.cc29
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_defines.h4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/agc.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/agc.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/gain_map_internal.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.c4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.c19
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/legacy/gain_control.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/mock_agc.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/utility.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/utility.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_buffer_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc143
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h143
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_unittest.cc85
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_test.cc38
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/common.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/config_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h34
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h26
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h42
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h83
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/config.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/config.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc18
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc46
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.cc30
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.h24
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc26
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_constants.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc42
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.cc14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_estimator_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/low_cut_filter_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h22
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/noise_suppression_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/defines.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.c8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.c4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_defines.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/windows_private.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/render_queue_item_verifier.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.cc14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_complexity_unittest.cc24
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/rms_level.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/rms_level.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/rms_level_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/splitting_filter_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc43
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.h17
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.cc65
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.h27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/audioproc_float.cc364
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator.cc47
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc26
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.h14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_test.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.cc154
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.h75
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc231
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/BUILD.gn7
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/README.md42
-rwxr-xr-xchromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py48
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_boxplot.py146
-rwxr-xr-xchromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_export.py237
-rwxr-xr-xchromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py179
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/audioproc_wrapper.py28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/collect_data.py241
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/data_access.py31
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py101
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_factory.py12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py50
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py17
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/fake_polqa.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_signal_creator.py26
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing.py90
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing_unittest.py109
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation.py72
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation_unittest.py72
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py49
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_factory.py17
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/test_utils.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/test_utils.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/unpack.cc92
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.h11
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/click_annotate.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/common.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/file_utils_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc14
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppression_test.cc105
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/typing_detection.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_internal.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_mips.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/common.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/gmm.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/gmm.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/gmm_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/noise_gmm_tables.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.cc12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.cc22
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/vad/voice_gmm_tables.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/voice_detection_unittest.cc12
435 files changed, 4750 insertions, 3198 deletions
diff --git a/chromium/third_party/webrtc/modules/audio_processing/BUILD.gn b/chromium/third_party/webrtc/modules/audio_processing/BUILD.gn
index a569bd10062..dd2ded69458 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/BUILD.gn
+++ b/chromium/third_party/webrtc/modules/audio_processing/BUILD.gn
@@ -237,6 +237,8 @@ rtc_static_library("audio_processing") {
":aec_dump_interface",
"..:module_api",
"../..:webrtc_common",
+ "../../api:array_view",
+ "../../api:optional",
"../../audio/utility:audio_frame_operations",
"../../rtc_base:gtest_prod",
"../../rtc_base:protobuf_utils",
@@ -316,6 +318,7 @@ rtc_source_set("aec_dump_interface") {
]
deps = [
+ "../../api:array_view",
"../../rtc_base:rtc_base_approved",
]
}
@@ -372,7 +375,7 @@ if (rtc_enable_protobuf) {
"debug.proto",
]
- proto_out_dir = "webrtc/modules/audio_processing"
+ proto_out_dir = "modules/audio_processing"
}
}
@@ -494,6 +497,7 @@ if (rtc_include_tests) {
":audioproc_f",
":audioproc_unittest_proto",
":unpack_aecdump",
+ "aec_dump:aec_dump_unittests",
"test/conversational_speech",
"test/py_quality_assessment",
]
@@ -524,6 +528,7 @@ if (rtc_include_tests) {
"config_unittest.cc",
"echo_cancellation_impl_unittest.cc",
"splitting_filter_unittest.cc",
+ "test/fake_recording_device_unittest.cc",
"transient/dyadic_decimator_unittest.cc",
"transient/file_utils.cc",
"transient/file_utils.h",
@@ -546,10 +551,13 @@ if (rtc_include_tests) {
]
deps = [
+ ":analog_mic_simulation",
":audio_processing",
":audioproc_test_utils",
"..:module_api",
"../..:webrtc_common",
+ "../../api:array_view",
+ "../../api:optional",
"../../common_audio:common_audio",
"../../rtc_base:gtest_prod",
"../../rtc_base:protobuf_utils",
@@ -593,6 +601,7 @@ if (rtc_include_tests) {
deps += [
":audioproc_debug_proto",
":audioproc_protobuf_utils",
+ ":audioproc_test_utils",
":audioproc_unittest_proto",
"../../rtc_base:rtc_task_queue",
"aec_dump",
@@ -650,8 +659,6 @@ if (rtc_include_tests) {
"noise_suppression_unittest.cc",
"residual_echo_detector_unittest.cc",
"rms_level_unittest.cc",
- "test/bitexactness_tools.cc",
- "test/bitexactness_tools.h",
"test/debug_dump_replayer.cc",
"test/debug_dump_replayer.h",
"test/debug_dump_test.cc",
@@ -707,6 +714,19 @@ if (rtc_include_tests) {
}
}
+ rtc_source_set("analog_mic_simulation") {
+ sources = [
+ "test/fake_recording_device.cc",
+ "test/fake_recording_device.h",
+ ]
+ deps = [
+ "../../api:array_view",
+ "../../common_audio:common_audio",
+ "../../modules:module_api",
+ "../../rtc_base:rtc_base_approved",
+ ]
+ }
+
if (rtc_enable_protobuf) {
rtc_executable("unpack_aecdump") {
testonly = true
@@ -724,7 +744,6 @@ if (rtc_include_tests) {
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
"../../system_wrappers:system_wrappers_default",
- "//third_party/gflags:gflags",
]
} # unpack_aecdump
@@ -741,10 +760,12 @@ if (rtc_include_tests) {
]
deps = [
+ ":analog_mic_simulation",
":audio_processing",
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
+ "../../api:optional",
"../../common_audio:common_audio",
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
@@ -755,7 +776,6 @@ if (rtc_include_tests) {
"aec_dump",
"aec_dump:aec_dump_impl",
"//testing/gtest",
- "//third_party/gflags:gflags",
]
} # audioproc_f
}
@@ -765,6 +785,8 @@ if (rtc_include_tests) {
sources = [
"test/audio_buffer_tools.cc",
"test/audio_buffer_tools.h",
+ "test/bitexactness_tools.cc",
+ "test/bitexactness_tools.h",
"test/performance_timer.cc",
"test/performance_timer.h",
"test/simulator_buffers.cc",
@@ -776,9 +798,14 @@ if (rtc_include_tests) {
deps = [
":audio_processing",
"..:module_api",
+ "../../api:array_view",
+ "../../api:optional",
"../../common_audio",
"../../rtc_base:rtc_base_approved",
"../../system_wrappers:system_wrappers",
+ "../../test:test_support",
+ "../audio_coding:neteq_tools",
+ "//testing/gtest",
]
}
@@ -794,11 +821,11 @@ if (rtc_include_tests) {
"..:module_api",
"../..:webrtc_common",
"../../common_audio:common_audio",
+ "../../rtc_base:rtc_base_approved",
"../../system_wrappers:metrics_default",
"../../system_wrappers:system_wrappers",
"../../test:test_support",
"//testing/gtest",
- "//third_party/gflags",
]
}
@@ -828,7 +855,6 @@ if (rtc_include_tests) {
"../../common_audio:common_audio",
"../../rtc_base:rtc_base_approved",
"../../system_wrappers:metrics_default",
- "//third_party/gflags",
]
}
@@ -841,10 +867,10 @@ if (rtc_include_tests) {
deps = [
":audio_processing",
":audioproc_test_utils",
+ "../../rtc_base:rtc_base_approved",
"../../system_wrappers:metrics_default",
"../../test:test_support",
"//testing/gtest",
- "//third_party/gflags",
]
}
}
@@ -854,7 +880,7 @@ if (rtc_include_tests) {
sources = [
"test/unittest.proto",
]
- proto_out_dir = "webrtc/modules/audio_processing/test"
+ proto_out_dir = "modules/audio_processing/test"
}
rtc_static_library("audioproc_protobuf_utils") {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/DEPS b/chromium/third_party/webrtc/modules/audio_processing/DEPS
index 9b588d0936d..79fd0717856 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/DEPS
+++ b/chromium/third_party/webrtc/modules/audio_processing/DEPS
@@ -1,13 +1,12 @@
include_rules = [
- "+webrtc/audio/utility/audio_frame_operations.h",
- "+webrtc/base",
- "+webrtc/common_audio",
- "+webrtc/system_wrappers",
+ "+audio/utility/audio_frame_operations.h",
+ "+common_audio",
+ "+system_wrappers",
]
specific_include_rules = {
".*test\.cc": [
- "+webrtc/rtc_tools",
+ "+rtc_tools",
# Android platform build has different paths.
"+gtest",
"+external/webrtc",
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_common.h b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_common.h
index 0e3cddeb4c6..80c5c14813b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_common.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#ifdef _MSC_VER /* visual c++ */
#define ALIGN16_BEG __declspec(align(16))
@@ -36,4 +36,4 @@ extern const float WebRtcAec_kMinFarendPSD;
} // namespace webrtc
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.cc
index 0eec22f4e5e..c9bd7d36856 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.cc
@@ -12,7 +12,7 @@
* The core AEC algorithm, which is presented with time-aligned signals.
*/
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/aec_core.h"
#include <algorithm>
#include <math.h>
@@ -20,19 +20,19 @@
#include <stdlib.h>
#include <string.h>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-}
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/aec/aec_common.h"
-#include "webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/system_wrappers/include/metrics.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/ring_buffer.h"
+}
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/aec/aec_common.h"
+#include "modules/audio_processing/aec/aec_core_optimized_methods.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "rtc_base/checks.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "system_wrappers/include/metrics.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace {
@@ -836,8 +836,6 @@ static void UpdateDelayMetrics(AecCore* self) {
// Reset histogram.
memset(self->delay_histogram, 0, sizeof(self->delay_histogram));
self->num_delay_values = 0;
-
- return;
}
static void ScaledInverseFft(const OouraFft& ooura_fft,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h
index 9a4c2419156..78596ec4b45 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h
@@ -12,22 +12,22 @@
* Specifies the interface for the AEC core.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
+#define MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
#include <stddef.h>
#include <memory>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
+#include "common_audio/ring_buffer.h"
}
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/aec/aec_common.h"
-#include "webrtc/modules/audio_processing/utility/block_mean_calculator.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/aec/aec_common.h"
+#include "modules/audio_processing/utility/block_mean_calculator.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
+#include "rtc_base/constructormagic.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -332,4 +332,4 @@ void WebRtcAec_SetSystemDelay(AecCore* self, int delay);
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.cc
index 93f075b8302..ebe6349e935 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.cc
@@ -12,15 +12,15 @@
* The core AEC algorithm, which is presented with time-aligned signals.
*/
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/aec_core.h"
#include <math.h>
extern "C" {
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/aec/aec_core_optimized_methods.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.cc
index 4995ebf5d36..1fbf56b8b67 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.cc
@@ -19,11 +19,11 @@
#include <string.h> // memset
extern "C" {
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aec/aec_common.h"
-#include "webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/aec/aec_common.h"
+#include "modules/audio_processing/aec/aec_core_optimized_methods.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h
index 5e873c8c805..a8a20e94d89 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
+#define MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
#include <memory>
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -77,4 +77,4 @@ extern WebRtcAecWindowData WebRtcAec_WindowData;
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_sse2.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
index ac93919a773..0532662bed1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
@@ -17,11 +17,11 @@
#include <string.h> // memset
extern "C" {
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aec/aec_common.h"
-#include "webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/aec/aec_common.h"
+#include "modules/audio_processing/aec/aec_core_optimized_methods.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.cc
index 174fd20c345..2851c0b6dd5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.cc
@@ -12,14 +12,14 @@
* clock skew by resampling the farend signal.
*/
-#include "webrtc/modules/audio_processing/aec/aec_resampler.h"
+#include "modules/audio_processing/aec/aec_resampler.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "rtc_base/checks.h"
namespace webrtc {
@@ -37,7 +37,7 @@ typedef struct {
static int EstimateSkew(const int* rawSkew,
int size,
- int absLimit,
+ int deviceSampleRateHz,
float* skewEst);
void* WebRtcAec_CreateResampler() {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.h b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.h
index 3a7400b010f..130f7ec7c76 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/aec_resampler.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
+#define MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/aec_core.h"
namespace webrtc {
@@ -36,4 +36,4 @@ void WebRtcAec_ResampleLinear(void* resampInst,
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.cc
index 9261632c17d..864db5308e6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.cc
@@ -11,20 +11,20 @@
/*
* Contains the API functions for the AEC.
*/
-#include "webrtc/modules/audio_processing/aec/echo_cancellation.h"
+#include "modules/audio_processing/aec/echo_cancellation.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/ring_buffer.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/modules/audio_processing/aec/aec_resampler.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/aec_resampler.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -105,15 +105,15 @@ int Aec::instance_count = 0;
// (controlled by knownDelay)
static void EstBufDelayNormal(Aec* aecInst);
static void EstBufDelayExtended(Aec* aecInst);
-static int ProcessNormal(Aec* self,
- const float* const* near,
+static int ProcessNormal(Aec* aecInst,
+ const float* const* nearend,
size_t num_bands,
float* const* out,
size_t num_samples,
int16_t reported_delay_ms,
int32_t skew);
-static void ProcessExtended(Aec* self,
- const float* const* near,
+static void ProcessExtended(Aec* aecInst,
+ const float* const* nearend,
size_t num_bands,
float* const* out,
size_t num_samples,
@@ -531,12 +531,12 @@ AecCore* WebRtcAec_aec_core(void* handle) {
return reinterpret_cast<Aec*>(handle)->aec;
}
-static int ProcessNormal(Aec* aecpc,
+static int ProcessNormal(Aec* aecInst,
const float* const* nearend,
size_t num_bands,
float* const* out,
- size_t nrOfSamples,
- int16_t msInSndCardBuf,
+ size_t num_samples,
+ int16_t reported_delay_ms,
int32_t skew) {
int retVal = 0;
size_t i;
@@ -545,47 +545,48 @@ static int ProcessNormal(Aec* aecpc,
const float minSkewEst = -0.5f;
const float maxSkewEst = 1.0f;
- msInSndCardBuf =
- msInSndCardBuf > kMaxTrustedDelayMs ? kMaxTrustedDelayMs : msInSndCardBuf;
+ reported_delay_ms =
+ reported_delay_ms > kMaxTrustedDelayMs ? kMaxTrustedDelayMs :
+ reported_delay_ms;
// TODO(andrew): we need to investigate if this +10 is really wanted.
- msInSndCardBuf += 10;
- aecpc->msInSndCardBuf = msInSndCardBuf;
+ reported_delay_ms += 10;
+ aecInst->msInSndCardBuf = reported_delay_ms;
- if (aecpc->skewMode == kAecTrue) {
- if (aecpc->skewFrCtr < 25) {
- aecpc->skewFrCtr++;
+ if (aecInst->skewMode == kAecTrue) {
+ if (aecInst->skewFrCtr < 25) {
+ aecInst->skewFrCtr++;
} else {
- retVal = WebRtcAec_GetSkew(aecpc->resampler, skew, &aecpc->skew);
+ retVal = WebRtcAec_GetSkew(aecInst->resampler, skew, &aecInst->skew);
if (retVal == -1) {
- aecpc->skew = 0;
+ aecInst->skew = 0;
retVal = AEC_BAD_PARAMETER_WARNING;
}
- aecpc->skew /= aecpc->sampFactor * nrOfSamples;
+ aecInst->skew /= aecInst->sampFactor * num_samples;
- if (aecpc->skew < 1.0e-3 && aecpc->skew > -1.0e-3) {
- aecpc->resample = kAecFalse;
+ if (aecInst->skew < 1.0e-3 && aecInst->skew > -1.0e-3) {
+ aecInst->resample = kAecFalse;
} else {
- aecpc->resample = kAecTrue;
+ aecInst->resample = kAecTrue;
}
- if (aecpc->skew < minSkewEst) {
- aecpc->skew = minSkewEst;
- } else if (aecpc->skew > maxSkewEst) {
- aecpc->skew = maxSkewEst;
+ if (aecInst->skew < minSkewEst) {
+ aecInst->skew = minSkewEst;
+ } else if (aecInst->skew > maxSkewEst) {
+ aecInst->skew = maxSkewEst;
}
- aecpc->data_dumper->DumpRaw("aec_skew", 1, &aecpc->skew);
+ aecInst->data_dumper->DumpRaw("aec_skew", 1, &aecInst->skew);
}
}
- nBlocks10ms = nrOfSamples / (FRAME_LEN * aecpc->rate_factor);
+ nBlocks10ms = num_samples / (FRAME_LEN * aecInst->rate_factor);
- if (aecpc->startup_phase) {
+ if (aecInst->startup_phase) {
for (i = 0; i < num_bands; ++i) {
// Only needed if they don't already point to the same place.
if (nearend[i] != out[i]) {
- memcpy(out[i], nearend[i], sizeof(nearend[i][0]) * nrOfSamples);
+ memcpy(out[i], nearend[i], sizeof(nearend[i][0]) * num_samples);
}
}
@@ -593,82 +594,83 @@ static int ProcessNormal(Aec* aecpc,
// AEC is disabled until the system delay is OK
// Mechanism to ensure that the system delay is reasonably stable.
- if (aecpc->checkBuffSize) {
- aecpc->checkBufSizeCtr++;
+ if (aecInst->checkBuffSize) {
+ aecInst->checkBufSizeCtr++;
// Before we fill up the far-end buffer we require the system delay
// to be stable (+/-8 ms) compared to the first value. This
// comparison is made during the following 6 consecutive 10 ms
// blocks. If it seems to be stable then we start to fill up the
// far-end buffer.
- if (aecpc->counter == 0) {
- aecpc->firstVal = aecpc->msInSndCardBuf;
- aecpc->sum = 0;
+ if (aecInst->counter == 0) {
+ aecInst->firstVal = aecInst->msInSndCardBuf;
+ aecInst->sum = 0;
}
- if (abs(aecpc->firstVal - aecpc->msInSndCardBuf) <
- WEBRTC_SPL_MAX(0.2 * aecpc->msInSndCardBuf, sampMsNb)) {
- aecpc->sum += aecpc->msInSndCardBuf;
- aecpc->counter++;
+ if (abs(aecInst->firstVal - aecInst->msInSndCardBuf) <
+ WEBRTC_SPL_MAX(0.2 * aecInst->msInSndCardBuf, sampMsNb)) {
+ aecInst->sum += aecInst->msInSndCardBuf;
+ aecInst->counter++;
} else {
- aecpc->counter = 0;
+ aecInst->counter = 0;
}
- if (aecpc->counter * nBlocks10ms >= 6) {
+ if (aecInst->counter * nBlocks10ms >= 6) {
// The far-end buffer size is determined in partitions of
// PART_LEN samples. Use 75% of the average value of the system
// delay as buffer size to start with.
- aecpc->bufSizeStart =
- WEBRTC_SPL_MIN((3 * aecpc->sum * aecpc->rate_factor * 8) /
- (4 * aecpc->counter * PART_LEN),
+ aecInst->bufSizeStart =
+ WEBRTC_SPL_MIN((3 * aecInst->sum * aecInst->rate_factor * 8) /
+ (4 * aecInst->counter * PART_LEN),
kMaxBufSizeStart);
// Buffer size has now been determined.
- aecpc->checkBuffSize = 0;
+ aecInst->checkBuffSize = 0;
}
- if (aecpc->checkBufSizeCtr * nBlocks10ms > 50) {
+ if (aecInst->checkBufSizeCtr * nBlocks10ms > 50) {
// For really bad systems, don't disable the echo canceller for
// more than 0.5 sec.
- aecpc->bufSizeStart = WEBRTC_SPL_MIN(
- (aecpc->msInSndCardBuf * aecpc->rate_factor * 3) / 40,
+ aecInst->bufSizeStart = WEBRTC_SPL_MIN(
+ (aecInst->msInSndCardBuf * aecInst->rate_factor * 3) / 40,
kMaxBufSizeStart);
- aecpc->checkBuffSize = 0;
+ aecInst->checkBuffSize = 0;
}
}
// If |checkBuffSize| changed in the if-statement above.
- if (!aecpc->checkBuffSize) {
+ if (!aecInst->checkBuffSize) {
// The system delay is now reasonably stable (or has been unstable
// for too long). When the far-end buffer is filled with
// approximately the same amount of data as reported by the system
// we end the startup phase.
int overhead_elements =
- WebRtcAec_system_delay(aecpc->aec) / PART_LEN - aecpc->bufSizeStart;
+ WebRtcAec_system_delay(aecInst->aec) / PART_LEN -
+ aecInst->bufSizeStart;
if (overhead_elements == 0) {
// Enable the AEC
- aecpc->startup_phase = 0;
+ aecInst->startup_phase = 0;
} else if (overhead_elements > 0) {
// TODO(bjornv): Do we need a check on how much we actually
// moved the read pointer? It should always be possible to move
// the pointer |overhead_elements| since we have only added data
// to the buffer and no delay compensation nor AEC processing
// has been done.
- WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecpc->aec,
+ WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecInst->aec,
overhead_elements);
// Enable the AEC
- aecpc->startup_phase = 0;
+ aecInst->startup_phase = 0;
}
}
} else {
// AEC is enabled.
- EstBufDelayNormal(aecpc);
+ EstBufDelayNormal(aecInst);
// Call the AEC.
// TODO(bjornv): Re-structure such that we don't have to pass
- // |aecpc->knownDelay| as input. Change name to something like
+ // |aecInst->knownDelay| as input. Change name to something like
// |system_buffer_diff|.
- WebRtcAec_ProcessFrames(aecpc->aec, nearend, num_bands, nrOfSamples,
- aecpc->knownDelay, out);
+ WebRtcAec_ProcessFrames(aecInst->aec, nearend, num_bands, num_samples,
+ aecInst->knownDelay, out);
}
return retVal;
@@ -749,9 +751,9 @@ static void ProcessExtended(Aec* self,
}
}
-static void EstBufDelayNormal(Aec* aecpc) {
- int nSampSndCard = aecpc->msInSndCardBuf * sampMsNb * aecpc->rate_factor;
- int current_delay = nSampSndCard - WebRtcAec_system_delay(aecpc->aec);
+static void EstBufDelayNormal(Aec* aecInst) {
+ int nSampSndCard = aecInst->msInSndCardBuf * sampMsNb * aecInst->rate_factor;
+ int current_delay = nSampSndCard - WebRtcAec_system_delay(aecInst->aec);
int delay_difference = 0;
// Before we proceed with the delay estimate filtering we:
@@ -761,54 +763,55 @@ static void EstBufDelayNormal(Aec* aecpc) {
// be negative.
// 1) Compensating for the frame(s) that will be read/processed.
- current_delay += FRAME_LEN * aecpc->rate_factor;
+ current_delay += FRAME_LEN * aecInst->rate_factor;
// 2) Account for resampling frame delay.
- if (aecpc->skewMode == kAecTrue && aecpc->resample == kAecTrue) {
+ if (aecInst->skewMode == kAecTrue && aecInst->resample == kAecTrue) {
current_delay -= kResamplingDelay;
}
// 3) Compensate for non-causality, if needed, by flushing one block.
if (current_delay < PART_LEN) {
current_delay +=
- WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecpc->aec, 1) *
+ WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecInst->aec, 1) *
PART_LEN;
}
// We use -1 to signal an initialized state in the "extended" implementation;
// compensate for that.
- aecpc->filtDelay = aecpc->filtDelay < 0 ? 0 : aecpc->filtDelay;
- aecpc->filtDelay =
+ aecInst->filtDelay = aecInst->filtDelay < 0 ? 0 : aecInst->filtDelay;
+ aecInst->filtDelay =
WEBRTC_SPL_MAX(0, static_cast<int16_t>(0.8 *
- aecpc->filtDelay +
+ aecInst->filtDelay +
0.2 * current_delay));
- delay_difference = aecpc->filtDelay - aecpc->knownDelay;
+ delay_difference = aecInst->filtDelay - aecInst->knownDelay;
if (delay_difference > 224) {
- if (aecpc->lastDelayDiff < 96) {
- aecpc->timeForDelayChange = 0;
+ if (aecInst->lastDelayDiff < 96) {
+ aecInst->timeForDelayChange = 0;
} else {
- aecpc->timeForDelayChange++;
+ aecInst->timeForDelayChange++;
}
- } else if (delay_difference < 96 && aecpc->knownDelay > 0) {
- if (aecpc->lastDelayDiff > 224) {
- aecpc->timeForDelayChange = 0;
+ } else if (delay_difference < 96 && aecInst->knownDelay > 0) {
+ if (aecInst->lastDelayDiff > 224) {
+ aecInst->timeForDelayChange = 0;
} else {
- aecpc->timeForDelayChange++;
+ aecInst->timeForDelayChange++;
}
} else {
- aecpc->timeForDelayChange = 0;
+ aecInst->timeForDelayChange = 0;
}
- aecpc->lastDelayDiff = delay_difference;
+ aecInst->lastDelayDiff = delay_difference;
- if (aecpc->timeForDelayChange > 25) {
- aecpc->knownDelay = WEBRTC_SPL_MAX((int)aecpc->filtDelay - 160, 0);
+ if (aecInst->timeForDelayChange > 25) {
+ aecInst->knownDelay = WEBRTC_SPL_MAX((int)aecInst->filtDelay - 160, 0);
}
}
-static void EstBufDelayExtended(Aec* self) {
- int reported_delay = self->msInSndCardBuf * sampMsNb * self->rate_factor;
- int current_delay = reported_delay - WebRtcAec_system_delay(self->aec);
+static void EstBufDelayExtended(Aec* aecInst) {
+ int reported_delay = aecInst->msInSndCardBuf * sampMsNb *
+ aecInst->rate_factor;
+ int current_delay = reported_delay - WebRtcAec_system_delay(aecInst->aec);
int delay_difference = 0;
// Before we proceed with the delay estimate filtering we:
@@ -818,46 +821,48 @@ static void EstBufDelayExtended(Aec* self) {
// be negative.
// 1) Compensating for the frame(s) that will be read/processed.
- current_delay += FRAME_LEN * self->rate_factor;
+ current_delay += FRAME_LEN * aecInst->rate_factor;
// 2) Account for resampling frame delay.
- if (self->skewMode == kAecTrue && self->resample == kAecTrue) {
+ if (aecInst->skewMode == kAecTrue && aecInst->resample == kAecTrue) {
current_delay -= kResamplingDelay;
}
// 3) Compensate for non-causality, if needed, by flushing two blocks.
if (current_delay < PART_LEN) {
current_delay +=
- WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(self->aec, 2) * PART_LEN;
+ WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecInst->aec, 2) *
+ PART_LEN;
}
- if (self->filtDelay == -1) {
- self->filtDelay = WEBRTC_SPL_MAX(0, 0.5 * current_delay);
+ if (aecInst->filtDelay == -1) {
+ aecInst->filtDelay = WEBRTC_SPL_MAX(0, 0.5 * current_delay);
} else {
- self->filtDelay = WEBRTC_SPL_MAX(
- 0, static_cast<int16_t>(0.95 * self->filtDelay + 0.05 * current_delay));
+ aecInst->filtDelay = WEBRTC_SPL_MAX(
+ 0, static_cast<int16_t>(0.95 * aecInst->filtDelay + 0.05 *
+ current_delay));
}
- delay_difference = self->filtDelay - self->knownDelay;
+ delay_difference = aecInst->filtDelay - aecInst->knownDelay;
if (delay_difference > 384) {
- if (self->lastDelayDiff < 128) {
- self->timeForDelayChange = 0;
+ if (aecInst->lastDelayDiff < 128) {
+ aecInst->timeForDelayChange = 0;
} else {
- self->timeForDelayChange++;
+ aecInst->timeForDelayChange++;
}
- } else if (delay_difference < 128 && self->knownDelay > 0) {
- if (self->lastDelayDiff > 384) {
- self->timeForDelayChange = 0;
+ } else if (delay_difference < 128 && aecInst->knownDelay > 0) {
+ if (aecInst->lastDelayDiff > 384) {
+ aecInst->timeForDelayChange = 0;
} else {
- self->timeForDelayChange++;
+ aecInst->timeForDelayChange++;
}
} else {
- self->timeForDelayChange = 0;
+ aecInst->timeForDelayChange = 0;
}
- self->lastDelayDiff = delay_difference;
+ aecInst->lastDelayDiff = delay_difference;
- if (self->timeForDelayChange > 25) {
- self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0);
+ if (aecInst->timeForDelayChange > 25) {
+ aecInst->knownDelay = WEBRTC_SPL_MAX((int)aecInst->filtDelay - 256, 0);
}
}
} // namespace webrtc
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.h b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.h
index 10471139dc7..d5c703e46b4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
+#define MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
#include <memory>
#include <stddef.h>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
+#include "common_audio/ring_buffer.h"
}
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -296,4 +296,4 @@ struct AecCore* WebRtcAec_aec_core(void* handle);
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
index 647e90cda2b..b9c89fd9e9c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
@@ -10,14 +10,14 @@
// TODO(bjornv): Make this a comprehensive test.
-#include "webrtc/modules/audio_processing/aec/echo_cancellation.h"
+#include "modules/audio_processing/aec/echo_cancellation.h"
#include <stdlib.h>
#include <time.h>
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "rtc_base/checks.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc
index 141d608008c..db73d7e1837 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/modules/audio_processing/aec/echo_cancellation.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/echo_cancellation.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
index 303ff7735d9..fb3f48a9183 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
@@ -8,20 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
#if defined(WEBRTC_HAS_NEON)
#include <arm_neon.h>
#endif
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
#include <algorithm>
#include <functional>
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h
index 6fae158dc89..78728693519 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h
@@ -8,20 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
#include <array>
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace aec3 {
@@ -150,4 +150,4 @@ class AdaptiveFirFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
index c861d464e15..9ff3c09b333 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
@@ -8,28 +8,28 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
#include <math.h>
#include <algorithm>
#include <numeric>
#include <string>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h"
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
-#include "webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/cascaded_biquad_filter.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/aec3/shadow_filter_update_gain.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/arraysize.h"
+#include "rtc_base/random.h"
+#include "rtc_base/safe_minmax.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
namespace webrtc {
namespace aec3 {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc
index ae0624703b0..7becce49f17 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/typedefs.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
+#include "typedefs.h" // NOLINT(build/include)
+#include "system_wrappers/include/cpu_features_wrapper.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h
index feb5bdbf624..2442f909e57 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
#include <stddef.h>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -112,4 +112,4 @@ static_assert(!ValidFullBandRate(8001),
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.cc
index cb06956d21c..c8120cb8641 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.h
index f0b98b3e6e5..2a5dfef47fe 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -57,4 +57,4 @@ class Aec3Fft {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_AEC3_FFT_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc
index ae1f52e5afe..46831e021aa 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
#include <algorithm>
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
index d4a3c76d3e3..6ea54fcf3d2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/aec_state.h"
#include <math.h>
#include <numeric>
#include <vector>
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/checks.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.h
index 44a17671255..53899e55d14 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state.h
@@ -8,22 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
#include <algorithm>
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/aec3/erl_estimator.h"
-#include "webrtc/modules/audio_processing/aec3/erle_estimator.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/array_view.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/erl_estimator.h"
+#include "modules/audio_processing/aec3/erle_estimator.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -92,6 +92,12 @@ class AecState {
echo_audibility_.UpdateWithOutput(e);
}
+ // Returns whether the echo subtractor can be used to determine the residual
+ // echo.
+ bool LinearEchoEstimate() const {
+ return UsableLinearEstimate() && !HeadsetDetected();
+ }
+
// Updates the aec state.
void Update(const std::vector<std::array<float, kFftLengthBy2Plus1>>&
adaptive_filter_frequency_response,
@@ -153,4 +159,4 @@ class AecState {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state_unittest.cc
index 05530ca6d1f..8413413ce2f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/aec_state_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.cc
index 80ac83645e8..3160624515a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/block_framer.h"
+#include "modules/audio_processing/aec3/block_framer.h"
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.h
index d6c9144d3d9..923e4cfb53d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -44,4 +44,4 @@ class BlockFramer {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer_unittest.cc
index b6419f7c609..16d3944e13f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_framer_unittest.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/block_framer.h"
+#include "modules/audio_processing/aec3/block_framer.h"
#include <sstream>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
index 536335e8a26..1bdd71f308c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
@@ -7,15 +7,16 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor_metrics.h"
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_processor_metrics.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/logging.h"
namespace webrtc {
namespace {
@@ -101,11 +102,15 @@ void BlockProcessorImpl::ProcessCapture(
// been a render buffer overrun as the buffer alignment may be noncausal.
delay_controller_->Reset();
render_buffer_->Reset();
+ LOG(LS_WARNING) << "Reset due to detected render buffer overrun.";
}
// Update the render buffers with new render data, filling the buffers with
// empty blocks when there is no render data available.
render_buffer_underrun = !render_buffer_->UpdateBuffers();
+ if (render_buffer_underrun) {
+ LOG(LS_WARNING) << "Render API jitter buffer underrun.";
+ }
// Compute and and apply the render delay required to achieve proper signal
// alignment.
@@ -127,6 +132,7 @@ void BlockProcessorImpl::ProcessCapture(
delay_controller_->Reset();
render_buffer_->Reset();
delay_change = true;
+ LOG(LS_WARNING) << "Reset due to noncausal delay.";
}
// Remove the echo from the capture signal.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.h
index 92359314a1e..5f95e0024f3 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/echo_remover.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller.h"
+#include "modules/audio_processing/aec3/echo_remover.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_controller.h"
namespace webrtc {
@@ -57,4 +57,4 @@ class BlockProcessor {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc
index 3eeafa2e457..c8bdda73898 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/block_processor_metrics.h"
+#include "modules/audio_processing/aec3/block_processor_metrics.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "system_wrappers/include/metrics.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.h
index 1cff2a8d3eb..9b437c0d138 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -44,4 +44,4 @@ class BlockProcessorMetrics {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
index 8ab10485561..7ce8573efa6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor_metrics.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_processor_metrics.h"
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_unittest.cc
index 9f402ed8461..57cd430cb42 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor_unittest.cc
@@ -8,22 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/block_processor.h"
#include <memory>
#include <sstream>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h"
-#include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/mock/mock_echo_remover.h"
+#include "modules/audio_processing/aec3/mock/mock_render_delay_buffer.h"
+#include "modules/audio_processing/aec3/mock/mock_render_delay_controller.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/random.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc
index 3ac86c0029b..9a472f516fc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc
@@ -7,9 +7,9 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h"
+#include "modules/audio_processing/aec3/cascaded_biquad_filter.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h
index 8e11a8d983d..aea889ab537 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -55,4 +55,4 @@ class CascadedBiQuadFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter_unittest.cc
index 7628a8814e5..fcb77e1f6e4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h"
+#include "modules/audio_processing/aec3/cascaded_biquad_filter.h"
#include <vector>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc
index b8d7f28df6b..dab40a9d7ed 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h"
+#include "modules/audio_processing/aec3/comfort_noise_generator.h"
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
@@ -20,7 +20,7 @@
#include <functional>
#include <numeric>
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h
index 3684f48feec..2d998beb94f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
#include <array>
#include <memory>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace aec3 {
@@ -65,4 +65,4 @@ class ComfortNoiseGenerator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc
index 7cb0aa1e677..333910bf40d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h"
+#include "modules/audio_processing/aec3/comfort_noise_generator.h"
#include <algorithm>
#include <numeric>
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace aec3 {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.cc
index 94d11d26f3b..0db3b8f842e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.cc
@@ -7,9 +7,9 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.h
index 93b4b58b879..023d6d22e29 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/cascaded_biquad_filter.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -35,4 +35,4 @@ class DecimatorBy4 {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_DECIMATOR_BY_4_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc
index 0d3d1835377..1ae2c5b95c7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
#include <math.h>
#include <algorithm>
@@ -18,8 +18,8 @@
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc
index 195853a40d0..cc65b3f3544 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h
index e639ea8b68e..499eac7f995 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
namespace webrtc {
@@ -27,4 +27,4 @@ struct DownsampledRenderBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.cc
index 95dfe8a7431..de399ee28ea 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.cc
@@ -7,12 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_canceller3.h"
+#include "modules/audio_processing/aec3/echo_canceller3.h"
#include <sstream>
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/atomicops.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
namespace webrtc {
@@ -146,7 +146,7 @@ class EchoCanceller3::RenderWriter {
int frame_length,
int num_bands);
~RenderWriter();
- void Insert(AudioBuffer* render);
+ void Insert(AudioBuffer* input);
private:
ApmDataDumper* data_dumper_;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.h
index d857dfbed54..68250255a9c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3.h
@@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
-
-#include "webrtc/modules/audio_processing/aec3/block_framer.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h"
-#include "webrtc/modules/audio_processing/aec3/frame_blocker.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/race_checker.h"
-#include "webrtc/rtc_base/swap_queue.h"
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
+
+#include "modules/audio_processing/aec3/block_framer.h"
+#include "modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/cascaded_biquad_filter.h"
+#include "modules/audio_processing/aec3/frame_blocker.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/race_checker.h"
+#include "rtc_base/swap_queue.h"
namespace webrtc {
@@ -60,7 +60,7 @@ class Aec3RenderQueueItemVerifier {
//
// The class is supposed to be used in a non-concurrent manner apart from the
// AnalyzeRender call which can be called concurrently with the other methods.
-class EchoCanceller3 {
+class EchoCanceller3 : public EchoControl {
public:
// Normal c-tor to use.
EchoCanceller3(const AudioProcessing::Config::EchoCanceller3& config,
@@ -70,15 +70,15 @@ class EchoCanceller3 {
EchoCanceller3(int sample_rate_hz,
bool use_highpass_filter,
std::unique_ptr<BlockProcessor> block_processor);
- ~EchoCanceller3();
+ ~EchoCanceller3() override;
// Analyzes and stores an internal copy of the split-band domain render
// signal.
- void AnalyzeRender(AudioBuffer* farend);
+ void AnalyzeRender(AudioBuffer* farend) override;
// Analyzes the full-band domain capture signal to detect signal saturation.
- void AnalyzeCapture(AudioBuffer* capture);
+ void AnalyzeCapture(AudioBuffer* capture) override;
// Processes the split-band domain capture signal in order to remove any echo
// present in the signal.
- void ProcessCapture(AudioBuffer* capture, bool level_change);
+ void ProcessCapture(AudioBuffer* capture, bool level_change) override;
// Signals whether an external detector has detected echo leakage from the
// echo canceller.
@@ -105,7 +105,8 @@ class EchoCanceller3 {
rtc::RaceChecker render_race_checker_;
// State that is accessed by the AnalyzeRender call.
- std::unique_ptr<RenderWriter> render_writer_ GUARDED_BY(render_race_checker_);
+ std::unique_ptr<RenderWriter> render_writer_
+ RTC_GUARDED_BY(render_race_checker_);
// State that may be accessed by the capture thread.
static int instance_count_;
@@ -113,24 +114,25 @@ class EchoCanceller3 {
const int sample_rate_hz_;
const int num_bands_;
const size_t frame_length_;
- BlockFramer output_framer_ GUARDED_BY(capture_race_checker_);
- FrameBlocker capture_blocker_ GUARDED_BY(capture_race_checker_);
- FrameBlocker render_blocker_ GUARDED_BY(capture_race_checker_);
+ BlockFramer output_framer_ RTC_GUARDED_BY(capture_race_checker_);
+ FrameBlocker capture_blocker_ RTC_GUARDED_BY(capture_race_checker_);
+ FrameBlocker render_blocker_ RTC_GUARDED_BY(capture_race_checker_);
SwapQueue<std::vector<std::vector<float>>, Aec3RenderQueueItemVerifier>
render_transfer_queue_;
std::unique_ptr<BlockProcessor> block_processor_
- GUARDED_BY(capture_race_checker_);
+ RTC_GUARDED_BY(capture_race_checker_);
std::vector<std::vector<float>> render_queue_output_frame_
- GUARDED_BY(capture_race_checker_);
+ RTC_GUARDED_BY(capture_race_checker_);
std::unique_ptr<CascadedBiQuadFilter> capture_highpass_filter_
- GUARDED_BY(capture_race_checker_);
- bool saturated_microphone_signal_ GUARDED_BY(capture_race_checker_) = false;
- std::vector<std::vector<float>> block_ GUARDED_BY(capture_race_checker_);
+ RTC_GUARDED_BY(capture_race_checker_);
+ bool saturated_microphone_signal_ RTC_GUARDED_BY(capture_race_checker_) =
+ false;
+ std::vector<std::vector<float>> block_ RTC_GUARDED_BY(capture_race_checker_);
std::vector<rtc::ArrayView<float>> sub_frame_view_
- GUARDED_BY(capture_race_checker_);
+ RTC_GUARDED_BY(capture_race_checker_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCanceller3);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc
index 3a4550077da..fbe65593b17 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_canceller3.h"
+#include "modules/audio_processing/aec3/echo_canceller3.h"
#include <deque>
#include <memory>
@@ -17,18 +17,17 @@
#include <utility>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/modules/audio_processing/aec3/frame_blocker.h"
-#include "webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/frame_blocker.h"
+#include "modules/audio_processing/aec3/mock/mock_block_processor.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
-using testing::Return;
using testing::StrictMock;
using testing::_;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
index 3c182f39521..b95ef12f275 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
@@ -7,15 +7,15 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h"
+#include "modules/audio_processing/aec3/echo_path_delay_estimator.h"
#include <algorithm>
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/checks.h"
namespace webrtc {
@@ -34,8 +34,7 @@ EchoPathDelayEstimator::EchoPathDelayEstimator(
kNumMatchedFilters,
kMatchedFilterAlignmentShiftSizeSubBlocks,
config.param.render_levels.poor_excitation_render_limit),
- matched_filter_lag_aggregator_(data_dumper_,
- matched_filter_.NumLagEstimates()) {
+ matched_filter_lag_aggregator_(data_dumper_) {
RTC_DCHECK(data_dumper);
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
index 4b536b99a94..34c7ad4c830 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
-#include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/matched_filter.h"
+#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -50,4 +50,4 @@ class EchoPathDelayEstimator {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_DELAY_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc
index 89b49cae409..97abdc08a1c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h"
+#include "modules/audio_processing/aec3/echo_path_delay_estimator.h"
#include <algorithm>
#include <sstream>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.cc
index 514659205c6..f63a83006e2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.h
index 7755362787c..55915d5b688 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
namespace webrtc {
@@ -23,4 +23,4 @@ struct EchoPathVariability {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ECHO_PATH_VARIABILITY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc
index e2e82d1f97e..9a1df78885e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.cc
index 32ecc739268..cb7e05bbce2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_remover.h"
+#include "modules/audio_processing/aec3/echo_remover.h"
#include <math.h>
#include <algorithm>
@@ -15,23 +15,23 @@
#include <numeric>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h"
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/aec3/echo_remover_metrics.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/modules/audio_processing/aec3/output_selector.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/residual_echo_estimator.h"
-#include "webrtc/modules/audio_processing/aec3/subtractor.h"
-#include "webrtc/modules/audio_processing/aec3/suppression_filter.h"
-#include "webrtc/modules/audio_processing/aec3/suppression_gain.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/comfort_noise_generator.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/echo_remover_metrics.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/output_selector.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/aec3/residual_echo_estimator.h"
+#include "modules/audio_processing/aec3/subtractor.h"
+#include "modules/audio_processing/aec3/suppression_filter.h"
+#include "modules/audio_processing/aec3/suppression_gain.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -57,12 +57,11 @@ class EchoRemoverImpl final : public EchoRemover {
// Removes the echo from a block of samples from the capture signal. The
// supplied render signal is assumed to be pre-aligned with the capture
// signal.
- void ProcessCapture(
- const rtc::Optional<size_t>& external_echo_path_delay_estimate,
- const EchoPathVariability& echo_path_variability,
- bool capture_signal_saturation,
- const RenderBuffer& render_buffer,
- std::vector<std::vector<float>>* capture) override;
+ void ProcessCapture(const rtc::Optional<size_t>& echo_path_delay_samples,
+ const EchoPathVariability& echo_path_variability,
+ bool capture_signal_saturation,
+ const RenderBuffer& render_buffer,
+ std::vector<std::vector<float>>* capture) override;
// Updates the status on whether echo leakage is detected in the output of the
// echo remover.
@@ -184,18 +183,17 @@ void EchoRemoverImpl::ProcessCapture(
const auto& E2 = output_selector_.UseSubtractorOutput() ? E2_main : Y2;
// Estimate the residual echo power.
- residual_echo_estimator_.Estimate(output_selector_.UseSubtractorOutput(),
- aec_state_, render_buffer, S2_linear, Y2,
+ residual_echo_estimator_.Estimate(aec_state_, render_buffer, S2_linear, Y2,
&R2);
// Estimate the comfort noise.
cng_.Compute(aec_state_, Y2, &comfort_noise, &high_band_comfort_noise);
// A choose and apply echo suppression gain.
- suppression_gain_.GetGain(E2, R2, cng_.NoiseSpectrum(),
- render_signal_analyzer_, aec_state_.SaturatedEcho(),
- x, aec_state_.ForcedZeroGain(), &high_bands_gain,
- &G);
+ suppression_gain_.GetGain(
+ E2, R2, cng_.NoiseSpectrum(), render_signal_analyzer_,
+ aec_state_.SaturatedEcho(), x, aec_state_.ForcedZeroGain(),
+ aec_state_.LinearEchoEstimate(), &high_bands_gain, &G);
suppression_filter_.ApplyGain(comfort_noise, high_band_comfort_noise, G,
high_bands_gain, y);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.h
index ce43fa8a720..83e869e2ad1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
namespace webrtc {
@@ -45,4 +45,4 @@ class EchoRemover {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc
index d70e4a121f8..8ec4bcfa622 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_remover_metrics.h"
+#include "modules/audio_processing/aec3/echo_remover_metrics.h"
#include <math.h>
#include <algorithm>
#include <numeric>
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "rtc_base/safe_minmax.h"
+#include "system_wrappers/include/metrics.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.h
index 57e123ed872..6548ae8aa25 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -74,4 +74,4 @@ int TransformDbMetricForReporting(bool negate,
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ECHO_REMOVER_METRICS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
index 094508effa1..baab10f6f16 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_remover_metrics.h"
+#include "modules/audio_processing/aec3/echo_remover_metrics.h"
#include <math.h>
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc
index f2f895d5492..4638f90c8fd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/echo_remover.h"
+#include "modules/audio_processing/aec3/echo_remover.h"
#include <algorithm>
#include <memory>
@@ -16,13 +16,13 @@
#include <sstream>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.cc
index 6990ea3cec2..7923c0da50b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/erl_estimator.h"
+#include "modules/audio_processing/aec3/erl_estimator.h"
#include <algorithm>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.h
index bc81926209f..1fe12fb6dd2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -40,4 +40,4 @@ class ErlEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc
index bf803820dee..3fbaec0e982 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/erl_estimator.h"
+#include "modules/audio_processing/aec3/erl_estimator.h"
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.cc
index da0e421c008..2b669c93d8b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/erle_estimator.h"
+#include "modules/audio_processing/aec3/erle_estimator.h"
#include <algorithm>
-#include "webrtc/rtc_base/safe_minmax.h"
+#include "rtc_base/safe_minmax.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.h
index 91a8c6ceb88..80c03879818 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -44,4 +44,4 @@ class ErleEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc
index be435c0a418..bc5ac193c59 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/erle_estimator.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/erle_estimator.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h
index b5dfe24161f..a5c51bf3426 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
#include <algorithm>
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
namespace webrtc {
@@ -95,4 +95,4 @@ struct FftData {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc
index e5881cff77f..d969744c040 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.cc
index a8b04d909d0..0a0c0e2faea 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/frame_blocker.h"
+#include "modules/audio_processing/aec3/frame_blocker.h"
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.h
index 7b29071ec91..08e1e1dd236 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
#include <stddef.h>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -45,4 +45,4 @@ class FrameBlocker {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc
index 217615c798e..6e73d4bc8f3 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/frame_blocker.h"
+#include "modules/audio_processing/aec3/frame_blocker.h"
#include <sstream>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_framer.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_framer.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
index 3d5154d73f8..1dd2a20b277 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/main_filter_update_gain.h"
+#include "modules/audio_processing/aec3/main_filter_update_gain.h"
#include <algorithm>
#include <functional>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.h
index 5818a106bac..756a5d0e5dd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
-#include "webrtc/modules/audio_processing/aec3/subtractor_output.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/aec3/subtractor_output.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -53,4 +53,4 @@ class MainFilterUpdateGain {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc
index cbd62b58ad6..6d0423faaf2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc
@@ -8,23 +8,23 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/main_filter_update_gain.h"
+#include "modules/audio_processing/aec3/main_filter_update_gain.h"
#include <algorithm>
#include <numeric>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
-#include "webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h"
-#include "webrtc/modules/audio_processing/aec3/subtractor_output.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/aec3/shadow_filter_update_gain.h"
+#include "modules/audio_processing/aec3/subtractor_output.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "rtc_base/safe_minmax.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc
index 5414cfcb312..5dc671ec6f8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc
@@ -7,20 +7,20 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
+#include "modules/audio_processing/aec3/matched_filter.h"
#if defined(WEBRTC_HAS_NEON)
#include <arm_neon.h>
#endif
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
#include <algorithm>
#include <numeric>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
namespace aec3 {
@@ -368,7 +368,7 @@ void MatchedFilter::Update(const DownsampledRenderBuffer& render_buffer,
[](float a, float b) -> bool { return a * a < b * b; }));
// Update the lag estimates for the matched filter.
- const float kMatchingFilterThreshold = 0.1f;
+ const float kMatchingFilterThreshold = 0.2f;
lag_estimates_[n] = LagEstimate(
error_sum_anchor - error_sum,
(lag_estimate > 2 && lag_estimate < (filters_[n].size() - 10) &&
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h
index 0702a124e8c..37e219fa68b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
#include <array>
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace aec3 {
@@ -116,4 +116,4 @@ class MatchedFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc
index 4a0a935620d..d1336199b16 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc
@@ -7,47 +7,40 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
+#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
MatchedFilterLagAggregator::MatchedFilterLagAggregator(
- ApmDataDumper* data_dumper,
- size_t num_lag_estimates)
- : data_dumper_(data_dumper), lag_updates_in_a_row_(num_lag_estimates, 0) {
+ ApmDataDumper* data_dumper)
+ : data_dumper_(data_dumper) {
RTC_DCHECK(data_dumper);
- RTC_DCHECK_LT(0, num_lag_estimates);
+ histogram_.fill(0);
+ histogram_data_.fill(0);
}
MatchedFilterLagAggregator::~MatchedFilterLagAggregator() = default;
void MatchedFilterLagAggregator::Reset() {
- candidate_ = 0;
- candidate_counter_ = 0;
- std::fill(lag_updates_in_a_row_.begin(), lag_updates_in_a_row_.end(), 0.f);
+ histogram_.fill(0);
+ histogram_data_.fill(0);
+ histogram_data_index_ = 0;
+ filled_histogram_ = false;
}
rtc::Optional<size_t> MatchedFilterLagAggregator::Aggregate(
rtc::ArrayView<const MatchedFilter::LagEstimate> lag_estimates) {
- RTC_DCHECK_EQ(lag_updates_in_a_row_.size(), lag_estimates.size());
-
- // Count the number of lag updates in a row to ensure that only stable lags
- // are taken into account.
- for (size_t k = 0; k < lag_estimates.size(); ++k) {
- lag_updates_in_a_row_[k] =
- lag_estimates[k].updated ? lag_updates_in_a_row_[k] + 1 : 0;
- }
-
- // If available, choose the strongest lag estimate as the best one.
+ // hoose the strongest lag estimate as the best one.
+ float best_accuracy = 0.f;
int best_lag_estimate_index = -1;
for (size_t k = 0; k < lag_estimates.size(); ++k) {
- if (lag_updates_in_a_row_[k] > 10 && lag_estimates[k].reliable &&
- (best_lag_estimate_index == -1 ||
- lag_estimates[k].accuracy >
- lag_estimates[best_lag_estimate_index].accuracy)) {
- best_lag_estimate_index = k;
+ if (lag_estimates[k].updated && lag_estimates[k].reliable) {
+ if (lag_estimates[k].accuracy > best_accuracy) {
+ best_accuracy = std::max(0.f, lag_estimates[k].accuracy);
+ best_lag_estimate_index = static_cast<int>(k);
+ }
}
}
@@ -55,18 +48,31 @@ rtc::Optional<size_t> MatchedFilterLagAggregator::Aggregate(
data_dumper_->DumpRaw("aec3_echo_path_delay_estimator_best_index",
best_lag_estimate_index);
- // Require the same lag to be detected 10 times in a row before considering
- // it reliable.
- if (best_lag_estimate_index >= 0) {
- candidate_counter_ =
- (candidate_ == lag_estimates[best_lag_estimate_index].lag)
- ? candidate_counter_ + 1
- : 0;
- candidate_ = lag_estimates[best_lag_estimate_index].lag;
- }
+ if (best_lag_estimate_index != -1) {
+ RTC_DCHECK_GT(histogram_.size(), histogram_data_[histogram_data_index_]);
+ RTC_DCHECK_LE(0, histogram_data_[histogram_data_index_]);
+ --histogram_[histogram_data_[histogram_data_index_]];
+
+ histogram_data_[histogram_data_index_] =
+ lag_estimates[best_lag_estimate_index].lag;
- return candidate_counter_ >= 15 ? rtc::Optional<size_t>(candidate_)
- : rtc::Optional<size_t>();
+ RTC_DCHECK_GT(histogram_.size(), histogram_data_[histogram_data_index_]);
+ RTC_DCHECK_LE(0, histogram_data_[histogram_data_index_]);
+ ++histogram_[histogram_data_[histogram_data_index_]];
+
+ histogram_data_index_ =
+ (histogram_data_index_ + 1) % histogram_data_.size();
+ filled_histogram_ = filled_histogram_ || histogram_data_index_ == 0;
+
+ const int candidate =
+ std::distance(histogram_.begin(),
+ std::max_element(histogram_.begin(), histogram_.end()));
+
+ if (histogram_[candidate] > 25) {
+ return rtc::Optional<size_t>(candidate);
+ }
+ }
+ return rtc::Optional<size_t>();
}
} // namespace webrtc
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
index 983ae3b7f35..5e6c7aac45c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/matched_filter.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -25,8 +25,7 @@ class ApmDataDumper;
// reliable combined lag estimate.
class MatchedFilterLagAggregator {
public:
- MatchedFilterLagAggregator(ApmDataDumper* data_dumper,
- size_t num_lag_estimates);
+ explicit MatchedFilterLagAggregator(ApmDataDumper* data_dumper);
~MatchedFilterLagAggregator();
// Resets the aggregator.
@@ -38,12 +37,13 @@ class MatchedFilterLagAggregator {
private:
ApmDataDumper* const data_dumper_;
- std::vector<size_t> lag_updates_in_a_row_;
- size_t candidate_ = 0;
- size_t candidate_counter_ = 0;
+ std::array<int, 1664> histogram_;
+ std::array<int, 250> histogram_data_;
+ int histogram_data_index_ = 0;
+ bool filled_histogram_ = false;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilterLagAggregator);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_LAG_AGGREGATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc
index 1c2e5ab4490..9a6c838ff63 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
+#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
#include <sstream>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
@@ -32,17 +32,18 @@ void VerifyNoAggregateOutputForRepeatedLagAggregation(
}
constexpr size_t kThresholdForRequiredLagUpdatesInARow = 10;
-constexpr size_t kThresholdForRequiredIdenticalLagAggregates = 15;
+constexpr size_t kThresholdForRequiredIdenticalLagAggregates = 100;
} // namespace
// Verifies that the most accurate lag estimate is chosen.
-TEST(MatchedFilterLagAggregator, MostAccurateLagChosen) {
+// TODO(peah): Modify and reenable according to new scheme.
+TEST(MatchedFilterLagAggregator, DISABLED_MostAccurateLagChosen) {
constexpr size_t kArtificialLag1 = 5;
constexpr size_t kArtificialLag2 = 10;
ApmDataDumper data_dumper(0);
std::vector<MatchedFilter::LagEstimate> lag_estimates(2);
- MatchedFilterLagAggregator aggregator(&data_dumper, lag_estimates.size());
+ MatchedFilterLagAggregator aggregator(&data_dumper);
lag_estimates[0] =
MatchedFilter::LagEstimate(1.f, true, kArtificialLag1, true);
lag_estimates[1] =
@@ -70,13 +71,14 @@ TEST(MatchedFilterLagAggregator, MostAccurateLagChosen) {
// Verifies that varying lag estimates causes lag estimates to not be deemed
// reliable.
+// TODO(peah): Modify and reenable according to new scheme.
TEST(MatchedFilterLagAggregator,
- LagEstimateInvarianceRequiredForAggregatedLag) {
+ DISABLED_LagEstimateInvarianceRequiredForAggregatedLag) {
constexpr size_t kArtificialLag1 = 5;
constexpr size_t kArtificialLag2 = 10;
ApmDataDumper data_dumper(0);
std::vector<MatchedFilter::LagEstimate> lag_estimates(1);
- MatchedFilterLagAggregator aggregator(&data_dumper, lag_estimates.size());
+ MatchedFilterLagAggregator aggregator(&data_dumper);
lag_estimates[0] =
MatchedFilter::LagEstimate(1.f, true, kArtificialLag1, true);
VerifyNoAggregateOutputForRepeatedLagAggregation(
@@ -99,12 +101,14 @@ TEST(MatchedFilterLagAggregator,
// Verifies that lag estimate updates are required to produce an updated lag
// aggregate.
-TEST(MatchedFilterLagAggregator, LagEstimateUpdatesRequiredForAggregatedLag) {
+// TODO(peah): Modify and reenable according to new scheme.
+TEST(MatchedFilterLagAggregator,
+ DISABLED_LagEstimateUpdatesRequiredForAggregatedLag) {
constexpr size_t kArtificialLag1 = 5;
constexpr size_t kArtificialLag2 = 10;
ApmDataDumper data_dumper(0);
std::vector<MatchedFilter::LagEstimate> lag_estimates(1);
- MatchedFilterLagAggregator aggregator(&data_dumper, lag_estimates.size());
+ MatchedFilterLagAggregator aggregator(&data_dumper);
lag_estimates[0] =
MatchedFilter::LagEstimate(1.f, true, kArtificialLag1, true);
VerifyNoAggregateOutputForRepeatedLagAggregation(
@@ -145,11 +149,12 @@ TEST(MatchedFilterLagAggregator, LagEstimateUpdatesRequiredForAggregatedLag) {
// Verifies that an aggregated lag is persistent if the lag estimates do not
// change and that an aggregated lag is not produced without gaining lag
// estimate confidence.
-TEST(MatchedFilterLagAggregator, PersistentAggregatedLag) {
+// TODO(peah): Modify and reenable according to new scheme.
+TEST(MatchedFilterLagAggregator, DISABLED_PersistentAggregatedLag) {
constexpr size_t kArtificialLag = 5;
ApmDataDumper data_dumper(0);
std::vector<MatchedFilter::LagEstimate> lag_estimates(1);
- MatchedFilterLagAggregator aggregator(&data_dumper, lag_estimates.size());
+ MatchedFilterLagAggregator aggregator(&data_dumper);
lag_estimates[0] =
MatchedFilter::LagEstimate(1.f, true, kArtificialLag, true);
VerifyNoAggregateOutputForRepeatedLagAggregation(
@@ -167,24 +172,9 @@ TEST(MatchedFilterLagAggregator, PersistentAggregatedLag) {
#if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
-// Verifies the check for correct number of lag estimates.
-TEST(MatchedFilterLagAggregator, IncorrectNumberOfLagEstimates) {
- ApmDataDumper data_dumper(0);
- MatchedFilterLagAggregator aggregator(&data_dumper, 1);
- std::vector<MatchedFilter::LagEstimate> lag_estimates(2);
-
- EXPECT_DEATH(aggregator.Aggregate(lag_estimates), "");
-}
-
-// Verifies the check for non-zero number of lag estimates.
-TEST(MatchedFilterLagAggregator, NonZeroLagEstimates) {
- ApmDataDumper data_dumper(0);
- EXPECT_DEATH(MatchedFilterLagAggregator(&data_dumper, 0), "");
-}
-
// Verifies the check for non-null data dumper.
TEST(MatchedFilterLagAggregator, NullDataDumper) {
- EXPECT_DEATH(MatchedFilterLagAggregator(nullptr, 1), "");
+ EXPECT_DEATH(MatchedFilterLagAggregator(nullptr), "");
}
#endif
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc
index 47ff353be89..d06f010bd3c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
+#include "modules/audio_processing/aec3/matched_filter.h"
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
@@ -18,14 +18,14 @@
#include <sstream>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
namespace webrtc {
namespace aec3 {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h
index 63ed75566e2..89adc8e5224 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/aec3/block_processor.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
@@ -35,4 +35,4 @@ class MockBlockProcessor : public BlockProcessor {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
index 008fca669f0..06f6b8797dd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/aec3/echo_remover.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/test/gmock.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/echo_remover.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
@@ -39,4 +39,4 @@ class MockEchoRemover : public EchoRemover {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_ECHO_REMOVER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h
index 06503e91369..7e6de8bc3a5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
@@ -61,4 +61,4 @@ class MockRenderDelayBuffer : public RenderDelayBuffer {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
index 6a00b5e8d21..b1f1cbe6cfa 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/test/gmock.h"
+#include "api/array_view.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_controller.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
@@ -35,4 +35,4 @@ class MockRenderDelayController : public RenderDelayController {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.cc
index 21e24e527be..4f547d98d91 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/output_selector.h"
+#include "modules/audio_processing/aec3/output_selector.h"
#include <algorithm>
#include <numeric>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.h
index 8876e238020..a406c61745a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -38,4 +38,4 @@ class OutputSelector {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector_unittest.cc
index 717f631bae9..c7add1c838d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/output_selector_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/output_selector.h"
+#include "modules/audio_processing/aec3/output_selector.h"
#include <algorithm>
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.cc
index 2bedfcb639b..fa86ea6b369 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
#include <algorithm>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.h
index ba7aa5394db..3288ff36adb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -78,4 +78,4 @@ class RenderBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer_unittest.cc
index 27510031461..1498f4ea252 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_buffer_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
#include <algorithm>
#include <functional>
#include <vector>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc
index 73dadadac6f..785b837ddb6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
#include <string.h>
#include <algorithm>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/logging.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/logging.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.h
index 17a75da8d0c..1678fc79c03 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
#include <stddef.h>
#include <array>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
namespace webrtc {
@@ -56,4 +56,4 @@ class RenderDelayBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc
index 4a16fee3b27..5a8f4b24011 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
#include <memory>
#include <sstream>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
index a80d4008f7f..1a30cdff6d4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
@@ -7,19 +7,19 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller.h"
+#include "modules/audio_processing/aec3/render_delay_controller.h"
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/echo_path_delay_estimator.h"
+#include "modules/audio_processing/aec3/render_delay_controller_metrics.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -42,10 +42,11 @@ class RenderDelayControllerImpl final : public RenderDelayController {
private:
static int instance_count_;
std::unique_ptr<ApmDataDumper> data_dumper_;
- size_t delay_ = kMinEchoPathDelayBlocks;
+ const size_t default_delay_;
+ size_t delay_;
EchoPathDelayEstimator delay_estimator_;
size_t blocks_since_last_delay_estimate_ = 300000;
- int echo_path_delay_samples_ = kMinEchoPathDelayBlocks * kBlockSize;
+ int echo_path_delay_samples_;
size_t align_call_counter_ = 0;
rtc::Optional<size_t> headroom_samples_;
std::vector<float> capture_delay_buffer_;
@@ -78,7 +79,11 @@ RenderDelayControllerImpl::RenderDelayControllerImpl(
int sample_rate_hz)
: data_dumper_(
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
+ default_delay_(
+ std::max(config.param.delay.default_delay, kMinEchoPathDelayBlocks)),
+ delay_(default_delay_),
delay_estimator_(data_dumper_.get(), config),
+ echo_path_delay_samples_(default_delay_ * kBlockSize),
capture_delay_buffer_(kBlockSize * (kMaxApiCallsJitterBlocks + 2), 0.f) {
RTC_DCHECK(ValidFullBandRate(sample_rate_hz));
}
@@ -86,7 +91,7 @@ RenderDelayControllerImpl::RenderDelayControllerImpl(
RenderDelayControllerImpl::~RenderDelayControllerImpl() = default;
void RenderDelayControllerImpl::Reset() {
- delay_ = kMinEchoPathDelayBlocks;
+ delay_ = default_delay_;
blocks_since_last_delay_estimate_ = 300000;
echo_path_delay_samples_ = delay_ * kBlockSize;
align_call_counter_ = 0;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
index ef0aaac7319..a3d8d12aae2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
-#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/array_view.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
@@ -43,4 +43,4 @@ class RenderDelayController {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc
index d0330cbd244..696ac29a733 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h"
+#include "modules/audio_processing/aec3/render_delay_controller_metrics.h"
#include <algorithm>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "system_wrappers/include/metrics.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
index 0cef897c345..a93f0764edc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -44,4 +44,4 @@ class RenderDelayControllerMetrics {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
index 5f24fe3d7f5..974d75dce9b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/optional.h"
+#include "modules/audio_processing/aec3/render_delay_controller_metrics.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc
index 6239c5172ee..7776b091006 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_delay_controller.h"
+#include "modules/audio_processing/aec3/render_delay_controller.h"
#include <algorithm>
#include <memory>
@@ -16,14 +16,14 @@
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/block_processor.h"
-#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
-#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/block_processor.h"
+#include "modules/audio_processing/aec3/decimator_by_4.h"
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc
index ce1c2f42e10..5e295423919 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
#include <math.h>
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
index b0b56cde9e3..64d74f4e3f5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
#include <array>
#include <memory>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -55,4 +55,4 @@ class RenderSignalAnalyzer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RENDER_SIGNAL_ANALYZER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
index d6701e2dfa5..dca9a04c539 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
@@ -8,20 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
#include <math.h>
#include <array>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
index 0dfec66cb25..c5b0161e8ca 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/residual_echo_estimator.h"
+#include "modules/audio_processing/aec3/residual_echo_estimator.h"
#include <numeric>
#include <vector>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
@@ -88,7 +88,6 @@ ResidualEchoEstimator::ResidualEchoEstimator(
ResidualEchoEstimator::~ResidualEchoEstimator() = default;
void ResidualEchoEstimator::Estimate(
- bool using_subtractor_output,
const AecState& aec_state,
const RenderBuffer& render_buffer,
const std::array<float, kFftLengthBy2Plus1>& S2_linear,
@@ -106,9 +105,8 @@ void ResidualEchoEstimator::Estimate(
RenderNoisePower(render_buffer, &X2_noise_floor_, &X2_noise_floor_counter_);
// Estimate the residual echo power.
- const bool use_linear_echo_power =
- aec_state.UsableLinearEstimate() && using_subtractor_output;
- if (use_linear_echo_power && !aec_state.HeadsetDetected()) {
+
+ if (aec_state.LinearEchoEstimate()) {
RTC_DCHECK(aec_state.FilterDelay());
const int filter_delay = *aec_state.FilterDelay();
LinearEstimate(S2_linear, aec_state.Erle(), filter_delay, R2);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
index 5d2835dee35..d766f123a4f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
@@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
#include <algorithm>
#include <array>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -30,8 +30,7 @@ class ResidualEchoEstimator {
const AudioProcessing::Config::EchoCanceller3& config);
~ResidualEchoEstimator();
- void Estimate(bool using_subtractor_output,
- const AecState& aec_state,
+ void Estimate(const AecState& aec_state,
const RenderBuffer& render_buffer,
const std::array<float, kFftLengthBy2Plus1>& S2_linear,
const std::array<float, kFftLengthBy2Plus1>& Y2,
@@ -78,4 +77,4 @@ class ResidualEchoEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_RESIDUAL_ECHO_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc
index 6abb155734d..46b726d9967 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/residual_echo_estimator.h"
+#include "modules/audio_processing/aec3/residual_echo_estimator.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
@@ -29,10 +29,9 @@ TEST(ResidualEchoEstimator, NullResidualEchoPowerOutput) {
std::vector<std::array<float, kFftLengthBy2Plus1>> H2;
std::array<float, kFftLengthBy2Plus1> S2_linear;
std::array<float, kFftLengthBy2Plus1> Y2;
- EXPECT_DEATH(
- ResidualEchoEstimator(AudioProcessing::Config::EchoCanceller3{})
- .Estimate(true, aec_state, render_buffer, S2_linear, Y2, nullptr),
- "");
+ EXPECT_DEATH(ResidualEchoEstimator(AudioProcessing::Config::EchoCanceller3{})
+ .Estimate(aec_state, render_buffer, S2_linear, Y2, nullptr),
+ "");
}
#endif
@@ -87,7 +86,7 @@ TEST(ResidualEchoEstimator, BasicTest) {
aec_state.Update(H2, h, rtc::Optional<size_t>(2), render_buffer, E2_main,
Y2, x[0], s, false);
- estimator.Estimate(true, aec_state, render_buffer, S2_linear, Y2, &R2);
+ estimator.Estimate(aec_state, render_buffer, S2_linear, Y2, &R2);
}
std::for_each(R2.begin(), R2.end(),
[&](float a) { EXPECT_NEAR(kLevel, a, 0.1f); });
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc
index 6287110e098..db393a78b2f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h"
+#include "modules/audio_processing/aec3/shadow_filter_update_gain.h"
#include <algorithm>
#include <functional>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h
index be1102d12e8..8c72cf487b6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -41,4 +41,4 @@ class ShadowFilterUpdateGain {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
index 99e3f257959..a1249e0c8bf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
@@ -8,20 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h"
+#include "modules/audio_processing/aec3/shadow_filter_update_gain.h"
#include <algorithm>
#include <numeric>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "rtc_base/safe_minmax.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.cc
index 20ba5108e40..c64e5a4ef9b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/subtractor.h"
+#include "modules/audio_processing/aec3/subtractor.h"
#include <algorithm>
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/safe_minmax.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/safe_minmax.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.h
index 777e4ff350e..e76155494c0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor.h
@@ -8,25 +8,25 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
#include <array>
#include <algorithm>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
-#include "webrtc/modules/audio_processing/aec3/main_filter_update_gain.h"
-#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h"
-#include "webrtc/modules/audio_processing/aec3/subtractor_output.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/aec3/echo_path_variability.h"
+#include "modules/audio_processing/aec3/main_filter_update_gain.h"
+#include "modules/audio_processing/aec3/render_buffer.h"
+#include "modules/audio_processing/aec3/shadow_filter_update_gain.h"
+#include "modules/audio_processing/aec3/subtractor_output.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -71,4 +71,4 @@ class Subtractor {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_output.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_output.h
index 87550475815..8655665b35c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_output.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_output.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
#include <array>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/fft_data.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/fft_data.h"
namespace webrtc {
@@ -40,4 +40,4 @@ struct SubtractorOutput {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
index 07b121337a9..ea28c4e6638 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/subtractor.h"
+#include "modules/audio_processing/aec3/subtractor.h"
#include <algorithm>
#include <numeric>
#include <string>
-#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec3/aec_state.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.cc
index 5ad491151d1..ab78b33cd5f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/suppression_filter.h"
+#include "modules/audio_processing/aec3/suppression_filter.h"
#include <math.h>
#include <algorithm>
@@ -16,8 +16,8 @@
#include <functional>
#include <numeric>
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/rtc_base/safe_minmax.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
+#include "rtc_base/safe_minmax.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.h
index 44ce6beeab0..5f91dea28fc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
#include <array>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_fft.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -41,4 +41,4 @@ class SuppressionFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
index 312391b0e9a..51b3f91f2a5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/suppression_filter.h"
+#include "modules/audio_processing/aec3/suppression_filter.h"
#include <math.h>
#include <algorithm>
#include <numeric>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc
index 8e78967e5c7..5b4dfcd6826 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/suppression_gain.h"
+#include "modules/audio_processing/aec3/suppression_gain.h"
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
@@ -19,8 +19,8 @@
#include <functional>
#include <numeric>
-#include "webrtc/modules/audio_processing/aec3/vector_math.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec3/vector_math.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
@@ -112,6 +112,7 @@ void UpdateMaxGainIncrease(
const AudioProcessing::Config::EchoCanceller3& config,
size_t no_saturation_counter,
bool low_noise_render,
+ bool linear_echo_estimate,
const std::array<float, kFftLengthBy2Plus1>& last_echo,
const std::array<float, kFftLengthBy2Plus1>& echo,
const std::array<float, kFftLengthBy2Plus1>& last_gain,
@@ -125,7 +126,14 @@ void UpdateMaxGainIncrease(
float min_decreasing;
auto& param = config.param.gain_updates;
- if (low_noise_render) {
+ if (!linear_echo_estimate) {
+ max_increasing = param.nonlinear.max_inc;
+ max_decreasing = param.nonlinear.max_dec;
+ rate_increasing = param.nonlinear.rate_inc;
+ rate_decreasing = param.nonlinear.rate_dec;
+ min_increasing = param.nonlinear.min_inc;
+ min_decreasing = param.nonlinear.min_dec;
+ } else if (low_noise_render) {
max_increasing = param.low_noise.max_inc;
max_decreasing = param.low_noise.max_dec;
rate_increasing = param.low_noise.rate_inc;
@@ -168,6 +176,7 @@ void GainToNoAudibleEcho(
const AudioProcessing::Config::EchoCanceller3& config,
bool low_noise_render,
bool saturated_echo,
+ bool linear_echo_estimate,
const std::array<float, kFftLengthBy2Plus1>& nearend,
const std::array<float, kFftLengthBy2Plus1>& echo,
const std::array<float, kFftLengthBy2Plus1>& masker,
@@ -175,23 +184,44 @@ void GainToNoAudibleEcho(
const std::array<float, kFftLengthBy2Plus1>& max_gain,
const std::array<float, kFftLengthBy2Plus1>& one_by_echo,
std::array<float, kFftLengthBy2Plus1>* gain) {
- const float nearend_masking_margin =
- low_noise_render ? 0.1f
- : (saturated_echo ? config.param.gain_mask.m2
- : config.param.gain_mask.m3);
+ float nearend_masking_margin = 0.f;
+ if (linear_echo_estimate) {
+ nearend_masking_margin = low_noise_render
+ ? config.param.gain_mask.m9
+ : (saturated_echo ? config.param.gain_mask.m2
+ : config.param.gain_mask.m3);
+ } else {
+ nearend_masking_margin = config.param.gain_mask.m7;
+ }
+ RTC_DCHECK_LE(0.f, nearend_masking_margin);
+ RTC_DCHECK_GT(1.f, nearend_masking_margin);
+ const float one_by_one_minus_nearend_masking_margin =
+ 1.f / (1.0f - nearend_masking_margin);
+
+ const float masker_margin = linear_echo_estimate ? config.param.gain_mask.m1
+ : config.param.gain_mask.m8;
for (size_t k = 0; k < gain->size(); ++k) {
- RTC_DCHECK_LE(0.f, nearend_masking_margin * nearend[k]);
- if (echo[k] <= nearend_masking_margin * nearend[k]) {
+ const float unity_gain_masker = std::max(nearend[k], masker[k]);
+ RTC_DCHECK_LE(0.f, nearend_masking_margin * unity_gain_masker);
+ if (echo[k] <= nearend_masking_margin * unity_gain_masker ||
+ unity_gain_masker <= 0.f) {
(*gain)[k] = 1.f;
} else {
- (*gain)[k] = config.param.gain_mask.m1 * masker[k] * one_by_echo[k];
+ RTC_DCHECK_LT(0.f, unity_gain_masker);
+ (*gain)[k] = std::max(0.f, (1.f - 5.f * echo[k] / unity_gain_masker) *
+ one_by_one_minus_nearend_masking_margin);
+ (*gain)[k] =
+ std::max(masker_margin * masker[k] * one_by_echo[k], (*gain)[k]);
}
(*gain)[k] = std::min(std::max((*gain)[k], min_gain[k]), max_gain[k]);
}
}
+// TODO(peah): Make adaptive to take the actual filter error into account.
+constexpr size_t kUpperAccurateBandPlus1 = 29;
+
// Computes the signal output power that masks the echo signal.
void MaskingPower(const AudioProcessing::Config::EchoCanceller3& config,
const std::array<float, kFftLengthBy2Plus1>& nearend,
@@ -200,14 +230,44 @@ void MaskingPower(const AudioProcessing::Config::EchoCanceller3& config,
const std::array<float, kFftLengthBy2Plus1>& gain,
std::array<float, kFftLengthBy2Plus1>* masker) {
std::array<float, kFftLengthBy2Plus1> side_band_masker;
+ float max_nearend_after_gain = 0.f;
for (size_t k = 0; k < gain.size(); ++k) {
- side_band_masker[k] = nearend[k] * gain[k] + comfort_noise[k];
+ const float nearend_after_gain = nearend[k] * gain[k];
+ max_nearend_after_gain =
+ std::max(max_nearend_after_gain, nearend_after_gain);
+ side_band_masker[k] = nearend_after_gain + comfort_noise[k];
(*masker)[k] =
comfort_noise[k] + config.param.gain_mask.m4 * last_masker[k];
}
- for (size_t k = 1; k < gain.size() - 1; ++k) {
- (*masker)[k] += 0.1f * (side_band_masker[k - 1] + side_band_masker[k + 1]);
+
+ // Apply masking only between lower frequency bands.
+ RTC_DCHECK_LT(kUpperAccurateBandPlus1, gain.size());
+ for (size_t k = 1; k < kUpperAccurateBandPlus1; ++k) {
+ (*masker)[k] += config.param.gain_mask.m5 *
+ (side_band_masker[k - 1] + side_band_masker[k + 1]);
}
+
+ // Add full-band masking as a minimum value for the masker.
+ const float min_masker = max_nearend_after_gain * config.param.gain_mask.m6;
+ std::for_each(masker->begin(), masker->end(),
+ [min_masker](float& a) { a = std::max(a, min_masker); });
+}
+
+// Limits the gain in the frequencies for which the adaptive filter has not
+// converged. Currently, these frequencies are not hardcoded to the frequencies
+// which are typically not excited by speech.
+// TODO(peah): Make adaptive to take the actual filter error into account.
+void AdjustNonConvergedFrequencies(
+ std::array<float, kFftLengthBy2Plus1>* gain) {
+ constexpr float oneByBandsInSum =
+ 1 / static_cast<float>(kUpperAccurateBandPlus1 - 20);
+ const float hf_gain_bound =
+ std::accumulate(gain->begin() + 20,
+ gain->begin() + kUpperAccurateBandPlus1, 0.f) *
+ oneByBandsInSum;
+
+ std::for_each(gain->begin() + kUpperAccurateBandPlus1, gain->end(),
+ [hf_gain_bound](float& a) { a = std::min(a, hf_gain_bound); });
}
} // namespace
@@ -217,6 +277,7 @@ void SuppressionGain::LowerBandGain(
bool low_noise_render,
const rtc::Optional<int>& narrow_peak_band,
bool saturated_echo,
+ bool linear_echo_estimate,
const std::array<float, kFftLengthBy2Plus1>& nearend,
const std::array<float, kFftLengthBy2Plus1>& echo,
const std::array<float, kFftLengthBy2Plus1>& comfort_noise,
@@ -262,17 +323,28 @@ void SuppressionGain::LowerBandGain(
for (int k = 0; k < 2; ++k) {
std::array<float, kFftLengthBy2Plus1> masker;
MaskingPower(config_, nearend, comfort_noise, last_masker_, *gain, &masker);
- GainToNoAudibleEcho(config_, low_noise_render, saturated_echo, nearend,
- echo, masker, min_gain, max_gain, one_by_echo, gain);
+ GainToNoAudibleEcho(config_, low_noise_render, saturated_echo,
+ linear_echo_estimate, nearend, echo, masker, min_gain,
+ max_gain, one_by_echo, gain);
AdjustForExternalFilters(gain);
if (narrow_peak_band) {
NarrowBandAttenuation(*narrow_peak_band, gain);
}
}
+ // Adjust the gain for frequencies which have not yet converged.
+ AdjustNonConvergedFrequencies(gain);
+
// Update the allowed maximum gain increase.
UpdateMaxGainIncrease(config_, no_saturation_counter_, low_noise_render,
- last_echo_, echo, last_gain_, *gain, &gain_increase_);
+ linear_echo_estimate, last_echo_, echo, last_gain_,
+ *gain, &gain_increase_);
+
+ // Adjust gain dynamics.
+ const float gain_bound =
+ std::max(0.001f, *std::min_element(gain->begin(), gain->end()) * 10000.f);
+ std::for_each(gain->begin(), gain->end(),
+ [gain_bound](float& a) { a = std::min(a, gain_bound); });
// Store data required for the gain computation of the next block.
std::copy(echo.begin(), echo.end(), last_echo_.begin());
@@ -300,6 +372,7 @@ void SuppressionGain::GetGain(
bool saturated_echo,
const std::vector<std::vector<float>>& render,
bool force_zero_gain,
+ bool linear_echo_estimate,
float* high_bands_gain,
std::array<float, kFftLengthBy2Plus1>* low_band_gain) {
RTC_DCHECK(high_bands_gain);
@@ -319,8 +392,9 @@ void SuppressionGain::GetGain(
// Compute gain for the lower band.
const rtc::Optional<int> narrow_peak_band =
render_signal_analyzer.NarrowPeakBand();
- LowerBandGain(low_noise_render, narrow_peak_band, saturated_echo, nearend,
- echo, comfort_noise, low_band_gain);
+ LowerBandGain(low_noise_render, narrow_peak_band, saturated_echo,
+ linear_echo_estimate, nearend, echo, comfort_noise,
+ low_band_gain);
// Compute the gain for the upper bands.
*high_bands_gain =
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.h
index 2d618c3ddd2..03c4d2d8b70 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
#include <array>
#include <vector>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/render_signal_analyzer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -32,6 +32,7 @@ class SuppressionGain {
bool saturated_echo,
const std::vector<std::vector<float>>& render,
bool force_zero_gain,
+ bool linear_echo_estimate,
float* high_bands_gain,
std::array<float, kFftLengthBy2Plus1>* low_band_gain);
@@ -39,6 +40,7 @@ class SuppressionGain {
void LowerBandGain(bool stationary_with_low_power,
const rtc::Optional<int>& narrow_peak_band,
bool saturated_echo,
+ bool linear_echo_estimate,
const std::array<float, kFftLengthBy2Plus1>& nearend,
const std::array<float, kFftLengthBy2Plus1>& echo,
const std::array<float, kFftLengthBy2Plus1>& comfort_noise,
@@ -66,4 +68,4 @@ class SuppressionGain {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
index cde3c94a323..83483991c83 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/suppression_gain.h"
+#include "modules/audio_processing/aec3/suppression_gain.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "rtc_base/checks.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace aec3 {
@@ -34,7 +34,7 @@ TEST(SuppressionGain, NullOutputGains) {
.GetGain(E2, R2, N2, RenderSignalAnalyzer(), false,
std::vector<std::vector<float>>(
3, std::vector<float>(kBlockSize, 0.f)),
- false, &high_bands_gain, nullptr),
+ false, true, &high_bands_gain, nullptr),
"");
}
@@ -57,7 +57,7 @@ TEST(SuppressionGain, BasicGainComputation) {
R2.fill(0.1f);
N2.fill(100.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false,
+ suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false, true,
&high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
@@ -68,7 +68,7 @@ TEST(SuppressionGain, BasicGainComputation) {
R2.fill(0.1f);
N2.fill(0.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false,
+ suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false, true,
&high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
@@ -79,14 +79,14 @@ TEST(SuppressionGain, BasicGainComputation) {
R2.fill(10000000000000.f);
N2.fill(0.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false,
+ suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, false, true,
&high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
[](float a) { EXPECT_NEAR(0.f, a, 0.001); });
// Verify the functionality for forcing a zero gain.
- suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, true,
+ suppression_gain.GetGain(E2, R2, N2, analyzer, false, x, true, true,
&high_bands_gain, &g);
std::for_each(g.begin(), g.end(), [](float a) { EXPECT_FLOAT_EQ(0.f, a); });
EXPECT_FLOAT_EQ(0.f, high_bands_gain);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h
index 008aa86f96e..0672b513f3c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
+#define MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
#if defined(WEBRTC_HAS_NEON)
#include <arm_neon.h>
#endif
@@ -23,9 +23,9 @@
#include <array>
#include <functional>
-#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace aec3 {
@@ -209,4 +209,4 @@ class VectorMath {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC3_VECTOR_MATH_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc
index 924ce31e888..6bf60ecb64d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec3/vector_math.h"
+#include "modules/audio_processing/aec3/vector_math.h"
#include <math.h>
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
index f868572c02a..e3f00f67a2e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
+#define MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/rtc_base/platform_file.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "rtc_base/platform_file.h"
namespace rtc {
class TaskQueue;
@@ -44,4 +44,4 @@ class AecDumpFactory {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc
index 497a12e974a..8fe7b745875 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc
@@ -10,12 +10,12 @@
#include <utility>
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h"
+#include "modules/audio_processing/aec_dump/aec_dump_impl.h"
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/event.h"
-#include "webrtc/rtc_base/ptr_util.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/event.h"
+#include "rtc_base/ptr_util.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h
index 2109cf58557..5be876b6b73 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h
@@ -8,30 +8,30 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
#include <memory>
#include <string>
#include <vector>
-#include "webrtc/modules/audio_processing/aec_dump/capture_stream_info.h"
-#include "webrtc/modules/audio_processing/aec_dump/write_to_file_task.h"
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/platform_file.h"
-#include "webrtc/rtc_base/race_checker.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/rtc_base/thread_annotations.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
+#include "modules/audio_processing/aec_dump/capture_stream_info.h"
+#include "modules/audio_processing/aec_dump/write_to_file_task.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/platform_file.h"
+#include "rtc_base/race_checker.h"
+#include "rtc_base/task_queue.h"
+#include "rtc_base/thread_annotations.h"
+#include "system_wrappers/include/file_wrapper.h"
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
#else
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
#endif
RTC_POP_IGNORING_WUNDEF()
@@ -77,4 +77,4 @@ class AecDumpImpl : public AecDump {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_integration_test.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
index c77cf919236..720e4f5c347 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
@@ -10,9 +10,9 @@
#include <utility>
-#include "webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/ptr_util.h"
+#include "modules/audio_processing/aec_dump/mock_aec_dump.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/ptr_util.h"
using testing::_;
using testing::AtLeast;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_unittest.cc
index d6f361789ff..965ac03bd7d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_unittest.cc
@@ -10,12 +10,12 @@
#include <utility>
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/task_queue.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
TEST(AecDumper, APICallsDoNotCrash) {
// Note order of initialization: Task queue has to be initialized
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc
index 5a49685494d..e3284d88222 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec_dump/capture_stream_info.h"
+#include "modules/audio_processing/aec_dump/capture_stream_info.h"
namespace webrtc {
CaptureStreamInfo::CaptureStreamInfo(std::unique_ptr<WriteToFileTask> task)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.h b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.h
index cd870206bd5..9999c3fbd04 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/capture_stream_info.h
@@ -8,26 +8,26 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
+#define MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
#include <memory>
#include <utility>
#include <vector>
-#include "webrtc/modules/audio_processing/aec_dump/write_to_file_task.h"
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/logging.h"
+#include "modules/audio_processing/aec_dump/write_to_file_task.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/logging.h"
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
#else
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
#endif
RTC_POP_IGNORING_WUNDEF()
@@ -63,4 +63,4 @@ class CaptureStreamInfo {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.cc
index 58e00c7212c..aa89e45fe86 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h"
+#include "modules/audio_processing/aec_dump/mock_aec_dump.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h
index 4661203b89a..6df6f2849cb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/mock_aec_dump.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
+#define MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
#include <memory>
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "modules/include/module_common_types.h"
+#include "test/gmock.h"
namespace webrtc {
@@ -47,4 +47,4 @@ class MockAecDump : public AecDump {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
index 7da3d5a53b4..5623e24aa5f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "modules/audio_processing/include/aec_dump.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.cc b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.cc
index f94f57bf5f2..5fdfd4ec829 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aec_dump/write_to_file_task.h"
+#include "modules/audio_processing/aec_dump/write_to_file_task.h"
-#include "webrtc/rtc_base/protobuf_utils.h"
+#include "rtc_base/protobuf_utils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.h b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.h
index 5f20ed82435..73014732472 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec_dump/write_to_file_task.h
@@ -8,26 +8,26 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
+#ifndef MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
+#define MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
#include <memory>
#include <string>
#include <utility>
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/event.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/platform_file.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/event.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/platform_file.h"
+#include "rtc_base/task_queue.h"
+#include "system_wrappers/include/file_wrapper.h"
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
#else
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
#endif
RTC_POP_IGNORING_WUNDEF()
@@ -55,4 +55,4 @@ class WriteToFileTask : public rtc::QueuedTask {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
+#endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.cc
index 0e0b6ffbfd4..61e6fa4db8d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.cc
@@ -8,23 +8,24 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
#include <stddef.h>
#include <stdlib.h>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/real_fft.h"
+#include "common_audio/ring_buffer.h"
+#include "common_audio/signal_processing/include/real_fft.h"
}
-#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "modules/audio_processing/aecm/echo_control_mobile.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
extern "C" {
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
}
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/typedefs.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/safe_conversions.h"
+#include "typedefs.h" // NOLINT(build/include)
#ifdef AEC_DEBUG
FILE *dfile;
@@ -927,8 +928,8 @@ void WebRtcAecm_UpdateChannel(AecmCore* aecm,
{
// We need to shift down before multiplication
shiftChFar = 32 - zerosCh - zerosFar;
- tmpU32no1 = (aecm->channelAdapt32[i] >> shiftChFar) *
- far_spectrum[i];
+ tmpU32no1 = rtc::dchecked_cast<uint32_t>(
+ aecm->channelAdapt32[i] >> shiftChFar) * far_spectrum[i];
}
// Determine Q-domain of numerator
zerosNum = WebRtcSpl_NormU32(tmpU32no1);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.h b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.h
index 33d80889aa4..feb997e9fa1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.h
@@ -10,15 +10,15 @@
// Performs echo control (suppression) with fft routines in fixed-point.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_
+#ifndef MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_
+#define MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/ring_buffer.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aecm/aecm_defines.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/aecm/aecm_defines.h"
+#include "typedefs.h" // NOLINT(build/include)
#ifdef _MSC_VER // visual c++
#define ALIGN8_BEG __declspec(align(8))
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
index 32f26569f86..f7cab45367f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
@@ -8,23 +8,24 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
#include <stddef.h>
#include <stdlib.h>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/real_fft.h"
+#include "common_audio/ring_buffer.h"
+#include "common_audio/signal_processing/include/real_fft.h"
}
-#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "modules/audio_processing/aecm/echo_control_mobile.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
extern "C" {
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
}
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/typedefs.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/sanitizer.h"
+#include "typedefs.h" // NOLINT(build/include)
// Square root of Hanning window in Q14.
static const ALIGN8_BEG int16_t WebRtcAecm_kSqrtHanning[] ALIGN8_END = {
@@ -276,11 +277,12 @@ static int TimeToFrequencyDomain(AecmCore* aecm,
return time_signal_scaling;
}
-int WebRtcAecm_ProcessBlock(AecmCore* aecm,
- const int16_t* farend,
- const int16_t* nearendNoisy,
- const int16_t* nearendClean,
- int16_t* output) {
+int RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/8200
+WebRtcAecm_ProcessBlock(AecmCore* aecm,
+ const int16_t* farend,
+ const int16_t* nearendNoisy,
+ const int16_t* nearendClean,
+ int16_t* output) {
int i;
uint32_t xfaSum;
@@ -453,6 +455,7 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
// How much can we shift right to preserve resolution
tmp32no1 = echoEst32[i] - aecm->echoFilt[i];
aecm->echoFilt[i] += (tmp32no1 * 50) >> 8;
+ // UBSan: 72293096 * 50 cannot be represented in type 'int'
zeros32 = WebRtcSpl_NormW32(aecm->echoFilt[i]) + 1;
zeros16 = WebRtcSpl_NormW16(supGain) + 1;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
index fcd659fee25..f2bd8da651a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
-#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aecm/echo_control_mobile.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "rtc_base/checks.h"
static const ALIGN8_BEG int16_t WebRtcAecm_kSqrtHanning[] ALIGN8_END = {
0, 399, 798, 1196, 1594, 1990, 2386, 2780, 3172,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
index ccf1985d645..ca7211f7385 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
#include <arm_neon.h>
-#include "webrtc/common_audio/signal_processing/include/real_fft.h"
-#include "webrtc/rtc_base/checks.h"
+#include "common_audio/signal_processing/include/real_fft.h"
+#include "rtc_base/checks.h"
// TODO(kma): Re-write the corresponding assembly file, the offset
// generating script and makefile, to replace these C functions.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_defines.h b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_defines.h
index 6d63990b9c2..ae2d2bc03a1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_defines.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_defines.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_
+#ifndef MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_
+#define MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_
#define AECM_DYNAMIC_Q /* Turn on/off dynamic Q-domain. */
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
index a81466e678e..880f0aa65ab 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
+#include "modules/audio_processing/aecm/echo_control_mobile.h"
#ifdef AEC_DEBUG
#include <stdio.h>
@@ -16,10 +16,10 @@
#include <stdlib.h>
extern "C" {
-#include "webrtc/common_audio/ring_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "common_audio/ring_buffer.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
}
-#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
#define BUF_SIZE_FRAMES 50 // buffer size (frames)
// Maximum length of resampled signal. Must be an integer multiple of frames
@@ -75,10 +75,10 @@ typedef struct
// Estimates delay to set the position of the farend buffer read pointer
// (controlled by knownDelay)
-static int WebRtcAecm_EstBufDelay(AecMobile* aecmInst, short msInSndCardBuf);
+static int WebRtcAecm_EstBufDelay(AecMobile* aecm, short msInSndCardBuf);
// Stuffs the farend buffer if the estimated delay is too large
-static int WebRtcAecm_DelayComp(AecMobile* aecmInst);
+static int WebRtcAecm_DelayComp(AecMobile* aecm);
void* WebRtcAecm_Create() {
AecMobile* aecm = static_cast<AecMobile*>(malloc(sizeof(AecMobile)));
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.h b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.h
index b45ff599074..e0091c3e575 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
+#ifndef MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
+#define MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
#include <stdlib.h>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
enum {
AecmFalse = 0,
@@ -206,4 +206,4 @@ size_t WebRtcAecm_echo_path_size_bytes();
#ifdef __cplusplus
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
+#endif // MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/agc.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/agc.cc
index 1370d38cc3e..0c6478e803e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/agc.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/agc.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc/agc.h"
+#include "modules/audio_processing/agc/agc.h"
#include <cmath>
#include <cstdlib>
@@ -16,10 +16,10 @@
#include <algorithm>
#include <vector>
-#include "webrtc/modules/audio_processing/agc/loudness_histogram.h"
-#include "webrtc/modules/audio_processing/agc/utility.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/agc/loudness_histogram.h"
+#include "modules/audio_processing/agc/utility.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/agc.h b/chromium/third_party/webrtc/modules/audio_processing/agc/agc.h
index e681e376de2..3a8d5c8122c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/agc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/agc.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_AGC_H_
+#define MODULES_AUDIO_PROCESSING_AGC_AGC_H_
#include <memory>
-#include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/vad/voice_activity_detector.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -53,4 +53,4 @@ class Agc {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_AGC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
index 0bf5ec8ffc3..7d93d7d2cad 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
+#include "modules/audio_processing/agc/agc_manager_direct.h"
#include <cmath>
@@ -16,13 +16,13 @@
#include <cstdio>
#endif
-#include "webrtc/modules/audio_processing/agc/gain_map_internal.h"
-#include "webrtc/modules/audio_processing/gain_control_impl.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "modules/audio_processing/agc/gain_map_internal.h"
+#include "modules/audio_processing/gain_control_impl.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/safe_minmax.h"
+#include "system_wrappers/include/metrics.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.h b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.h
index 7a2e3ef77ea..03d2607f85f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
+#define MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
#include <memory>
-#include "webrtc/modules/audio_processing/agc/agc.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/agc/agc.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -110,4 +110,4 @@ class AgcManagerDirect final {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc
index b582ae56698..6a8af6aa71e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc
@@ -8,23 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
+#include "modules/audio_processing/agc/agc_manager_direct.h"
-#include "webrtc/common_types.h"
-#include "webrtc/modules/audio_processing/agc/mock_agc.h"
-#include "webrtc/modules/audio_processing/include/mock_audio_processing.h"
-#include "webrtc/system_wrappers/include/trace.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/trace_to_stderr.h"
+#include "common_types.h" // NOLINT(build/include)
+#include "modules/audio_processing/agc/mock_agc.h"
+#include "modules/audio_processing/include/mock_audio_processing.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
using ::testing::_;
using ::testing::DoAll;
-using ::testing::Eq;
-using ::testing::Mock;
using ::testing::Return;
using ::testing::SetArgPointee;
-using ::testing::SetArgReferee;
namespace webrtc {
namespace {
@@ -97,7 +92,6 @@ class AgcManagerDirectTest : public ::testing::Test {
test::MockGainControl gctrl_;
TestVolumeCallbacks volume_;
AgcManagerDirect manager_;
- test::TraceToStderr trace_to_stderr;
};
TEST_F(AgcManagerDirectTest, StartupMinVolumeConfigurationIsRespected) {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/gain_map_internal.h b/chromium/third_party/webrtc/modules/audio_processing/agc/gain_map_internal.h
index 53c71c1148a..f09c748b59b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/gain_map_internal.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/gain_map_internal.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
+#define MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
static const int kGainMapSize = 256;
// Uses parameters: si = 2, sf = 0.25, D = 8/256
@@ -272,4 +272,4 @@ static const int kGainMap[kGainMapSize] = {
64
};
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.c b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.c
index 92b3e00ee05..662e88b6e78 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.c
@@ -17,14 +17,14 @@
*
*/
-#include "webrtc/modules/audio_processing/agc/legacy/analog_agc.h"
+#include "modules/audio_processing/agc/legacy/analog_agc.h"
#include <stdlib.h>
#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
/* The slope of in Q13*/
static const int16_t kSlope1[8] = {21793, 12517, 7189, 4129,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.h b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.h
index 235fd143097..1fed3779ae4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/analog_agc.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
+#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
//#define MIC_LEVEL_FEEDBACK
#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
-#include "webrtc/modules/audio_processing/agc/legacy/digital_agc.h"
-#include "webrtc/modules/audio_processing/agc/legacy/gain_control.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/agc/legacy/digital_agc.h"
+#include "modules/audio_processing/agc/legacy/gain_control.h"
+#include "typedefs.h" // NOLINT(build/include)
/* Analog Automatic Gain Control variables:
* Constant declarations (inner limits inside which no changes are done)
@@ -129,4 +129,4 @@ typedef struct {
int16_t lowLevelSignal;
} LegacyAgc;
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.c b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.c
index a9ad55ae8cd..8353f85f677 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.c
@@ -12,15 +12,15 @@
*
*/
-#include "webrtc/modules/audio_processing/agc/legacy/digital_agc.h"
+#include "modules/audio_processing/agc/legacy/digital_agc.h"
#include <string.h>
#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/modules/audio_processing/agc/legacy/gain_control.h"
+#include "rtc_base/checks.h"
+#include "modules/audio_processing/agc/legacy/gain_control.h"
// To generate the gaintable, copy&paste the following lines to a Matlab window:
// MaxGain = 6; MinGain = 0; CompRatio = 3; Knee = 1;
@@ -524,8 +524,17 @@ int32_t WebRtcAgc_ProcessDigital(DigitalAgc* stt,
// iterate over samples
for (n = 0; n < L; n++) {
for (i = 0; i < num_bands; ++i) {
- tmp32 = out[i][k * L + n] * (gain32 >> 4);
- out[i][k * L + n] = (int16_t)(tmp32 >> 16);
+ int64_t tmp64 = ((int64_t)(out[i][k * L + n])) * (gain32 >> 4);
+ tmp64 = tmp64 >> 16;
+ if (tmp64 > 32767) {
+ out[i][k * L + n] = 32767;
+ }
+ else if (tmp64 < -32768) {
+ out[i][k * L + n] = -32768;
+ }
+ else {
+ out[i][k * L + n] = (int16_t)(tmp64);
+ }
}
gain32 += delta;
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.h b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.h
index 4664b59dc8e..af6cf488371 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/digital_agc.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
+#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
#ifdef WEBRTC_AGC_DEBUG_DUMP
#include <stdio.h>
#endif
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "typedefs.h" // NOLINT(build/include)
// the 32 most significant bits of A(19) * B(26) >> 13
#define AGC_MUL32(A, B) (((B) >> 13) * (A) + (((0x00001FFF & (B)) * (A)) >> 13))
@@ -76,4 +76,4 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t* gainTable, // Q16
uint8_t limiterEnable,
int16_t analogTarget);
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/gain_control.h b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/gain_control.h
index c3157500cf7..0f121b143aa 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/gain_control.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/legacy/gain_control.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
+#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
// Errors
#define AGC_UNSPECIFIED_ERROR 18000
@@ -244,4 +244,4 @@ int WebRtcAgc_Init(void* agcInst,
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.cc
index cc21f2ae3d9..63d5f7cad04 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc/loudness_histogram.h"
+#include "modules/audio_processing/agc/loudness_histogram.h"
#include <cmath>
#include <cstring>
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.h b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.h
index b079299a098..ab45276f060 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
+#define MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
#include <string.h>
#include <memory>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -89,4 +89,4 @@ class LoudnessHistogram {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram_unittest.cc
index 089c05a0234..8c617107ffc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/loudness_histogram_unittest.cc
@@ -10,16 +10,16 @@
// Use CreateHistUnittestFile.m to generate the input file.
-#include "webrtc/modules/audio_processing/agc/loudness_histogram.h"
+#include "modules/audio_processing/agc/loudness_histogram.h"
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <memory>
-#include "webrtc/modules/audio_processing/agc/utility.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_processing/agc/utility.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/mock_agc.h b/chromium/third_party/webrtc/modules/audio_processing/agc/mock_agc.h
index 3b9c22fb75d..36901af50c2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/mock_agc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/mock_agc.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
+#define MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
-#include "webrtc/modules/audio_processing/agc/agc.h"
+#include "modules/audio_processing/agc/agc.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gmock.h"
+#include "modules/include/module_common_types.h"
+#include "test/gmock.h"
namespace webrtc {
@@ -33,4 +33,4 @@ class MockAgc : public Agc {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/utility.cc b/chromium/third_party/webrtc/modules/audio_processing/agc/utility.cc
index 48458adfb51..554a8377aa7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/utility.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/utility.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc/utility.h"
+#include "modules/audio_processing/agc/utility.h"
#include <math.h>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc/utility.h b/chromium/third_party/webrtc/modules/audio_processing/agc/utility.h
index df85c2e129c..8ba87b6d555 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc/utility.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc/utility.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
+#define MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
// TODO(turajs): Add description of function.
double Loudness2Db(double loudness);
@@ -20,4 +20,4 @@ double Db2Loudness(double db);
double Dbfs2Loudness(double dbfs);
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.cc b/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.cc
index d8b8c981973..ec706eca981 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc2/digital_gain_applier.h"
+#include "modules/audio_processing/agc2/digital_gain_applier.h"
#include <algorithm>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.h b/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.h
index d9ad1d935a5..6e9be8eca6f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc2/digital_gain_applier.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
+#define MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
namespace webrtc {
@@ -29,4 +29,4 @@ class DigitalGainApplier {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC2_DIGITAL_GAIN_APPLIER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.cc b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.cc
index 20680f64a84..6c1ce45e709 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/agc2/gain_controller2.h"
+#include "modules/audio_processing/agc2/gain_controller2.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.h b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.h
index 1a8bb7f39c2..9ab8656a3a2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
+#define MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/agc2/digital_gain_applier.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/agc2/digital_gain_applier.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -53,4 +53,4 @@ class GainController2 {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC2_GAIN_CONTROLLER2_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2_unittest.cc
index faa8d169e68..7c9acc6d3af 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/agc2/gain_controller2_unittest.cc
@@ -11,11 +11,11 @@
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/agc2/digital_gain_applier.h"
-#include "webrtc/modules/audio_processing/agc2/gain_controller2.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/agc2/digital_gain_applier.h"
+#include "modules/audio_processing/agc2/gain_controller2.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "test/gtest.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc
index 6c8ddd6255f..16f11742e3f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/resampler/push_sinc_resampler.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/common.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/audio_buffer.h"
+
+#include "common_audio/channel_buffer.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/resampler/push_sinc_resampler.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/common.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h
index da75dbf1b80..8451bdeeaa7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
#include <memory>
#include <vector>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/splitting_filter.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/splitting_filter.h"
+#include "modules/include/module_common_types.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -163,4 +163,4 @@ class AudioBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer_unittest.cc
index c89770cd4da..4cbb98eb509 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_buffer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_buffer_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc
index 9b80318e909..68a24d27c91 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -8,44 +8,45 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_processing_impl.h"
+#include "modules/audio_processing/audio_processing_impl.h"
#include <math.h>
#include <algorithm>
#include <string>
-#include "webrtc/common_audio/audio_converter.h"
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/modules/audio_processing/aec3/echo_canceller3.h"
-#include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
-#include "webrtc/modules/audio_processing/agc2/gain_controller2.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h"
-#include "webrtc/modules/audio_processing/common.h"
-#include "webrtc/modules/audio_processing/echo_cancellation_impl.h"
-#include "webrtc/modules/audio_processing/echo_control_mobile_impl.h"
-#include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h"
-#include "webrtc/modules/audio_processing/gain_control_impl.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/platform_file.h"
-#include "webrtc/rtc_base/trace_event.h"
+#include "common_audio/audio_converter.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec3/echo_canceller3.h"
+#include "modules/audio_processing/agc/agc_manager_direct.h"
+#include "modules/audio_processing/agc2/gain_controller2.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
+#include "modules/audio_processing/common.h"
+#include "modules/audio_processing/echo_cancellation_impl.h"
+#include "modules/audio_processing/echo_control_mobile_impl.h"
+#include "modules/audio_processing/gain_control_for_experimental_agc.h"
+#include "modules/audio_processing/gain_control_impl.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/platform_file.h"
+#include "rtc_base/refcountedobject.h"
+#include "rtc_base/trace_event.h"
#if WEBRTC_INTELLIGIBILITY_ENHANCER
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h"
+#include "modules/audio_processing/intelligibility/intelligibility_enhancer.h"
#endif
-#include "webrtc/modules/audio_processing/level_controller/level_controller.h"
-#include "webrtc/modules/audio_processing/level_estimator_impl.h"
-#include "webrtc/modules/audio_processing/low_cut_filter.h"
-#include "webrtc/modules/audio_processing/noise_suppression_impl.h"
-#include "webrtc/modules/audio_processing/residual_echo_detector.h"
-#include "webrtc/modules/audio_processing/transient/transient_suppressor.h"
-#include "webrtc/modules/audio_processing/voice_detection_impl.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "modules/audio_processing/level_controller/level_controller.h"
+#include "modules/audio_processing/level_estimator_impl.h"
+#include "modules/audio_processing/low_cut_filter.h"
+#include "modules/audio_processing/noise_suppression_impl.h"
+#include "modules/audio_processing/residual_echo_detector.h"
+#include "modules/audio_processing/transient/transient_suppressor.h"
+#include "modules/audio_processing/voice_detection_impl.h"
+#include "modules/include/module_common_types.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "system_wrappers/include/metrics.h"
// Check to verify that the define for the intelligibility enhancer is properly
// set.
@@ -170,7 +171,9 @@ webrtc::InternalAPMStreamsConfig ToStreamsConfig(
// Throughout webrtc, it's assumed that success is represented by zero.
static_assert(AudioProcessing::kNoError == 0, "kNoError must be zero");
-AudioProcessingImpl::ApmSubmoduleStates::ApmSubmoduleStates() {}
+AudioProcessingImpl::ApmSubmoduleStates::ApmSubmoduleStates(
+ bool capture_post_processor_enabled)
+ : capture_post_processor_enabled_(capture_post_processor_enabled) {}
bool AudioProcessingImpl::ApmSubmoduleStates::Update(
bool low_cut_filter_enabled,
@@ -250,7 +253,7 @@ bool AudioProcessingImpl::ApmSubmoduleStates::CaptureMultiBandProcessingActive()
bool AudioProcessingImpl::ApmSubmoduleStates::CaptureFullBandProcessingActive()
const {
- return level_controller_enabled_;
+ return level_controller_enabled_ || capture_post_processor_enabled_;
}
bool AudioProcessingImpl::ApmSubmoduleStates::RenderMultiBandSubModulesActive()
@@ -289,8 +292,10 @@ struct AudioProcessingImpl::ApmPublicSubmodules {
};
struct AudioProcessingImpl::ApmPrivateSubmodules {
- explicit ApmPrivateSubmodules(NonlinearBeamformer* beamformer)
- : beamformer(beamformer) {}
+ ApmPrivateSubmodules(NonlinearBeamformer* beamformer,
+ std::unique_ptr<PostProcessing> capture_post_processor)
+ : beamformer(beamformer),
+ capture_post_processor(std::move(capture_post_processor)) {}
// Accessed internally from capture or during initialization
std::unique_ptr<NonlinearBeamformer> beamformer;
std::unique_ptr<AgcManagerDirect> agc_manager;
@@ -298,22 +303,30 @@ struct AudioProcessingImpl::ApmPrivateSubmodules {
std::unique_ptr<LowCutFilter> low_cut_filter;
std::unique_ptr<LevelController> level_controller;
std::unique_ptr<ResidualEchoDetector> residual_echo_detector;
- std::unique_ptr<EchoCanceller3> echo_canceller3;
+ std::unique_ptr<EchoControl> echo_controller;
+ std::unique_ptr<PostProcessing> capture_post_processor;
};
AudioProcessing* AudioProcessing::Create() {
webrtc::Config config;
- return Create(config, nullptr);
+ return Create(config, nullptr, nullptr);
}
AudioProcessing* AudioProcessing::Create(const webrtc::Config& config) {
- return Create(config, nullptr);
+ return Create(config, nullptr, nullptr);
}
AudioProcessing* AudioProcessing::Create(const webrtc::Config& config,
NonlinearBeamformer* beamformer) {
- AudioProcessingImpl* apm =
- new rtc::RefCountedObject<AudioProcessingImpl>(config, beamformer);
+ return Create(config, nullptr, beamformer);
+}
+
+AudioProcessing* AudioProcessing::Create(
+ const webrtc::Config& config,
+ std::unique_ptr<PostProcessing> capture_post_processor,
+ NonlinearBeamformer* beamformer) {
+ AudioProcessingImpl* apm = new rtc::RefCountedObject<AudioProcessingImpl>(
+ config, std::move(capture_post_processor), beamformer);
if (apm->Initialize() != kNoError) {
delete apm;
apm = nullptr;
@@ -323,13 +336,18 @@ AudioProcessing* AudioProcessing::Create(const webrtc::Config& config,
}
AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config)
- : AudioProcessingImpl(config, nullptr) {}
+ : AudioProcessingImpl(config, nullptr, nullptr) {}
-AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config,
- NonlinearBeamformer* beamformer)
+AudioProcessingImpl::AudioProcessingImpl(
+ const webrtc::Config& config,
+ std::unique_ptr<PostProcessing> capture_post_processor,
+ NonlinearBeamformer* beamformer)
: high_pass_filter_impl_(new HighPassFilterImpl(this)),
+ submodule_states_(!!capture_post_processor),
public_submodules_(new ApmPublicSubmodules()),
- private_submodules_(new ApmPrivateSubmodules(beamformer)),
+ private_submodules_(
+ new ApmPrivateSubmodules(beamformer,
+ std::move(capture_post_processor))),
constants_(config.Get<ExperimentalAgc>().startup_min_volume,
config.Get<ExperimentalAgc>().clipped_level_min,
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
@@ -371,6 +389,9 @@ AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config,
// TODO(peah): Move this creation to happen only when the level controller
// is enabled.
private_submodules_->level_controller.reset(new LevelController());
+
+ LOG(LS_INFO) << "Capture post processor activated: "
+ << !!private_submodules_->capture_post_processor;
}
SetExtraOptions(config);
@@ -525,6 +546,7 @@ int AudioProcessingImpl::InitializeLocked() {
InitializeResidualEchoDetector();
InitializeEchoCanceller3();
InitializeGainController2();
+ InitializePostProcessor();
if (aec_dump_) {
aec_dump_->WriteInitMessage(ToStreamsConfig(formats_.api_format));
@@ -1132,11 +1154,11 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
levels.peak, 1, RmsLevel::kMinLevelDb, 64);
}
- if (private_submodules_->echo_canceller3) {
+ if (private_submodules_->echo_controller) {
// TODO(peah): Reactivate analogue AGC gain detection once the analogue AGC
// issues have been addressed.
capture_.echo_path_gain_change = false;
- private_submodules_->echo_canceller3->AnalyzeCapture(capture_buffer);
+ private_submodules_->echo_controller->AnalyzeCapture(capture_buffer);
}
if (constants_.use_experimental_agc &&
@@ -1152,7 +1174,7 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
capture_buffer->SplitIntoFrequencyBands();
}
- if (private_submodules_->echo_canceller3) {
+ if (private_submodules_->echo_controller) {
// Force down-mixing of the number of channels after the detection of
// capture signal saturation.
// TODO(peah): Look into ensuring that this kind of tampering with the
@@ -1169,7 +1191,7 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
// TODO(peah): Move the AEC3 low-cut filter to this place.
if (private_submodules_->low_cut_filter &&
- !private_submodules_->echo_canceller3) {
+ !private_submodules_->echo_controller) {
private_submodules_->low_cut_filter->Process(capture_buffer);
}
RETURN_ON_ERR(
@@ -1183,8 +1205,8 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
return AudioProcessing::kStreamParameterNotSetError;
}
- if (private_submodules_->echo_canceller3) {
- private_submodules_->echo_canceller3->ProcessCapture(
+ if (private_submodules_->echo_controller) {
+ private_submodules_->echo_controller->ProcessCapture(
capture_buffer, capture_.echo_path_gain_change);
} else {
RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio(
@@ -1218,7 +1240,7 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
return AudioProcessing::kStreamParameterNotSetError;
}
- if (!(private_submodules_->echo_canceller3 ||
+ if (!(private_submodules_->echo_controller ||
public_submodules_->echo_cancellation->is_enabled())) {
RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio(
capture_buffer, stream_delay_ms()));
@@ -1278,6 +1300,10 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
private_submodules_->level_controller->Process(capture_buffer);
}
+ if (private_submodules_->capture_post_processor) {
+ private_submodules_->capture_post_processor->Process(capture_buffer);
+ }
+
// The level estimator operates on the recombined data.
public_submodules_->level_estimator->ProcessStream(capture_buffer);
@@ -1434,8 +1460,8 @@ int AudioProcessingImpl::ProcessRenderStreamLocked() {
}
// TODO(peah): Perform the queueing ínside QueueRenderAudiuo().
- if (private_submodules_->echo_canceller3) {
- private_submodules_->echo_canceller3->AnalyzeRender(render_buffer);
+ if (private_submodules_->echo_controller) {
+ private_submodules_->echo_controller->AnalyzeRender(render_buffer);
}
if (submodule_states_.RenderMultiBandProcessingActive() &&
@@ -1672,10 +1698,10 @@ void AudioProcessingImpl::InitializeLowCutFilter() {
void AudioProcessingImpl::InitializeEchoCanceller3() {
if (capture_nonlocked_.echo_canceller3_enabled) {
- private_submodules_->echo_canceller3.reset(new EchoCanceller3(
+ private_submodules_->echo_controller.reset(new EchoCanceller3(
config_.echo_canceller3, proc_sample_rate_hz(), true));
} else {
- private_submodules_->echo_canceller3.reset();
+ private_submodules_->echo_controller.reset();
}
}
@@ -1696,6 +1722,13 @@ void AudioProcessingImpl::InitializeResidualEchoDetector() {
private_submodules_->residual_echo_detector->Initialize();
}
+void AudioProcessingImpl::InitializePostProcessor() {
+ if (private_submodules_->capture_post_processor) {
+ private_submodules_->capture_post_processor->Initialize(
+ proc_sample_rate_hz(), num_proc_channels());
+ }
+}
+
void AudioProcessingImpl::MaybeUpdateHistograms() {
static const int kMinDiffDelayMs = 60;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h
index 325d1be564d..1e5695ca5a7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -8,26 +8,26 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
#include <list>
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
-#include "webrtc/modules/audio_processing/rms_level.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/rtc_base/function_view.h"
-#include "webrtc/rtc_base/gtest_prod_util.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/protobuf_utils.h"
-#include "webrtc/rtc_base/swap_queue.h"
-#include "webrtc/rtc_base/thread_annotations.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/render_queue_item_verifier.h"
+#include "modules/audio_processing/rms_level.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/function_view.h"
+#include "rtc_base/gtest_prod_util.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/protobuf_utils.h"
+#include "rtc_base/swap_queue.h"
+#include "rtc_base/thread_annotations.h"
+#include "system_wrappers/include/file_wrapper.h"
namespace webrtc {
@@ -39,8 +39,10 @@ class AudioProcessingImpl : public AudioProcessing {
// Methods forcing APM to run in a single-threaded manner.
// Acquires both the render and capture locks.
explicit AudioProcessingImpl(const webrtc::Config& config);
- // AudioProcessingImpl takes ownership of beamformer.
+ // AudioProcessingImpl takes ownership of capture post processor and
+ // beamformer.
AudioProcessingImpl(const webrtc::Config& config,
+ std::unique_ptr<PostProcessing> capture_post_processor,
NonlinearBeamformer* beamformer);
~AudioProcessingImpl() override;
int Initialize() override;
@@ -100,7 +102,7 @@ class AudioProcessingImpl : public AudioProcessing {
size_t num_reverse_channels() const override;
int stream_delay_ms() const override;
bool was_stream_delay_set() const override
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
AudioProcessingStatistics GetStatistics() const override;
@@ -125,7 +127,7 @@ class AudioProcessingImpl : public AudioProcessing {
protected:
// Overridden in a mock.
virtual int InitializeLocked()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
private:
// TODO(peah): These friend classes should be removed as soon as the new
@@ -141,7 +143,7 @@ class AudioProcessingImpl : public AudioProcessing {
class ApmSubmoduleStates {
public:
- ApmSubmoduleStates();
+ explicit ApmSubmoduleStates(bool capture_post_processor_enabled);
// Updates the submodule state and returns true if it has changed.
bool Update(bool low_cut_filter_enabled,
bool echo_canceller_enabled,
@@ -164,6 +166,7 @@ class AudioProcessingImpl : public AudioProcessing {
bool RenderMultiBandProcessingActive() const;
private:
+ const bool capture_post_processor_enabled_ = false;
bool low_cut_filter_enabled_ = false;
bool echo_canceller_enabled_ = false;
bool mobile_echo_controller_enabled_ = false;
@@ -188,49 +191,51 @@ class AudioProcessingImpl : public AudioProcessing {
// The struct is modified in a single-threaded manner by holding both the
// render and capture locks.
int MaybeInitialize(const ProcessingConfig& config, bool force_initialization)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
int MaybeInitializeRender(const ProcessingConfig& processing_config)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
int MaybeInitializeCapture(const ProcessingConfig& processing_config,
bool force_initialization)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
// Method for updating the state keeping track of the active submodules.
// Returns a bool indicating whether the state has changed.
- bool UpdateActiveSubmoduleStates() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ bool UpdateActiveSubmoduleStates()
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Methods requiring APM running in a single-threaded manner.
// Are called with both the render and capture locks already
// acquired.
void InitializeTransient()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
void InitializeBeamformer()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
void InitializeIntelligibility()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
int InitializeLocked(const ProcessingConfig& config)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
- void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ void InitializeLevelController() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializeResidualEchoDetector()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
- void InitializeLowCutFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
- void InitializeEchoCanceller3() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
- void InitializeGainController2();
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ void InitializeLowCutFilter() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void InitializeEchoCanceller3() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void InitializeGainController2() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void InitializePostProcessor() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void EmptyQueuedRenderAudio();
void AllocateRenderQueue()
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
void QueueBandedRenderAudio(AudioBuffer* audio)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
void QueueNonbandedRenderAudio(AudioBuffer* audio)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
// Capture-side exclusive methods possibly running APM in a multi-threaded
// manner that are called with the render lock already acquired.
- int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
- void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ int ProcessCaptureStreamLocked() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void MaybeUpdateHistograms() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Render-side exclusive methods possibly running APM in a multi-threaded
// manner that are called with the render lock already acquired.
@@ -238,8 +243,8 @@ class AudioProcessingImpl : public AudioProcessing {
int AnalyzeReverseStreamLocked(const float* const* src,
const StreamConfig& input_config,
const StreamConfig& output_config)
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
- int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
+ int ProcessRenderStreamLocked() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
// Collects configuration settings from public and private
// submodules to be saved as an audioproc::Config message on the
@@ -247,27 +252,27 @@ class AudioProcessingImpl : public AudioProcessing {
// config if it is different from the last saved one; if |forced|,
// writes the config regardless of the last saved.
void WriteAecDumpConfigMessage(bool forced)
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Notifies attached AecDump of current configuration and capture data.
void RecordUnprocessedCaptureStream(const float* const* capture_stream)
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void RecordUnprocessedCaptureStream(const AudioFrame& capture_frame)
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Notifies attached AecDump of current configuration and
// processed capture data and issues a capture stream recording
// request.
void RecordProcessedCaptureStream(
const float* const* processed_capture_stream)
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void RecordProcessedCaptureStream(const AudioFrame& processed_capture_frame)
- EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Notifies attached AecDump about current state (delay, drift, etc).
- void RecordAudioProcessingState() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void RecordAudioProcessingState() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// AecDump instance used for optionally logging APM config, input
// and output to file in the AEC-dump format defined in debug.proto.
@@ -275,10 +280,10 @@ class AudioProcessingImpl : public AudioProcessing {
// Hold the last config written with AecDump for avoiding writing
// the same config twice.
- InternalAPMConfig apm_config_for_aec_dump_ GUARDED_BY(crit_capture_);
+ InternalAPMConfig apm_config_for_aec_dump_ RTC_GUARDED_BY(crit_capture_);
// Critical sections.
- rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
+ rtc::CriticalSection crit_render_ RTC_ACQUIRED_BEFORE(crit_capture_);
rtc::CriticalSection crit_capture_;
// Struct containing the Config specifying the behavior of APM.
@@ -345,7 +350,7 @@ class AudioProcessingImpl : public AudioProcessing {
StreamConfig capture_processing_format;
int split_rate;
bool echo_path_gain_change;
- } capture_ GUARDED_BY(crit_capture_);
+ } capture_ RTC_GUARDED_BY(crit_capture_);
struct ApmCaptureNonLockedState {
ApmCaptureNonLockedState(bool beamformer_enabled,
@@ -373,31 +378,31 @@ class AudioProcessingImpl : public AudioProcessing {
~ApmRenderState();
std::unique_ptr<AudioConverter> render_converter;
std::unique_ptr<AudioBuffer> render_audio;
- } render_ GUARDED_BY(crit_render_);
+ } render_ RTC_GUARDED_BY(crit_render_);
- size_t aec_render_queue_element_max_size_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_) = 0;
- std::vector<float> aec_render_queue_buffer_ GUARDED_BY(crit_render_);
- std::vector<float> aec_capture_queue_buffer_ GUARDED_BY(crit_capture_);
+ size_t aec_render_queue_element_max_size_ RTC_GUARDED_BY(crit_render_)
+ RTC_GUARDED_BY(crit_capture_) = 0;
+ std::vector<float> aec_render_queue_buffer_ RTC_GUARDED_BY(crit_render_);
+ std::vector<float> aec_capture_queue_buffer_ RTC_GUARDED_BY(crit_capture_);
- size_t aecm_render_queue_element_max_size_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_) = 0;
- std::vector<int16_t> aecm_render_queue_buffer_ GUARDED_BY(crit_render_);
- std::vector<int16_t> aecm_capture_queue_buffer_ GUARDED_BY(crit_capture_);
+ size_t aecm_render_queue_element_max_size_ RTC_GUARDED_BY(crit_render_)
+ RTC_GUARDED_BY(crit_capture_) = 0;
+ std::vector<int16_t> aecm_render_queue_buffer_ RTC_GUARDED_BY(crit_render_);
+ std::vector<int16_t> aecm_capture_queue_buffer_ RTC_GUARDED_BY(crit_capture_);
- size_t agc_render_queue_element_max_size_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_) = 0;
- std::vector<int16_t> agc_render_queue_buffer_ GUARDED_BY(crit_render_);
- std::vector<int16_t> agc_capture_queue_buffer_ GUARDED_BY(crit_capture_);
+ size_t agc_render_queue_element_max_size_ RTC_GUARDED_BY(crit_render_)
+ RTC_GUARDED_BY(crit_capture_) = 0;
+ std::vector<int16_t> agc_render_queue_buffer_ RTC_GUARDED_BY(crit_render_);
+ std::vector<int16_t> agc_capture_queue_buffer_ RTC_GUARDED_BY(crit_capture_);
- size_t red_render_queue_element_max_size_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_) = 0;
- std::vector<float> red_render_queue_buffer_ GUARDED_BY(crit_render_);
- std::vector<float> red_capture_queue_buffer_ GUARDED_BY(crit_capture_);
+ size_t red_render_queue_element_max_size_ RTC_GUARDED_BY(crit_render_)
+ RTC_GUARDED_BY(crit_capture_) = 0;
+ std::vector<float> red_render_queue_buffer_ RTC_GUARDED_BY(crit_render_);
+ std::vector<float> red_capture_queue_buffer_ RTC_GUARDED_BY(crit_capture_);
- RmsLevel capture_input_rms_ GUARDED_BY(crit_capture_);
- RmsLevel capture_output_rms_ GUARDED_BY(crit_capture_);
- int capture_rms_interval_counter_ GUARDED_BY(crit_capture_) = 0;
+ RmsLevel capture_input_rms_ RTC_GUARDED_BY(crit_capture_);
+ RmsLevel capture_output_rms_ RTC_GUARDED_BY(crit_capture_);
+ int capture_rms_interval_counter_ RTC_GUARDED_BY(crit_capture_) = 0;
// Lock protection not needed.
std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>>
@@ -414,4 +419,4 @@ class AudioProcessingImpl : public AudioProcessing {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
index db2aacbf041..6c3bad57e64 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
@@ -8,22 +8,21 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_processing_impl.h"
+#include "modules/audio_processing/audio_processing_impl.h"
#include <algorithm>
#include <memory>
#include <vector>
-#include "webrtc/config.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/rtc_base/event.h"
-#include "webrtc/rtc_base/platform_thread.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/system_wrappers/include/sleep.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/event.h"
+#include "rtc_base/platform_thread.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/sleep.h"
+#include "test/gtest.h"
namespace webrtc {
@@ -84,7 +83,7 @@ class RandomGenerator {
private:
rtc::CriticalSection crit_;
- Random rand_gen_ GUARDED_BY(crit_);
+ Random rand_gen_ RTC_GUARDED_BY(crit_);
};
// Variables related to the audio data and formats.
@@ -301,8 +300,8 @@ class FrameCounters {
private:
rtc::CriticalSection crit_;
- int render_count GUARDED_BY(crit_) = 0;
- int capture_count GUARDED_BY(crit_) = 0;
+ int render_count RTC_GUARDED_BY(crit_) = 0;
+ int capture_count RTC_GUARDED_BY(crit_) = 0;
};
// Class for handling the capture side processing.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc
index 2ee1d519367..107d905642f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc
@@ -8,16 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_processing_impl.h"
+#include "modules/audio_processing/audio_processing_impl.h"
-#include "webrtc/config.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "modules/include/module_common_types.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
using ::testing::Invoke;
-using ::testing::Return;
namespace webrtc {
namespace {
@@ -28,7 +26,7 @@ class MockInitialize : public AudioProcessingImpl {
: AudioProcessingImpl(config) {}
MOCK_METHOD0(InitializeLocked, int());
- int RealInitializeLocked() NO_THREAD_SAFETY_ANALYSIS {
+ int RealInitializeLocked() RTC_NO_THREAD_SAFETY_ANALYSIS {
return AudioProcessingImpl::InitializeLocked();
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
index 2c20c0fb726..5418e567136 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/audio_processing_impl.h"
+#include "modules/audio_processing/audio_processing_impl.h"
#include <math.h>
@@ -15,18 +15,17 @@
#include <memory>
#include <vector>
-#include "webrtc/config.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/platform_thread.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/rtc_base/safe_conversions.h"
-#include "webrtc/system_wrappers/include/clock.h"
-#include "webrtc/system_wrappers/include/event_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/perf_test.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/platform_thread.h"
+#include "rtc_base/random.h"
+#include "rtc_base/safe_conversions.h"
+#include "system_wrappers/include/clock.h"
+#include "system_wrappers/include/event_wrapper.h"
+#include "test/gtest.h"
+#include "test/testsupport/perf_test.h"
// Check to verify that the define for the intelligibility enhancer is properly
// set.
@@ -258,7 +257,7 @@ class TimedThreadApiProcessor {
bool Process();
// Method for printing out the simulation statistics.
- void print_processor_statistics(std::string processor_name) const {
+ void print_processor_statistics(const std::string& processor_name) const {
const std::string modifier = "_api_call_duration";
// Lambda function for creating a test printout string.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_unittest.cc
index 243a1404401..3bf6fd263eb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/audio_processing_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/audio_processing_unittest.cc
@@ -15,37 +15,38 @@
#include <memory>
#include <queue>
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/resampler/include/push_resampler.h"
-#include "webrtc/common_audio/resampler/push_sinc_resampler.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/modules/audio_processing/audio_processing_impl.h"
-#include "webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h"
-#include "webrtc/modules/audio_processing/common.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h"
-#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/gtest_prod_util.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/protobuf_utils.h"
-#include "webrtc/rtc_base/safe_minmax.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/rtc_base/thread.h"
-#include "webrtc/system_wrappers/include/event_wrapper.h"
-#include "webrtc/system_wrappers/include/trace.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/resampler/include/push_resampler.h"
+#include "common_audio/resampler/push_sinc_resampler.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "modules/audio_processing/audio_processing_impl.h"
+#include "modules/audio_processing/beamformer/mock_nonlinear_beamformer.h"
+#include "modules/audio_processing/common.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/include/mock_audio_processing.h"
+#include "modules/audio_processing/level_controller/level_controller_constants.h"
+#include "modules/audio_processing/test/protobuf_utils.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/arraysize.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/gtest_prod_util.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/protobuf_utils.h"
+#include "rtc_base/refcountedobject.h"
+#include "rtc_base/safe_minmax.h"
+#include "rtc_base/task_queue.h"
+#include "rtc_base/thread.h"
+#include "system_wrappers/include/event_wrapper.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_processing/test/unittest.pb.h"
#else
-#include "webrtc/modules/audio_processing/test/unittest.pb.h"
+#include "modules/audio_processing/test/unittest.pb.h"
#endif
RTC_POP_IGNORING_WUNDEF()
@@ -237,7 +238,7 @@ void WriteStatsMessage(const AudioProcessing::Statistic& output,
}
#endif
-void OpenFileAndWriteMessage(const std::string filename,
+void OpenFileAndWriteMessage(const std::string& filename,
const MessageLite& msg) {
FILE* file = fopen(filename.c_str(), "wb");
ASSERT_TRUE(file != NULL);
@@ -253,7 +254,7 @@ void OpenFileAndWriteMessage(const std::string filename,
fclose(file);
}
-std::string ResourceFilePath(std::string name, int sample_rate_hz) {
+std::string ResourceFilePath(const std::string& name, int sample_rate_hz) {
std::ostringstream ss;
// Resource files are all stereo.
ss << name << sample_rate_hz / 1000 << "_stereo";
@@ -265,7 +266,7 @@ std::string ResourceFilePath(std::string name, int sample_rate_hz) {
// have competing filenames.
std::map<std::string, std::string> temp_filenames;
-std::string OutputFilePath(std::string name,
+std::string OutputFilePath(const std::string& name,
int input_rate,
int output_rate,
int reverse_input_rate,
@@ -307,7 +308,7 @@ void ClearTempFiles() {
remove(kv.second.c_str());
}
-void OpenFileAndReadMessage(std::string filename, MessageLite* msg) {
+void OpenFileAndReadMessage(const std::string& filename, MessageLite* msg) {
FILE* file = fopen(filename.c_str(), "rb");
ASSERT_TRUE(file != NULL);
ReadMessageFromFile(file, msg);
@@ -350,11 +351,9 @@ class ApmTest : public ::testing::Test {
virtual void TearDown();
static void SetUpTestCase() {
- Trace::CreateTrace();
}
static void TearDownTestCase() {
- Trace::ReturnTrace();
ClearTempFiles();
}
@@ -1305,7 +1304,7 @@ TEST_F(ApmTest, AgcOnlyAdaptsWhenTargetSignalIsPresent) {
testing::NiceMock<MockNonlinearBeamformer>* beamformer =
new testing::NiceMock<MockNonlinearBeamformer>(geometry, 1u);
std::unique_ptr<AudioProcessing> apm(
- AudioProcessing::Create(config, beamformer));
+ AudioProcessing::Create(config, nullptr, beamformer));
EXPECT_EQ(kNoErr, apm->gain_control()->Enable(true));
ChannelBuffer<float> src_buf(kSamplesPerChannel, kNumInputChannels);
ChannelBuffer<float> dest_buf(kSamplesPerChannel, kNumOutputChannels);
@@ -2438,7 +2437,7 @@ class AudioProcessingTest
size_t num_output_channels,
size_t num_reverse_input_channels,
size_t num_reverse_output_channels,
- std::string output_file_prefix) {
+ const std::string& output_file_prefix) {
Config config;
config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
std::unique_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
@@ -2891,4 +2890,22 @@ TEST(ApmConfiguration, InValidConfigBehavior) {
std::numeric_limits<float>::epsilon());
}
+TEST(ApmConfiguration, EnablePostProcessing) {
+ // Verify that apm uses a capture post processing module if one is provided.
+ webrtc::Config webrtc_config;
+ auto mock_post_processor_ptr =
+ new testing::NiceMock<test::MockPostProcessing>();
+ auto mock_post_processor =
+ std::unique_ptr<PostProcessing>(mock_post_processor_ptr);
+ rtc::scoped_refptr<AudioProcessing> apm = AudioProcessing::Create(
+ webrtc_config, std::move(mock_post_processor), nullptr);
+
+ AudioFrame audio;
+ audio.num_channels_ = 1;
+ SetFrameSampleRate(&audio, AudioProcessing::NativeRate::kSampleRate16kHz);
+
+ EXPECT_CALL(*mock_post_processor_ptr, Process(testing::_)).Times(1);
+ std::cout << apm->ProcessStream(&audio) << std::endl;
+}
+
} // namespace webrtc
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.cc
index e42a98e6325..f5862bb754a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/beamformer/array_util.h"
+#include "modules/audio_processing/beamformer/array_util.h"
#include <algorithm>
#include <limits>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.h
index bfb9dfdb65a..f2349296939 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
#include <cmath>
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
namespace webrtc {
@@ -114,4 +114,4 @@ T RadiansToDegrees(T angle_radians) {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util_unittest.cc
index 0ec9e7b7380..a5c075ab05f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/array_util_unittest.cc
@@ -11,12 +11,12 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/beamformer/array_util.h"
+#include "modules/audio_processing/beamformer/array_util.h"
#include <math.h>
#include <vector>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix.h
index 1080f18bb45..9960e1dd870 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
#include <complex>
-#include "webrtc/modules/audio_processing/beamformer/matrix.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/beamformer/matrix.h"
+#include "rtc_base/checks.h"
namespace webrtc {
@@ -93,4 +93,4 @@ class ComplexMatrix : public Matrix<complex<T> > {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix_unittest.cc
index 100d2e6eaef..e11dfd2b5c3 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/complex_matrix_unittest.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h"
-#include "webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/beamformer/complex_matrix.h"
+#include "modules/audio_processing/beamformer/matrix_test_helpers.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc
index ae69073a894..df36d5974fd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc
@@ -10,7 +10,7 @@
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h"
+#include "modules/audio_processing/beamformer/covariance_matrix_generator.h"
#include <cmath>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h
index 5375518e8aa..6a5841f631c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_
-#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h"
-#include "webrtc/modules/audio_processing/beamformer/array_util.h"
+#include "modules/audio_processing/beamformer/complex_matrix.h"
+#include "modules/audio_processing/beamformer/array_util.h"
namespace webrtc {
@@ -51,4 +51,4 @@ class CovarianceMatrixGenerator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BF_HELPERS_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_BF_HELPERS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator_unittest.cc
index 1dd65c1dd50..a6518e5d95f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator_unittest.cc
@@ -10,12 +10,12 @@
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h"
+#include "modules/audio_processing/beamformer/covariance_matrix_generator.h"
#include <cmath>
-#include "webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/beamformer/matrix_test_helpers.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix.h
index d0e41ca9b0a..bf94c25df01 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/constructormagic.h"
namespace {
@@ -366,4 +366,4 @@ class Matrix {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h
index 57bd82ed230..62b47082e36 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
-#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h"
-#include "webrtc/modules/audio_processing/beamformer/matrix.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/beamformer/complex_matrix.h"
+#include "modules/audio_processing/beamformer/matrix.h"
+#include "test/gtest.h"
namespace {
const float kTolerance = 0.001f;
@@ -99,4 +99,4 @@ class MatrixTestHelpers {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_unittest.cc
index 939404c7cdd..4badfd07ed6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/matrix_unittest.cc
@@ -10,9 +10,9 @@
#include <complex>
-#include "webrtc/modules/audio_processing/beamformer/matrix.h"
-#include "webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/beamformer/matrix.h"
+#include "modules/audio_processing/beamformer/matrix_test_helpers.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h
index 7493dcbbb21..c4c7358b631 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
#include <vector>
-#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
+#include "test/gmock.h"
namespace webrtc {
@@ -36,4 +36,4 @@ class MockNonlinearBeamformer : public NonlinearBeamformer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc
index b7d23f59f23..12f6d2f4652 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc
@@ -10,16 +10,16 @@
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h"
+#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
#include <algorithm>
#include <cmath>
#include <numeric>
#include <vector>
-#include "webrtc/common_audio/window_generator.h"
-#include "webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h"
-#include "webrtc/rtc_base/arraysize.h"
+#include "common_audio/window_generator.h"
+#include "modules/audio_processing/beamformer/covariance_matrix_generator.h"
+#include "rtc_base/arraysize.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h
index 9b45c8b0003..76556e7a458 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
+#ifndef MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
+#define MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
@@ -19,10 +19,10 @@
#include <memory>
#include <vector>
-#include "webrtc/common_audio/lapped_transform.h"
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/modules/audio_processing/beamformer/array_util.h"
-#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h"
+#include "common_audio/lapped_transform.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/audio_processing/beamformer/array_util.h"
+#include "modules/audio_processing/beamformer/complex_matrix.h"
namespace webrtc {
@@ -225,4 +225,4 @@ class NonlinearBeamformer : public LappedTransform::Callback {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
+#endif // MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_test.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_test.cc
index 3ac68d4435c..296cd6d4ae0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_test.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_test.cc
@@ -10,13 +10,13 @@
#include <vector>
-#include "gflags/gflags.h"
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/format_macros.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/flags.h"
+#include "rtc_base/format_macros.h"
DEFINE_string(i, "", "The name of the input file to read from.");
DEFINE_string(o, "out.wav", "Name of the output file to write to.");
@@ -24,6 +24,7 @@ DEFINE_string(mic_positions, "",
"Space delimited cartesian coordinates of microphones in meters. "
"The coordinates of each point are contiguous. "
"For a two element array: \"x1 y1 z1 x2 y2 z2\"");
+DEFINE_bool(help, false, "Prints this message.");
namespace webrtc {
namespace {
@@ -34,29 +35,36 @@ const int kChunkSizeMs = 1000 / kChunksPerSecond;
const char kUsage[] =
"Command-line tool to run beamforming on WAV files. The signal is passed\n"
"in as a single band, unlike the audio processing interface which splits\n"
- "signals into multiple bands.";
+ "signals into multiple bands.\n";
} // namespace
int main(int argc, char* argv[]) {
- google::SetUsageMessage(kUsage);
- google::ParseCommandLineFlags(&argc, &argv, true);
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
+ FLAG_help || argc != 1) {
+ printf("%s", kUsage);
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
+ return 1;
+ }
- WavReader in_file(FLAGS_i);
- WavWriter out_file(FLAGS_o, in_file.sample_rate(), in_file.num_channels());
+ WavReader in_file(FLAG_i);
+ WavWriter out_file(FLAG_o, in_file.sample_rate(), in_file.num_channels());
const size_t num_mics = in_file.num_channels();
const std::vector<Point> array_geometry =
- ParseArrayGeometry(FLAGS_mic_positions, num_mics);
+ ParseArrayGeometry(FLAG_mic_positions, num_mics);
RTC_CHECK_EQ(array_geometry.size(), num_mics);
NonlinearBeamformer bf(array_geometry, array_geometry.size());
bf.Initialize(kChunkSizeMs, in_file.sample_rate());
printf("Input file: %s\nChannels: %" PRIuS ", Sample rate: %d Hz\n\n",
- FLAGS_i.c_str(), in_file.num_channels(), in_file.sample_rate());
+ FLAG_i, in_file.num_channels(), in_file.sample_rate());
printf("Output file: %s\nChannels: %" PRIuS ", Sample rate: %d Hz\n\n",
- FLAGS_o.c_str(), out_file.num_channels(), out_file.sample_rate());
+ FLAG_o, out_file.num_channels(), out_file.sample_rate());
ChannelBuffer<float> buf(
rtc::CheckedDivExact(in_file.sample_rate(), kChunksPerSecond),
diff --git a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_unittest.cc
index c81d76cc271..78b2f0a68e7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer_unittest.cc
@@ -11,15 +11,15 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h"
+#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
#include <math.h>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/common.h b/chromium/third_party/webrtc/modules/audio_processing/common.h
index 30cee9403ab..d8532c57498 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/common.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_COMMON_H_
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/checks.h"
namespace webrtc {
@@ -31,4 +31,4 @@ static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/config_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/config_unittest.cc
index 33f4ed152c4..8776ee3391c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/config_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/config_unittest.cc
@@ -7,9 +7,9 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/include/config.h"
+#include "modules/audio_processing/include/config.h"
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc
index a4bc4f61083..857cb1c825b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/echo_cancellation_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/echo_cancellation_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc
index b1ea486df17..878d84f42a9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_cancellation_impl.h"
+#include "modules/audio_processing/echo_cancellation_impl.h"
#include <string.h>
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/modules/audio_processing/aec/echo_cancellation.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/aec/echo_cancellation.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h
index 2bce6332d48..d410a11578c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
namespace webrtc {
@@ -90,20 +90,20 @@ class EchoCancellationImpl : public EchoCancellation {
void AllocateRenderQueue();
int Configure();
- rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
+ rtc::CriticalSection* const crit_render_ RTC_ACQUIRED_BEFORE(crit_capture_);
rtc::CriticalSection* const crit_capture_;
bool enabled_ = false;
- bool drift_compensation_enabled_ GUARDED_BY(crit_capture_);
- bool metrics_enabled_ GUARDED_BY(crit_capture_);
- SuppressionLevel suppression_level_ GUARDED_BY(crit_capture_);
- int stream_drift_samples_ GUARDED_BY(crit_capture_);
- bool was_stream_drift_set_ GUARDED_BY(crit_capture_);
- bool stream_has_echo_ GUARDED_BY(crit_capture_);
- bool delay_logging_enabled_ GUARDED_BY(crit_capture_);
- bool extended_filter_enabled_ GUARDED_BY(crit_capture_);
- bool delay_agnostic_enabled_ GUARDED_BY(crit_capture_);
- bool refined_adaptive_filter_enabled_ GUARDED_BY(crit_capture_) = false;
+ bool drift_compensation_enabled_ RTC_GUARDED_BY(crit_capture_);
+ bool metrics_enabled_ RTC_GUARDED_BY(crit_capture_);
+ SuppressionLevel suppression_level_ RTC_GUARDED_BY(crit_capture_);
+ int stream_drift_samples_ RTC_GUARDED_BY(crit_capture_);
+ bool was_stream_drift_set_ RTC_GUARDED_BY(crit_capture_);
+ bool stream_has_echo_ RTC_GUARDED_BY(crit_capture_);
+ bool delay_logging_enabled_ RTC_GUARDED_BY(crit_capture_);
+ bool extended_filter_enabled_ RTC_GUARDED_BY(crit_capture_);
+ bool delay_agnostic_enabled_ RTC_GUARDED_BY(crit_capture_);
+ bool refined_adaptive_filter_enabled_ RTC_GUARDED_BY(crit_capture_) = false;
std::vector<std::unique_ptr<Canceller>> cancellers_;
std::unique_ptr<StreamProperties> stream_properties_;
@@ -113,4 +113,4 @@ class EchoCancellationImpl : public EchoCancellation {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
index 0aa1cf3a4c4..2b9e5c5626f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
@@ -10,9 +10,9 @@
#include <memory>
-#include "webrtc/modules/audio_processing/aec/aec_core.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/aec/aec_core.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
index 4104a7f2591..ad3c731e73b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_control_mobile_impl.h"
+#include "modules/audio_processing/echo_control_mobile_impl.h"
#include <string.h>
-#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/logging.h"
+#include "modules/audio_processing/aecm/echo_control_mobile.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/logging.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h
index 2c604ca0d9d..a03ab4d4866 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/rtc_base/swap_queue.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/render_queue_item_verifier.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/swap_queue.h"
namespace webrtc {
@@ -64,15 +64,15 @@ class EchoControlMobileImpl : public EchoControlMobile {
int Configure();
- rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
+ rtc::CriticalSection* const crit_render_ RTC_ACQUIRED_BEFORE(crit_capture_);
rtc::CriticalSection* const crit_capture_;
bool enabled_ = false;
- RoutingMode routing_mode_ GUARDED_BY(crit_capture_);
- bool comfort_noise_enabled_ GUARDED_BY(crit_capture_);
- unsigned char* external_echo_path_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_);
+ RoutingMode routing_mode_ RTC_GUARDED_BY(crit_capture_);
+ bool comfort_noise_enabled_ RTC_GUARDED_BY(crit_capture_);
+ unsigned char* external_echo_path_ RTC_GUARDED_BY(crit_render_)
+ RTC_GUARDED_BY(crit_capture_);
std::vector<std::unique_ptr<Canceller>> cancellers_;
std::unique_ptr<StreamProperties> stream_properties_;
@@ -81,4 +81,4 @@ class EchoControlMobileImpl : public EchoControlMobile {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_unittest.cc
index aa4ad3cec96..fb58a5b8705 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/echo_control_mobile_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/echo_control_mobile_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc
index a24fc3e67a8..dc4fd936059 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h"
+#include "modules/audio_processing/echo_detector/circular_buffer.h"
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
index 9fadb0d66f2..53d4afb6d50 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
namespace webrtc {
@@ -39,4 +39,4 @@ struct CircularBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
index 88f55a8ee78..41f276b96cf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/echo_detector/circular_buffer.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
index e6e29e5ddbc..a85740387bd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h"
+#include "modules/audio_processing/echo_detector/mean_variance_estimator.h"
#include <math.h>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h
index 3c0700fad0e..7f793df1e81 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
namespace webrtc {
@@ -30,4 +30,4 @@ class MeanVarianceEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MEAN_VARIANCE_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
index ba45745606d..f8efc3a799f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
@@ -9,8 +9,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/echo_detector/mean_variance_estimator.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.cc
index 9c37ab63ff1..3054e98bd37 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/moving_max.h"
+#include "modules/audio_processing/echo_detector/moving_max.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.h b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.h
index 556facfad41..f7d8ee81370 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
#include <stddef.h>
@@ -33,4 +33,4 @@ class MovingMax {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_MOVING_MAX_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max_unittest.cc
index 720010d0026..b67b86ffc35 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/moving_max_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/moving_max.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/echo_detector/moving_max.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
index 24e18101972..8ec9fe9f0b5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
+#include "modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
#include <math.h>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h
index da5ff34f2fb..e3c36d88bac 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
namespace webrtc {
@@ -40,4 +40,4 @@ class NormalizedCovarianceEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_NORMALIZED_COVARIANCE_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
index 04b3a92fb5e..7e0512ee580 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
@@ -9,8 +9,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.cc b/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.cc
index 308ee1224e8..d5d978c2e0b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h"
+#include "modules/audio_processing/gain_control_for_experimental_agc.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/criticalsection.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/criticalsection.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.h b/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.h
index 977685bb1ba..0894a0e30e5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/gain_control_for_experimental_agc.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
+#ifndef MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
+#define MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
-#include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/rtc_base/thread_checker.h"
+#include "modules/audio_processing/agc/agc_manager_direct.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -74,4 +74,4 @@ class GainControlForExperimentalAgc : public GainControl,
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
+#endif // MODULES_AUDIO_PROCESSING_GAIN_CONTROL_FOR_EXPERIMENTAL_AGC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc
index e5760183f0e..eeab1e038d1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/gain_control_impl.h"
+#include "modules/audio_processing/gain_control_impl.h"
-#include "webrtc/modules/audio_processing/agc/legacy/gain_control.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/agc/legacy/gain_control.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h b/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h
index 03bb5fa7d2c..26745065cfa 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/rtc_base/swap_queue.h"
-#include "webrtc/rtc_base/thread_annotations.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/render_queue_item_verifier.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/swap_queue.h"
+#include "rtc_base/thread_annotations.h"
namespace webrtc {
@@ -67,31 +67,31 @@ class GainControlImpl : public GainControl {
int Configure();
- rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
+ rtc::CriticalSection* const crit_render_ RTC_ACQUIRED_BEFORE(crit_capture_);
rtc::CriticalSection* const crit_capture_;
std::unique_ptr<ApmDataDumper> data_dumper_;
bool enabled_ = false;
- Mode mode_ GUARDED_BY(crit_capture_);
- int minimum_capture_level_ GUARDED_BY(crit_capture_);
- int maximum_capture_level_ GUARDED_BY(crit_capture_);
- bool limiter_enabled_ GUARDED_BY(crit_capture_);
- int target_level_dbfs_ GUARDED_BY(crit_capture_);
- int compression_gain_db_ GUARDED_BY(crit_capture_);
- int analog_capture_level_ GUARDED_BY(crit_capture_);
- bool was_analog_level_set_ GUARDED_BY(crit_capture_);
- bool stream_is_saturated_ GUARDED_BY(crit_capture_);
+ Mode mode_ RTC_GUARDED_BY(crit_capture_);
+ int minimum_capture_level_ RTC_GUARDED_BY(crit_capture_);
+ int maximum_capture_level_ RTC_GUARDED_BY(crit_capture_);
+ bool limiter_enabled_ RTC_GUARDED_BY(crit_capture_);
+ int target_level_dbfs_ RTC_GUARDED_BY(crit_capture_);
+ int compression_gain_db_ RTC_GUARDED_BY(crit_capture_);
+ int analog_capture_level_ RTC_GUARDED_BY(crit_capture_);
+ bool was_analog_level_set_ RTC_GUARDED_BY(crit_capture_);
+ bool stream_is_saturated_ RTC_GUARDED_BY(crit_capture_);
std::vector<std::unique_ptr<GainController>> gain_controllers_;
- rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_);
- rtc::Optional<int> sample_rate_hz_ GUARDED_BY(crit_capture_);
+ rtc::Optional<size_t> num_proc_channels_ RTC_GUARDED_BY(crit_capture_);
+ rtc::Optional<int> sample_rate_hz_ RTC_GUARDED_BY(crit_capture_);
static int instance_counter_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/gain_control_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/gain_control_unittest.cc
index e047c10d2e8..62908c7aecb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/gain_control_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/gain_control_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/gain_control_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/gain_control_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.cc b/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.cc
index f048badf738..365d01510ec 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
+#include "modules/audio_processing/include/aec_dump.h"
namespace webrtc {
InternalAPMConfig::InternalAPMConfig() = default;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.h b/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.h
index 84bba859394..0c8d2271ccb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/aec_dump.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
+#ifndef MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
+#define MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
#include <memory>
#include <string>
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
namespace webrtc {
@@ -138,4 +138,4 @@ class AecDump {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
+#endif // MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.cc b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.cc
index 2c4b61f914e..8410a3dfbbf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
index 03bd8c85b02..54aed341b63 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
+#ifndef MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
+#define MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
@@ -20,18 +20,20 @@
#include <string.h>
#include <vector>
-#include "webrtc/modules/audio_processing/beamformer/array_util.h"
-#include "webrtc/modules/audio_processing/include/config.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/rtc_base/platform_file.h"
-#include "webrtc/rtc_base/refcount.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/beamformer/array_util.h"
+#include "modules/audio_processing/include/config.h"
+#include "rtc_base/arraysize.h"
+#include "rtc_base/deprecation.h"
+#include "rtc_base/platform_file.h"
+#include "rtc_base/refcount.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
struct AecCore;
class AecDump;
+class AudioBuffer;
class AudioFrame;
class NonlinearBeamformer;
@@ -45,6 +47,7 @@ class GainControl;
class HighPassFilter;
class LevelEstimator;
class NoiseSuppression;
+class PostProcessing;
class VoiceDetection;
// Use to enable the extended filter mode in the AEC, along with robustness
@@ -269,6 +272,10 @@ class AudioProcessing : public rtc::RefCountInterface {
// does not yet have the desired behavior.
struct EchoCanceller3 {
struct Param {
+ struct Delay {
+ size_t default_delay = 5;
+ } delay;
+
struct Erle {
float min = 1.f;
float max_l = 8.f;
@@ -276,21 +283,26 @@ class AudioProcessing : public rtc::RefCountInterface {
} erle;
struct EpStrength {
- float lf = 100.f;
- float mf = 1000.f;
- float hf = 5000.f;
+ float lf = 10.f;
+ float mf = 100.f;
+ float hf = 200.f;
float default_len = 0.f;
} ep_strength;
struct Mask {
float m1 = 0.01f;
- float m2 = 0.001f;
+ float m2 = 0.0001f;
float m3 = 0.01f;
float m4 = 0.1f;
+ float m5 = 0.3f;
+ float m6 = 0.0001f;
+ float m7 = 0.01f;
+ float m8 = 0.0001f;
+ float m9 = 0.1f;
} gain_mask;
struct EchoAudibility {
- float low_render_limit = 192.f;
+ float low_render_limit = 4 * 64.f;
float normal_render_limit = 64.f;
float active_render_limit = 100.f;
} echo_audibility;
@@ -310,11 +322,12 @@ class AudioProcessing : public rtc::RefCountInterface {
float min_dec;
};
- GainChanges low_noise = {8.f, 8.f, 2.f, 2.f, 4.f, 4.f};
- GainChanges normal = {4.f, 4.f, 2.f, 2.f, 1.2f, 2.f};
+ GainChanges low_noise = {3.f, 3.f, 1.5f, 1.5f, 1.5f, 1.5f};
+ GainChanges normal = {2.f, 2.f, 1.5f, 1.5f, 1.2f, 1.2f};
GainChanges saturation = {1.2f, 1.2f, 1.5f, 1.5f, 1.f, 1.f};
+ GainChanges nonlinear = {1.5f, 1.5f, 1.2f, 1.2f, 1.1f, 1.1f};
- float floor_first_increase = 0.001f;
+ float floor_first_increase = 0.0001f;
} gain_updates;
} param;
bool enabled = false;
@@ -359,9 +372,15 @@ class AudioProcessing : public rtc::RefCountInterface {
static AudioProcessing* Create();
// Allows passing in an optional configuration at create-time.
static AudioProcessing* Create(const webrtc::Config& config);
- // Only for testing.
+ // Deprecated. Use the Create below, with nullptr PostProcessing.
+ RTC_DEPRECATED
static AudioProcessing* Create(const webrtc::Config& config,
NonlinearBeamformer* beamformer);
+ // Allows passing in optional user-defined processing modules.
+ static AudioProcessing* Create(
+ const webrtc::Config& config,
+ std::unique_ptr<PostProcessing> capture_post_processor,
+ NonlinearBeamformer* beamformer);
~AudioProcessing() override {}
// Initializes internal states, while retaining all user settings. This
@@ -930,6 +949,21 @@ class EchoControlMobile {
virtual ~EchoControlMobile() {}
};
+// Interface for an acoustic echo cancellation (AEC) submodule.
+class EchoControl {
+ public:
+ // Analysis (not changing) of the render signal.
+ virtual void AnalyzeRender(AudioBuffer* render) = 0;
+
+ // Analysis (not changing) of the capture signal.
+ virtual void AnalyzeCapture(AudioBuffer* capture) = 0;
+
+ // Processes the capture signal in order to remove the echo.
+ virtual void ProcessCapture(AudioBuffer* capture, bool echo_path_change) = 0;
+
+ virtual ~EchoControl() {}
+};
+
// The automatic gain control (AGC) component brings the signal to an
// appropriate range. This is done by applying a digital gain directly and, in
// the analog mode, prescribing an analog gain to be applied at the audio HAL.
@@ -1087,6 +1121,19 @@ class NoiseSuppression {
virtual ~NoiseSuppression() {}
};
+// Interface for a post processing submodule.
+class PostProcessing {
+ public:
+ // (Re-)Initializes the submodule.
+ virtual void Initialize(int sample_rate_hz, int num_channels) = 0;
+ // Processes the given capture or render signal.
+ virtual void Process(AudioBuffer* audio) = 0;
+ // Returns a string representation of the module state.
+ virtual std::string ToString() const = 0;
+
+ virtual ~PostProcessing() {}
+};
+
// The voice activity detection (VAD) component analyzes the stream to
// determine if voice is present. A facility is also provided to pass in an
// external VAD decision.
@@ -1138,4 +1185,4 @@ class VoiceDetection {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
+#endif // MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/config.cc b/chromium/third_party/webrtc/modules/audio_processing/include/config.cc
index bbbc4520a85..14240db305e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/config.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/config.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/include/config.h"
+#include "modules/audio_processing/include/config.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/config.h b/chromium/third_party/webrtc/modules/audio_processing/include/config.h
index 35836e8636d..7c34de8cccd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/config.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/config.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
+#ifndef MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
+#define MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
#include <map>
-#include "webrtc/rtc_base/basictypes.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/basictypes.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -130,4 +130,4 @@ void Config::Set(T* value) {
}
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
+#endif // MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h b/chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h
index 2ed7ca22cb7..c7a0f512042 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
+#ifndef MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
+#define MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
#include <memory>
-#include "webrtc/modules/audio_processing/include/aec_dump.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/include/aec_dump.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "test/gmock.h"
namespace webrtc {
@@ -104,6 +104,14 @@ class MockNoiseSuppression : public NoiseSuppression {
MOCK_METHOD0(NoiseEstimate, std::vector<float>());
};
+class MockPostProcessing : public PostProcessing {
+ public:
+ virtual ~MockPostProcessing() {}
+ MOCK_METHOD2(Initialize, void(int sample_rate_hz, int num_channels));
+ MOCK_METHOD1(Process, void(AudioBuffer* audio));
+ MOCK_CONST_METHOD0(ToString, std::string());
+};
+
class MockVoiceDetection : public VoiceDetection {
public:
virtual ~MockVoiceDetection() {}
@@ -218,4 +226,4 @@ class MockAudioProcessing : public AudioProcessing {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
+#endif // MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
index 817d9ddff43..65cad19d9d5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h"
+#include "modules/audio_processing/intelligibility/intelligibility_enhancer.h"
#include <math.h>
#include <stdlib.h>
@@ -16,11 +16,11 @@
#include <limits>
#include <numeric>
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/window_generator.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/safe_minmax.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/window_generator.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/safe_minmax.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
index 8faf919920a..3e0e269c583 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
@@ -8,20 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
+#ifndef MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
+#define MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
#include <complex>
#include <memory>
#include <vector>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/lapped_transform.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h"
-#include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
-#include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"
-#include "webrtc/rtc_base/swap_queue.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/lapped_transform.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/intelligibility/intelligibility_utils.h"
+#include "modules/audio_processing/render_queue_item_verifier.h"
+#include "modules/audio_processing/vad/voice_activity_detector.h"
+#include "rtc_base/swap_queue.h"
namespace webrtc {
@@ -134,4 +134,4 @@ class IntelligibilityEnhancer : public LappedTransform::Callback {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
+#endif // MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHANCER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc
index e84568735cc..98a8dae4690 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc
@@ -15,15 +15,15 @@
#include <memory>
#include <vector>
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h"
-#include "webrtc/modules/audio_processing/noise_suppression_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/intelligibility/intelligibility_enhancer.h"
+#include "modules/audio_processing/noise_suppression_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "rtc_base/arraysize.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc
index 3e6c93e1926..159eada9b7d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h"
+#include "modules/audio_processing/intelligibility/intelligibility_utils.h"
#include <math.h>
#include <stdlib.h>
@@ -16,7 +16,7 @@
#include <algorithm>
#include <limits>
-#include "webrtc/rtc_base/safe_minmax.h"
+#include "rtc_base/safe_minmax.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
index 2566616f85b..4dc17d50b5b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
+#ifndef MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
+#define MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
#include <complex>
#include <vector>
@@ -83,4 +83,4 @@ class DelayBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
+#endif // MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
index 4687c924d81..fea394c3381 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
@@ -12,9 +12,9 @@
#include <complex>
#include <vector>
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/intelligibility/intelligibility_utils.h"
+#include "rtc_base/arraysize.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc
index cd76a9557a6..b90449caa32 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc
@@ -8,15 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "gflags/gflags.h"
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h"
-#include "webrtc/modules/audio_processing/noise_suppression_impl.h"
-#include "webrtc/rtc_base/criticalsection.h"
-#include "webrtc/test/gtest.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/intelligibility/intelligibility_enhancer.h"
+#include "modules/audio_processing/noise_suppression_impl.h"
+#include "rtc_base/criticalsection.h"
+#include "rtc_base/flags.h"
using std::complex;
@@ -26,16 +25,24 @@ namespace {
DEFINE_string(clear_file, "speech.wav", "Input file with clear speech.");
DEFINE_string(noise_file, "noise.wav", "Input file with noise data.");
DEFINE_string(out_file, "proc_enhanced.wav", "Enhanced output file.");
+DEFINE_bool(help, false, "Print this message.");
-// void function for gtest
-void void_main(int argc, char* argv[]) {
- google::SetUsageMessage(
- "\n\nInput files must be little-endian 16-bit signed raw PCM.\n");
- google::ParseCommandLineFlags(&argc, &argv, true);
+int int_main(int argc, char* argv[]) {
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true)) {
+ return 1;
+ }
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
+ if (argc != 1) {
+ printf("\n\nInput files must be little-endian 16-bit signed raw PCM.\n");
+ return 0;
+ }
- WavReader in_file(FLAGS_clear_file);
- WavReader noise_file(FLAGS_noise_file);
- WavWriter out_file(FLAGS_out_file, in_file.sample_rate(),
+ WavReader in_file(FLAG_clear_file);
+ WavReader noise_file(FLAG_noise_file);
+ WavWriter out_file(FLAG_out_file, in_file.sample_rate(),
in_file.num_channels());
rtc::CriticalSection crit;
NoiseSuppressionImpl ns(&crit);
@@ -77,12 +84,13 @@ void void_main(int argc, char* argv[]) {
FloatToFloatS16(in.data(), in.size(), in.data());
out_file.WriteSamples(in.data(), in.size());
}
+
+ return 0;
}
} // namespace
} // namespace webrtc
int main(int argc, char* argv[]) {
- webrtc::void_main(argc, argv);
- return 0;
+ return webrtc::int_main(argc, argv);
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.cc
index 9c4a4d2e6c1..5a4ddc891ec 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/biquad_filter.h"
+#include "modules/audio_processing/level_controller/biquad_filter.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.h
index 62bacf2018b..dad104d43fd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/biquad_filter.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "rtc_base/arraysize.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -55,4 +55,4 @@ class BiQuadFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.cc
index 09da95bfbc4..a1702f432c5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/down_sampler.h"
+#include "modules/audio_processing/level_controller/down_sampler.h"
#include <string.h>
#include <algorithm>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/biquad_filter.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/level_controller/biquad_filter.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.h
index 95e3248054e..d6502425a1f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/down_sampler.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
-#include "webrtc/modules/audio_processing/level_controller/biquad_filter.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/level_controller/biquad_filter.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -37,4 +37,4 @@ class DownSampler {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.cc
index 9e2fba0c235..018f809e013 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/gain_applier.h"
+#include "modules/audio_processing/level_controller/gain_applier.h"
#include <algorithm>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
+#include "api/array_view.h"
+#include "rtc_base/checks.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.h
index 33e26c1e0a1..5669f45bf7a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_applier.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -39,4 +39,4 @@ class GainApplier {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.cc
index 844b8de02e3..3ab75b1ce67 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/gain_selector.h"
+#include "modules/audio_processing/level_controller/gain_selector.h"
#include <math.h>
#include <algorithm>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/level_controller/level_controller_constants.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.h
index 690d49bace0..7966c438d7d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/gain_selector.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
namespace webrtc {
@@ -37,4 +37,4 @@ class GainSelector {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.cc
index bc6b7069cc9..a600ac7bf8d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.cc
@@ -8,25 +8,25 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/level_controller.h"
+#include "modules/audio_processing/level_controller/level_controller.h"
#include <math.h>
#include <algorithm>
#include <numeric>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/level_controller/gain_applier.h"
-#include "webrtc/modules/audio_processing/level_controller/gain_selector.h"
-#include "webrtc/modules/audio_processing/level_controller/noise_level_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/peak_level_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/arraysize.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/level_controller/gain_applier.h"
+#include "modules/audio_processing/level_controller/gain_selector.h"
+#include "modules/audio_processing/level_controller/noise_level_estimator.h"
+#include "modules/audio_processing/level_controller/peak_level_estimator.h"
+#include "modules/audio_processing/level_controller/saturating_gain_estimator.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/arraysize.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "system_wrappers/include/metrics.h"
namespace webrtc {
namespace {
@@ -49,7 +49,7 @@ float FrameEnergy(const AudioBuffer& audio) {
for (size_t k = 0; k < audio.num_channels(); ++k) {
float channel_energy =
std::accumulate(audio.channels_const_f()[k],
- audio.channels_const_f()[k] + audio.num_frames(), 0,
+ audio.channels_const_f()[k] + audio.num_frames(), 0.f,
[](float a, float b) -> float { return a + b * b; });
energy = std::max(channel_energy, energy);
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.h
index e04620f19c1..224b886abd1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller.h
@@ -8,21 +8,21 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/gain_applier.h"
-#include "webrtc/modules/audio_processing/level_controller/gain_selector.h"
-#include "webrtc/modules/audio_processing/level_controller/noise_level_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/peak_level_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h"
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
+#include "api/optional.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/level_controller/gain_applier.h"
+#include "modules/audio_processing/level_controller/gain_selector.h"
+#include "modules/audio_processing/level_controller/noise_level_estimator.h"
+#include "modules/audio_processing/level_controller/peak_level_estimator.h"
+#include "modules/audio_processing/level_controller/saturating_gain_estimator.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -92,4 +92,4 @@ class LevelController {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc
index 10be164f8bb..9aa10deb886 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc
@@ -11,18 +11,18 @@
#include <numeric>
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/level_controller.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/modules/audio_processing/test/performance_timer.h"
-#include "webrtc/modules/audio_processing/test/simulator_buffers.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/system_wrappers/include/clock.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/perf_test.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/level_controller/level_controller.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "modules/audio_processing/test/performance_timer.h"
+#include "modules/audio_processing/test/simulator_buffers.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/clock.h"
+#include "test/gtest.h"
+#include "test/testsupport/perf_test.h"
namespace webrtc {
namespace {
@@ -67,7 +67,7 @@ void RunStandaloneSubmodule(int sample_rate_hz, size_t num_channels) {
false);
}
-void RunTogetherWithApm(std::string test_description,
+void RunTogetherWithApm(const std::string& test_description,
int render_input_sample_rate_hz,
int render_output_sample_rate_hz,
int capture_input_sample_rate_hz,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_constants.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_constants.h
index 7b962d37d9f..6cf2cd4c7ef 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_constants.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_constants.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
namespace webrtc {
@@ -20,4 +20,4 @@ const float kTargetLcPeakLeveldBFS = -6.0206f;
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
index 633bfaf1ad2..837cfc39289 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
@@ -10,14 +10,14 @@
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/level_controller/level_controller.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "api/optional.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/level_controller/level_controller.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
@@ -88,19 +88,19 @@ TEST(LevelControllerConfig, ToString) {
LevelController::ToString(config.level_controller));
}
-TEST(LevelControlBitExactnessTest, DISABLED_Mono8kHz) {
+TEST(LevelControlBitExactnessTest, Mono8kHz) {
const float kOutputReference[] = {-0.013939f, -0.012154f, -0.009054f};
RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 1,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Mono16kHz) {
+TEST(LevelControlBitExactnessTest, Mono16kHz) {
const float kOutputReference[] = {-0.013706f, -0.013215f, -0.013018f};
RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 1,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Mono32kHz) {
+TEST(LevelControlBitExactnessTest, Mono32kHz) {
const float kOutputReference[] = {-0.014495f, -0.016425f, -0.016085f};
RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 1,
rtc::Optional<float>(), kOutputReference);
@@ -108,47 +108,47 @@ TEST(LevelControlBitExactnessTest, DISABLED_Mono32kHz) {
// TODO(peah): Investigate why this particular testcase differ between Android
// and the rest of the platforms.
-TEST(LevelControlBitExactnessTest, DISABLED_Mono48kHz) {
+TEST(LevelControlBitExactnessTest, Mono48kHz) {
#if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \
defined(WEBRTC_ANDROID))
const float kOutputReference[] = {-0.014277f, -0.015180f, -0.017437f};
#else
- const float kOutputReference[] = {-0.015949f, -0.016957f, -0.019478f};
+ const float kOutputReference[] = {-0.014306f, -0.015209f, -0.017466f};
#endif
RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 1,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Stereo8kHz) {
+TEST(LevelControlBitExactnessTest, Stereo8kHz) {
const float kOutputReference[] = {-0.014063f, -0.008450f, -0.012159f,
-0.051967f, -0.023202f, -0.047858f};
RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 2,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Stereo16kHz) {
+TEST(LevelControlBitExactnessTest, Stereo16kHz) {
const float kOutputReference[] = {-0.012714f, -0.005896f, -0.012220f,
-0.053306f, -0.024549f, -0.051527f};
RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 2,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Stereo32kHz) {
- const float kOutputReference[] = {-0.011737f, -0.007018f, -0.013446f,
- -0.053505f, -0.026292f, -0.056221f};
+TEST(LevelControlBitExactnessTest, Stereo32kHz) {
+ const float kOutputReference[] = {-0.011764f, -0.007044f, -0.013472f,
+ -0.053537f, -0.026322f, -0.056253f};
RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 2,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_Stereo48kHz) {
+TEST(LevelControlBitExactnessTest, Stereo48kHz) {
const float kOutputReference[] = {-0.010643f, -0.006334f, -0.011377f,
-0.049088f, -0.023600f, -0.050465f};
RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2,
rtc::Optional<float>(), kOutputReference);
}
-TEST(LevelControlBitExactnessTest, DISABLED_MonoInitial48kHz) {
- const float kOutputReference[] = {-0.013753f, -0.014623f, -0.016797f};
+TEST(LevelControlBitExactnessTest, MonoInitial48kHz) {
+ const float kOutputReference[] = {-0.013884f, -0.014761f, -0.016951f};
RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 1,
rtc::Optional<float>(-50), kOutputReference);
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc
index 08015f9092a..abf4ea2cb19 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/noise_level_estimator.h"
+#include "modules/audio_processing/level_controller/noise_level_estimator.h"
#include <algorithm>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h
index 017ecc2cd6c..94ef6737e77 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -34,4 +34,4 @@ class NoiseLevelEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc
index f1c1f2beb70..6e921c24d11 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h"
+#include "modules/audio_processing/level_controller/noise_spectrum_estimator.h"
#include <string.h>
#include <algorithm>
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/arraysize.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/arraysize.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h
index 11029666a55..f10933ec968 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -37,4 +37,4 @@ class NoiseSpectrumEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc
index 37046fdceb2..e78d74f514f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/peak_level_estimator.h"
+#include "modules/audio_processing/level_controller/peak_level_estimator.h"
#include <algorithm>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h
index 23c10060a8b..0aa55d2d558 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
-#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h"
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/level_controller/level_controller_constants.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -34,4 +34,4 @@ class PeakLevelEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc
index b9db974631d..60110c684ba 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h"
+#include "modules/audio_processing/level_controller/saturating_gain_estimator.h"
#include <math.h>
#include <algorithm>
-#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/level_controller/level_controller_constants.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h
index 35275f32d7b..8980f4ef972 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -34,4 +34,4 @@ class SaturatingGainEstimator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.cc b/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.cc
index 98686ac0281..d2d5917387a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.cc
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
+#include "modules/audio_processing/level_controller/signal_classifier.h"
#include <algorithm>
#include <numeric>
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/level_controller/down_sampler.h"
-#include "webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/level_controller/down_sampler.h"
+#include "modules/audio_processing/level_controller/noise_spectrum_estimator.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.h b/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.h
index 5e0749a6fed..2be13fef7ad 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_controller/signal_classifier.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/level_controller/down_sampler.h"
-#include "webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/level_controller/down_sampler.h"
+#include "modules/audio_processing/level_controller/noise_spectrum_estimator.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -64,4 +64,4 @@ class SignalClassifier {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc
index 1e52728bc87..c937f845253 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/level_estimator_impl.h"
+#include "modules/audio_processing/level_estimator_impl.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/rms_level.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/rms_level.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h
index db7217493d0..901ae4cf58b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
#include <memory>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
namespace webrtc {
@@ -38,10 +38,10 @@ class LevelEstimatorImpl : public LevelEstimator {
private:
rtc::CriticalSection* const crit_ = nullptr;
- bool enabled_ GUARDED_BY(crit_) = false;
- std::unique_ptr<RmsLevel> rms_ GUARDED_BY(crit_);
+ bool enabled_ RTC_GUARDED_BY(crit_) = false;
+ std::unique_ptr<RmsLevel> rms_ RTC_GUARDED_BY(crit_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(LevelEstimatorImpl);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_unittest.cc
index cdb9c4eef24..94b84bbdc35 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/level_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/level_estimator_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/level_estimator_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/level_estimator_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.cc b/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.cc
index 719dd050afc..2f6a6d6a809 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
#include <sstream>
-#include "webrtc/rtc_base/stringutils.h"
+#include "rtc_base/stringutils.h"
// Check to verify that the define is properly set.
#if !defined(WEBRTC_APM_DEBUG_DUMP) || \
diff --git a/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.h b/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.h
index 82dc122e34b..d045027b354 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/logging/apm_data_dumper.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
+#define MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
#include <stdio.h>
@@ -17,9 +17,9 @@
#include <string>
#include <unordered_map>
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "common_audio/wav_file.h"
+#include "rtc_base/constructormagic.h"
// Check to verify that the define is properly set.
#if !defined(WEBRTC_APM_DEBUG_DUMP) || \
@@ -209,4 +209,4 @@ class ApmDataDumper {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
+#endif // MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.cc
index b111259a626..5245c68d02a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/low_cut_filter.h"
+#include "modules/audio_processing/low_cut_filter.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/audio_buffer.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.h b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.h
index 047bcac1ac2..fd4c6f19cba 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
#include <memory>
#include <vector>
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -33,4 +33,4 @@ class LowCutFilter {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_LOW_CUT_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter_unittest.cc
index 736f0dc7ab1..d98d665d379 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/low_cut_filter_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/low_cut_filter.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/low_cut_filter.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc
index 37af1032abb..8dd713f4e50 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc
@@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/noise_suppression_impl.h"
+#include "modules/audio_processing/noise_suppression_impl.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "rtc_base/constructormagic.h"
#if defined(WEBRTC_NS_FLOAT)
-#include "webrtc/modules/audio_processing/ns/noise_suppression.h"
+#include "modules/audio_processing/ns/noise_suppression.h"
#define NS_CREATE WebRtcNs_Create
#define NS_FREE WebRtcNs_Free
#define NS_INIT WebRtcNs_Init
#define NS_SET_POLICY WebRtcNs_set_policy
typedef NsHandle NsState;
#elif defined(WEBRTC_NS_FIXED)
-#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
+#include "modules/audio_processing/ns/noise_suppression_x.h"
#define NS_CREATE WebRtcNsx_Create
#define NS_FREE WebRtcNsx_Free
#define NS_INIT WebRtcNsx_Init
diff --git a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h
index ac5909fd8b7..fba716e2530 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
namespace webrtc {
@@ -44,13 +44,13 @@ class NoiseSuppressionImpl : public NoiseSuppression {
private:
class Suppressor;
rtc::CriticalSection* const crit_;
- bool enabled_ GUARDED_BY(crit_) = false;
- Level level_ GUARDED_BY(crit_) = kModerate;
- size_t channels_ GUARDED_BY(crit_) = 0;
- int sample_rate_hz_ GUARDED_BY(crit_) = 0;
- std::vector<std::unique_ptr<Suppressor>> suppressors_ GUARDED_BY(crit_);
+ bool enabled_ RTC_GUARDED_BY(crit_) = false;
+ Level level_ RTC_GUARDED_BY(crit_) = kModerate;
+ size_t channels_ RTC_GUARDED_BY(crit_) = 0;
+ int sample_rate_hz_ RTC_GUARDED_BY(crit_) = 0;
+ std::vector<std::unique_ptr<Suppressor>> suppressors_ RTC_GUARDED_BY(crit_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NoiseSuppressionImpl);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_unittest.cc
index 835d3965858..0b734fdd3f2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/noise_suppression_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/noise_suppression_impl.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/noise_suppression_impl.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/defines.h b/chromium/third_party/webrtc/modules/audio_processing/ns/defines.h
index 8271332ce23..66b45a9565e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/defines.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/defines.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
+#define MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
#define BLOCKL_MAX 160 // max processing block length: 160
#define ANAL_BLOCKL_MAX 256 // max analysis block length: 256
@@ -46,4 +46,4 @@
#define GAMMA_PAUSE (float)0.05 // update for conservative noise estimate
//
#define B_LIM (float)0.5 // threshold in final energy gain factor calculation
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c
index 8b6f45fce8b..e21416f9560 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/ns/noise_suppression.h"
+#include "modules/audio_processing/ns/noise_suppression.h"
#include <stdlib.h>
#include <string.h>
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/ns/defines.h"
-#include "webrtc/modules/audio_processing/ns/ns_core.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/ns/defines.h"
+#include "modules/audio_processing/ns/ns_core.h"
NsHandle* WebRtcNs_Create() {
NoiseSuppressionC* self = malloc(sizeof(NoiseSuppressionC));
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.h b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.h
index 41cad4ed1c5..a167142a7f9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
+#define MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
#include <stddef.h>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
typedef struct NsHandleT NsHandle;
@@ -132,4 +132,4 @@ size_t WebRtcNs_num_freq();
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.c b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.c
index 28a07e8c1df..1fd3ebc67ef 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.c
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
+#include "modules/audio_processing/ns/noise_suppression_x.h"
#include <stdlib.h>
-#include "webrtc/common_audio/signal_processing/include/real_fft.h"
-#include "webrtc/modules/audio_processing/ns/nsx_core.h"
-#include "webrtc/modules/audio_processing/ns/nsx_defines.h"
+#include "common_audio/signal_processing/include/real_fft.h"
+#include "modules/audio_processing/ns/nsx_core.h"
+#include "modules/audio_processing/ns/nsx_defines.h"
NsxHandle* WebRtcNsx_Create() {
NoiseSuppressionFixedC* self = malloc(sizeof(NoiseSuppressionFixedC));
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.h b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.h
index 79a5fc626f3..838861db798 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression_x.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
+#define MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
#include <stddef.h>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
typedef struct NsxHandleT NsxHandle;
@@ -110,4 +110,4 @@ size_t WebRtcNsx_num_freq();
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c b/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c
index a187c437ce7..a06ec5fb6c9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c
@@ -12,12 +12,12 @@
#include <string.h>
#include <stdlib.h>
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/common_audio/fft4g.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/ns/noise_suppression.h"
-#include "webrtc/modules/audio_processing/ns/ns_core.h"
-#include "webrtc/modules/audio_processing/ns/windows_private.h"
+#include "rtc_base/checks.h"
+#include "common_audio/fft4g.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/ns/noise_suppression.h"
+#include "modules/audio_processing/ns/ns_core.h"
+#include "modules/audio_processing/ns/windows_private.h"
// Set Feature Extraction Parameters.
static void set_feature_extraction_parameters(NoiseSuppressionC* self) {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h b/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h
index aba1c468ed8..97f76baf0d6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
+#define MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
-#include "webrtc/modules/audio_processing/ns/defines.h"
+#include "modules/audio_processing/ns/defines.h"
typedef struct NSParaExtract_ {
// Bin size of histogram.
@@ -187,4 +187,4 @@ void WebRtcNs_ProcessCore(NoiseSuppressionC* self,
#ifdef __cplusplus
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c
index 3d403bbd08e..80436560290 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
+#include "modules/audio_processing/ns/noise_suppression_x.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/common_audio/signal_processing/include/real_fft.h"
-#include "webrtc/modules/audio_processing/ns/nsx_core.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
+#include "rtc_base/checks.h"
+#include "common_audio/signal_processing/include/real_fft.h"
+#include "modules/audio_processing/ns/nsx_core.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
#if defined(WEBRTC_HAS_NEON)
/* Tables are defined in ARM assembly files. */
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h
index d1754f31eae..c8097f79464 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
+#define MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
#ifdef NS_FILEDEBUG
#include <stdio.h>
#endif
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/ns/nsx_defines.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/ns/nsx_defines.h"
+#include "typedefs.h" // NOLINT(build/include)
typedef struct NoiseSuppressionFixedC_ {
uint32_t fs;
@@ -260,4 +260,4 @@ void WebRtcNsx_Denormalize_mips(NoiseSuppressionFixedC* inst,
}
#endif
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c
index 5142be89ba7..162fb1990a5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
-#include "webrtc/modules/audio_processing/ns/nsx_core.h"
-#include "webrtc/modules/audio_processing/ns/nsx_defines.h"
+#include "rtc_base/checks.h"
+#include "modules/audio_processing/ns/noise_suppression_x.h"
+#include "modules/audio_processing/ns/nsx_core.h"
+#include "modules/audio_processing/ns/nsx_defines.h"
static const int16_t kIndicatorTable[17] = {
0, 2017, 3809, 5227, 6258, 6963, 7424, 7718,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c
index 308effc1907..d58a9b23478 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c
@@ -10,9 +10,9 @@
#include <string.h>
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
-#include "webrtc/modules/audio_processing/ns/nsx_core.h"
+#include "rtc_base/checks.h"
+#include "modules/audio_processing/ns/noise_suppression_x.h"
+#include "modules/audio_processing/ns/nsx_core.h"
static const int16_t kIndicatorTable[17] = {
0, 2017, 3809, 5227, 6258, 6963, 7424, 7718,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.c b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.c
index 10c6b25c7cf..64ce99c32cf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.c
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_neon.c
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/ns/nsx_core.h"
+#include "modules/audio_processing/ns/nsx_core.h"
#include <arm_neon.h>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
// Constants to compensate for shifting signal log(2^shifts).
const int16_t WebRtcNsx_kLogTable[9] = {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_defines.h b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_defines.h
index 862dc3cab5c..12869b3cf50 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_defines.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/nsx_defines.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_
+#define MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_
#define ANAL_BLOCKL_MAX 256 /* Max analysis block length */
#define HALF_ANAL_BLOCKL 129 /* Half max analysis block length + 1 */
@@ -61,4 +61,4 @@
#define ONE_MINUS_GAMMA_PAUSE_Q8 13 /* ~= Q8(0.05) Update for conservative noise estimate */
#define GAMMA_NOISE_TRANS_AND_SPEECH_Q8 3 /* ~= Q8(0.01) Update for transition and noise region */
-#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ */
+#endif /* MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ */
diff --git a/chromium/third_party/webrtc/modules/audio_processing/ns/windows_private.h b/chromium/third_party/webrtc/modules/audio_processing/ns/windows_private.h
index 44c2e846bd9..2ffd693d8d6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/ns/windows_private.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/ns/windows_private.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
+#ifndef MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
+#define MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
// Hanning window for 4ms 16kHz
static const float kHanning64w128[128] = {
@@ -571,4 +571,4 @@ static const float kBlocks480w1024[1024] = {
(float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000
};
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
+#endif // MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/render_queue_item_verifier.h b/chromium/third_party/webrtc/modules/audio_processing/render_queue_item_verifier.h
index a7fbbb42dbc..b8aff4a1073 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/render_queue_item_verifier.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/render_queue_item_verifier.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H_
+#ifndef MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H_
+#define MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H_
#include <vector>
@@ -33,4 +33,4 @@ class RenderQueueItemVerifier {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H__
+#endif // MODULES_AUDIO_PROCESSING_RENDER_QUEUE_ITEM_VERIFIER_H__
diff --git a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.cc b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.cc
index 67bf4a1f991..0f030460eb4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.cc
@@ -8,21 +8,21 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/residual_echo_detector.h"
+#include "modules/audio_processing/residual_echo_detector.h"
#include <algorithm>
#include <numeric>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/atomicops.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/system_wrappers/include/metrics.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/logging/apm_data_dumper.h"
+#include "rtc_base/atomicops.h"
+#include "rtc_base/logging.h"
+#include "system_wrappers/include/metrics.h"
namespace {
float Power(rtc::ArrayView<const float> input) {
- if (input.size() == 0) {
+ if (input.empty()) {
return 0.f;
}
return std::inner_product(input.begin(), input.end(), input.begin(), 0.f) /
diff --git a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.h b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.h
index 8ac25fb0e41..de1b989110f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
+#define MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
#include <vector>
-#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h"
-#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h"
-#include "webrtc/modules/audio_processing/echo_detector/moving_max.h"
-#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/echo_detector/circular_buffer.h"
+#include "modules/audio_processing/echo_detector/mean_variance_estimator.h"
+#include "modules/audio_processing/echo_detector/moving_max.h"
+#include "modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
namespace webrtc {
@@ -91,4 +91,4 @@ class ResidualEchoDetector {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_complexity_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_complexity_unittest.cc
index 57a465a85ad..991b9ff47a7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_complexity_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_complexity_unittest.cc
@@ -11,17 +11,17 @@
#include <numeric>
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/residual_echo_detector.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/performance_timer.h"
-#include "webrtc/modules/audio_processing/test/simulator_buffers.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/system_wrappers/include/clock.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/perf_test.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/residual_echo_detector.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/performance_timer.h"
+#include "modules/audio_processing/test/simulator_buffers.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/clock.h"
+#include "test/gtest.h"
+#include "test/testsupport/perf_test.h"
namespace webrtc {
namespace {
@@ -89,7 +89,7 @@ void RunStandaloneSubmodule() {
"us", false);
}
-void RunTogetherWithApm(std::string test_description,
+void RunTogetherWithApm(const std::string& test_description,
bool use_mobile_aec,
bool include_default_apm_processing) {
test::SimulatorBuffers buffers(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
index 0784a4f9f70..baf83ba4aae 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
@@ -10,8 +10,8 @@
#include <vector>
-#include "webrtc/modules/audio_processing/residual_echo_detector.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/residual_echo_detector.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/rms_level.cc b/chromium/third_party/webrtc/modules/audio_processing/rms_level.cc
index 391843cb6fa..1470267f7b0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/rms_level.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/rms_level.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/rms_level.h"
+#include "modules/audio_processing/rms_level.h"
#include <math.h>
#include <algorithm>
#include <numeric>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/rms_level.h b/chromium/third_party/webrtc/modules/audio_processing/rms_level.h
index 4701e0ce1c1..6fe22fd1204 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/rms_level.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/rms_level.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
+#ifndef MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
+#define MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/typedefs.h"
+#include "api/array_view.h"
+#include "api/optional.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -71,5 +71,5 @@ class RmsLevel {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
+#endif // MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/rms_level_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/rms_level_unittest.cc
index 89338eafa74..093c8e70dcb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/rms_level_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/rms_level_unittest.cc
@@ -11,12 +11,12 @@
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/rms_level.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/mathutils.h"
-#include "webrtc/rtc_base/safe_conversions.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/rms_level.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/mathutils.h"
+#include "rtc_base/safe_conversions.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc
index 203201ebe3e..e2b8f82c36e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/splitting_filter.h"
+#include "modules/audio_processing/splitting_filter.h"
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/rtc_base/checks.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h
index 2d3750ae604..7d60c82ff6f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
#include <cstring>
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/three_band_filter_bank.h"
+#include "modules/audio_processing/three_band_filter_bank.h"
namespace webrtc {
@@ -66,4 +66,4 @@ class SplittingFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter_unittest.cc
index ce070312e71..3e0dbb9b9c8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/splitting_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/splitting_filter_unittest.cc
@@ -13,9 +13,9 @@
#include <cmath>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/modules/audio_processing/splitting_filter.h"
-#include "webrtc/test/gtest.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/audio_processing/splitting_filter.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc b/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
index c2e262ae6f4..23b7afb4531 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
@@ -10,11 +10,10 @@
#include <iostream>
-#include "webrtc/modules/audio_processing/test/aec_dump_based_simulator.h"
+#include "modules/audio_processing/test/aec_dump_based_simulator.h"
-#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/test/testsupport/trace_to_stderr.h"
+#include "modules/audio_processing/test/protobuf_utils.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
@@ -69,8 +68,7 @@ AecDumpBasedSimulator::AecDumpBasedSimulator(const SimulationSettings& settings)
AecDumpBasedSimulator::~AecDumpBasedSimulator() = default;
void AecDumpBasedSimulator::PrepareProcessStreamCall(
- const webrtc::audioproc::Stream& msg,
- bool* set_stream_analog_level_called) {
+ const webrtc::audioproc::Stream& msg) {
if (msg.has_input_data()) {
// Fixed interface processing.
// Verify interface invariance.
@@ -159,15 +157,9 @@ void AecDumpBasedSimulator::PrepareProcessStreamCall(
ap_->set_stream_key_pressed(*settings_.use_ts);
}
- // TODO(peah): Add support for controlling the analog level via the
- // command-line.
- if (msg.has_level()) {
- RTC_CHECK_EQ(AudioProcessing::kNoError,
- ap_->gain_control()->set_stream_analog_level(msg.level()));
- *set_stream_analog_level_called = true;
- } else {
- *set_stream_analog_level_called = false;
- }
+ // Level is always logged in AEC dumps.
+ RTC_CHECK(msg.has_level());
+ aec_dump_mic_level_ = msg.level();
}
void AecDumpBasedSimulator::VerifyProcessStreamBitExactness(
@@ -217,11 +209,6 @@ void AecDumpBasedSimulator::PrepareReverseProcessStreamCall(
}
void AecDumpBasedSimulator::Process() {
- std::unique_ptr<test::TraceToStderr> trace_to_stderr;
- if (settings_.use_verbose_logging) {
- trace_to_stderr.reset(new test::TraceToStderr(true));
- }
-
CreateAudioProcessor();
dump_input_file_ = OpenFile(settings_.aec_dump_input_filename->c_str(), "rb");
@@ -242,8 +229,6 @@ void AecDumpBasedSimulator::Process() {
webrtc::audioproc::Event event_msg;
int num_forward_chunks_processed = 0;
- const float kOneBykChunksPerSecond =
- 1.f / AudioProcessingSimulator::kChunksPerSecond;
while (ReadMessageFromFile(dump_input_file_, &event_msg)) {
switch (event_msg.type()) {
case webrtc::audioproc::Event::INIT:
@@ -266,10 +251,6 @@ void AecDumpBasedSimulator::Process() {
default:
RTC_CHECK(false);
}
- if (trace_to_stderr) {
- trace_to_stderr->SetTimeSeconds(num_forward_chunks_processed *
- kOneBykChunksPerSecond);
- }
}
fclose(dump_input_file_);
@@ -482,7 +463,7 @@ void AecDumpBasedSimulator::HandleMessage(
}
if (settings_.use_verbose_logging && msg.has_experiments_description() &&
- msg.experiments_description().size() > 0) {
+ !msg.experiments_description().empty()) {
std::cout << " experiments not included by default in the simulation: "
<< msg.experiments_description() << std::endl;
}
@@ -565,14 +546,8 @@ void AecDumpBasedSimulator::HandleMessage(const webrtc::audioproc::Init& msg) {
void AecDumpBasedSimulator::HandleMessage(
const webrtc::audioproc::Stream& msg) {
- bool set_stream_analog_level_called = false;
- PrepareProcessStreamCall(msg, &set_stream_analog_level_called);
+ PrepareProcessStreamCall(msg);
ProcessStream(interface_used_ == InterfaceType::kFixedInterface);
- if (set_stream_analog_level_called) {
- // Call stream analog level to ensure that any side-effects are triggered.
- (void)ap_->gain_control()->stream_analog_level();
- }
-
VerifyProcessStreamBitExactness(msg);
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.h b/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.h
index 3fb1d5528fe..4c29bf7315b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.h
@@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
+#define MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
-#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h"
+#include "modules/audio_processing/test/audio_processing_simulator.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/ignore_wundef.h"
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
#else
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
#endif
RTC_POP_IGNORING_WUNDEF()
@@ -41,8 +41,7 @@ class AecDumpBasedSimulator final : public AudioProcessingSimulator {
void HandleMessage(const webrtc::audioproc::Stream& msg);
void HandleMessage(const webrtc::audioproc::ReverseStream& msg);
void HandleMessage(const webrtc::audioproc::Config& msg);
- void PrepareProcessStreamCall(const webrtc::audioproc::Stream& msg,
- bool* set_stream_analog_level_called);
+ void PrepareProcessStreamCall(const webrtc::audioproc::Stream& msg);
void PrepareReverseProcessStreamCall(
const webrtc::audioproc::ReverseStream& msg);
void VerifyProcessStreamBitExactness(const webrtc::audioproc::Stream& msg);
@@ -65,4 +64,4 @@ class AecDumpBasedSimulator final : public AudioProcessingSimulator {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.cc b/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.cc
index 46ee61d71da..0f0e5cd5205 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
#include <string.h>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.h b/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.h
index f35e9a795f7..dc53e4f6a21 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/audio_buffer_tools.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
namespace webrtc {
namespace test {
@@ -32,4 +32,4 @@ void ExtractVectorFromAudioBuffer(const StreamConfig& stream_config,
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.cc b/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.cc
index 461fc71c5e1..0926473b100 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.cc
@@ -8,19 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h"
+#include "modules/audio_processing/test/audio_processing_simulator.h"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
+#include <utility>
#include <vector>
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/stringutils.h"
+#include "common_audio/include/audio_util.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/test/fake_recording_device.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/stringutils.h"
namespace webrtc {
namespace test {
@@ -80,14 +83,22 @@ void CopyToAudioFrame(const ChannelBuffer<float>& src, AudioFrame* dest) {
AudioProcessingSimulator::AudioProcessingSimulator(
const SimulationSettings& settings)
- : settings_(settings), worker_queue_("file_writer_task_queue") {
+ : settings_(settings),
+ analog_mic_level_(settings.initial_mic_level),
+ fake_recording_device_(
+ settings.initial_mic_level,
+ settings_.simulate_mic_gain ? *settings.simulated_mic_kind : 0),
+ worker_queue_("file_writer_task_queue") {
if (settings_.ed_graph_output_filename &&
- settings_.ed_graph_output_filename->size() > 0) {
+ !settings_.ed_graph_output_filename->empty()) {
residual_echo_likelihood_graph_writer_.open(
*settings_.ed_graph_output_filename);
RTC_CHECK(residual_echo_likelihood_graph_writer_.is_open());
WriteEchoLikelihoodGraphFileHeader(&residual_echo_likelihood_graph_writer_);
}
+
+ if (settings_.simulate_mic_gain)
+ LOG(LS_VERBOSE) << "Simulating analog mic gain";
}
AudioProcessingSimulator::~AudioProcessingSimulator() {
@@ -105,6 +116,34 @@ AudioProcessingSimulator::ScopedTimer::~ScopedTimer() {
}
void AudioProcessingSimulator::ProcessStream(bool fixed_interface) {
+ // Optionally use the fake recording device to simulate analog gain.
+ if (settings_.simulate_mic_gain) {
+ if (settings_.aec_dump_input_filename) {
+ // When the analog gain is simulated and an AEC dump is used as input, set
+ // the undo level to |aec_dump_mic_level_| to virtually restore the
+ // unmodified microphone signal level.
+ fake_recording_device_.SetUndoMicLevel(aec_dump_mic_level_);
+ }
+
+ if (fixed_interface) {
+ fake_recording_device_.SimulateAnalogGain(&fwd_frame_);
+ } else {
+ fake_recording_device_.SimulateAnalogGain(in_buf_.get());
+ }
+
+ // Notify the current mic level to AGC.
+ RTC_CHECK_EQ(AudioProcessing::kNoError,
+ ap_->gain_control()->set_stream_analog_level(
+ fake_recording_device_.MicLevel()));
+ } else {
+ // Notify the current mic level to AGC.
+ RTC_CHECK_EQ(AudioProcessing::kNoError,
+ ap_->gain_control()->set_stream_analog_level(
+ settings_.aec_dump_input_filename ? aec_dump_mic_level_
+ : analog_mic_level_));
+ }
+
+ // Process the current audio frame.
if (fixed_interface) {
{
const auto st = ScopedTimer(mutable_proc_time());
@@ -118,6 +157,14 @@ void AudioProcessingSimulator::ProcessStream(bool fixed_interface) {
out_config_, out_buf_->channels()));
}
+ // Store the mic level suggested by AGC.
+ // Note that when the analog gain is simulated and an AEC dump is used as
+ // input, |analog_mic_level_| will not be used with set_stream_analog_level().
+ analog_mic_level_ = ap_->gain_control()->stream_analog_level();
+ if (settings_.simulate_mic_gain) {
+ fake_recording_device_.SetMicLevel(analog_mic_level_);
+ }
+
if (buffer_writer_) {
buffer_writer_->Write(*out_buf_);
}
@@ -195,6 +242,8 @@ void AudioProcessingSimulator::SetupBuffersConfigsOutputs(
rev_frame_.num_channels_ = reverse_input_num_channels;
if (settings_.use_verbose_logging) {
+ rtc::LogMessage::LogToDebug(rtc::LS_VERBOSE);
+
std::cout << "Sample rates:" << std::endl;
std::cout << " Forward input: " << input_sample_rate_hz << std::endl;
std::cout << " Forward output: " << output_sample_rate_hz << std::endl;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.h b/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.h
index 1ae465cbeff..9f81e6caa3f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/audio_processing_simulator.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
+#define MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
#include <algorithm>
#include <fstream>
@@ -17,13 +17,14 @@
#include <memory>
#include <string>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/rtc_base/timeutils.h"
+#include "api/optional.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/test/fake_recording_device.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/task_queue.h"
+#include "rtc_base/timeutils.h"
namespace webrtc {
namespace test {
@@ -76,6 +77,9 @@ struct SimulationSettings {
rtc::Optional<int> vad_likelihood;
rtc::Optional<int> ns_level;
rtc::Optional<bool> use_refined_adaptive_filter;
+ int initial_mic_level;
+ bool simulate_mic_gain = false;
+ rtc::Optional<int> simulated_mic_kind;
bool report_performance = false;
bool report_bitexactness = false;
bool use_verbose_logging = false;
@@ -166,6 +170,7 @@ class AudioProcessingSimulator {
AudioFrame rev_frame_;
AudioFrame fwd_frame_;
bool bitexact_output_ = true;
+ int aec_dump_mic_level_ = 0;
private:
void SetupOutput();
@@ -177,6 +182,8 @@ class AudioProcessingSimulator {
std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_;
TickIntervalStats proc_time_;
std::ofstream residual_echo_likelihood_graph_writer_;
+ int analog_mic_level_;
+ FakeRecordingDevice fake_recording_device_;
rtc::TaskQueue worker_queue_;
@@ -186,4 +193,4 @@ class AudioProcessingSimulator {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/audioproc_float.cc b/chromium/third_party/webrtc/modules/audio_processing/test/audioproc_float.cc
index a11f41c8551..df7f43edc90 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/audioproc_float.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/audioproc_float.cc
@@ -13,11 +13,11 @@
#include <string.h>
-#include "gflags/gflags.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/test/aec_dump_based_simulator.h"
-#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h"
-#include "webrtc/modules/audio_processing/test/wav_based_simulator.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/test/aec_dump_based_simulator.h"
+#include "modules/audio_processing/test/audio_processing_simulator.h"
+#include "modules/audio_processing/test/wav_based_simulator.h"
+#include "rtc_base/flags.h"
namespace webrtc {
namespace test {
@@ -32,7 +32,7 @@ const char kUsageDescription[] =
"\n\n"
"Command-line tool to simulate a call using the audio "
"processing module, either based on wav files or "
- "protobuf debug dump recordings.";
+ "protobuf debug dump recordings.\n";
DEFINE_string(dump_input, "", "Aec dump input filename");
DEFINE_string(dump_output, "", "Aec dump output filename");
@@ -41,126 +41,133 @@ DEFINE_string(o, "", "Forward stream output wav filename");
DEFINE_string(ri, "", "Reverse stream input wav filename");
DEFINE_string(ro, "", "Reverse stream output wav filename");
DEFINE_string(artificial_nearend, "", "Artificial nearend wav filename");
-DEFINE_int32(output_num_channels,
- kParameterNotSpecifiedValue,
- "Number of forward stream output channels");
-DEFINE_int32(reverse_output_num_channels,
- kParameterNotSpecifiedValue,
- "Number of Reverse stream output channels");
-DEFINE_int32(output_sample_rate_hz,
- kParameterNotSpecifiedValue,
- "Forward stream output sample rate in Hz");
-DEFINE_int32(reverse_output_sample_rate_hz,
- kParameterNotSpecifiedValue,
- "Reverse stream output sample rate in Hz");
+DEFINE_int(output_num_channels,
+ kParameterNotSpecifiedValue,
+ "Number of forward stream output channels");
+DEFINE_int(reverse_output_num_channels,
+ kParameterNotSpecifiedValue,
+ "Number of Reverse stream output channels");
+DEFINE_int(output_sample_rate_hz,
+ kParameterNotSpecifiedValue,
+ "Forward stream output sample rate in Hz");
+DEFINE_int(reverse_output_sample_rate_hz,
+ kParameterNotSpecifiedValue,
+ "Reverse stream output sample rate in Hz");
DEFINE_string(mic_positions,
"",
"Space delimited cartesian coordinates of microphones in "
"meters. The coordinates of each point are contiguous. For a "
"two element array: \"x1 y1 z1 x2 y2 z2\"");
-DEFINE_int32(target_angle_degrees,
- 90,
- "The azimuth of the target in degrees (0-359). Only applies to "
- "beamforming.");
+DEFINE_int(target_angle_degrees,
+ 90,
+ "The azimuth of the target in degrees (0-359). Only applies to "
+ "beamforming.");
DEFINE_bool(fixed_interface,
false,
"Use the fixed interface when operating on wav files");
-DEFINE_int32(aec,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the echo canceller");
-DEFINE_int32(aecm,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the mobile echo controller");
-DEFINE_int32(ed,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate (0) the residual echo detector");
+DEFINE_int(aec,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the echo canceller");
+DEFINE_int(aecm,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the mobile echo controller");
+DEFINE_int(ed,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate (0) the residual echo detector");
DEFINE_string(ed_graph, "", "Output filename for graph of echo likelihood");
-DEFINE_int32(agc,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the AGC");
-DEFINE_int32(agc2,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the AGC2");
-DEFINE_int32(hpf,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the high-pass filter");
-DEFINE_int32(ns,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the noise suppressor");
-DEFINE_int32(ts,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the transient suppressor");
-DEFINE_int32(bf,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the beamformer");
-DEFINE_int32(ie,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the intelligibility enhancer");
-DEFINE_int32(vad,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the voice activity detector");
-DEFINE_int32(le,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the level estimator");
+DEFINE_int(agc,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the AGC");
+DEFINE_int(agc2,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the AGC2");
+DEFINE_int(hpf,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the high-pass filter");
+DEFINE_int(ns,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the noise suppressor");
+DEFINE_int(ts,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the transient suppressor");
+DEFINE_int(bf,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the beamformer");
+DEFINE_int(ie,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the intelligibility enhancer");
+DEFINE_int(vad,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the voice activity detector");
+DEFINE_int(le,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the level estimator");
DEFINE_bool(all_default,
false,
"Activate all of the default components (will be overridden by any "
"other settings)");
-DEFINE_int32(aec_suppression_level,
- kParameterNotSpecifiedValue,
- "Set the aec suppression level (0-2)");
-DEFINE_int32(delay_agnostic,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the AEC delay agnostic mode");
-DEFINE_int32(extended_filter,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the AEC extended filter mode");
-DEFINE_int32(drift_compensation,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the drift compensation");
-DEFINE_int32(aec3,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the experimental AEC mode AEC3");
-DEFINE_int32(lc,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the level control");
-DEFINE_int32(experimental_agc,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the experimental AGC");
-DEFINE_int32(
+DEFINE_int(aec_suppression_level,
+ kParameterNotSpecifiedValue,
+ "Set the aec suppression level (0-2)");
+DEFINE_int(delay_agnostic,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the AEC delay agnostic mode");
+DEFINE_int(extended_filter,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the AEC extended filter mode");
+DEFINE_int(drift_compensation,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the drift compensation");
+DEFINE_int(aec3,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the experimental AEC mode AEC3");
+DEFINE_int(lc,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the level control");
+DEFINE_int(experimental_agc,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the experimental AGC");
+DEFINE_int(
refined_adaptive_filter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the refined adaptive filter functionality");
-DEFINE_int32(aecm_routing_mode,
- kParameterNotSpecifiedValue,
- "Specify the AECM routing mode (0-4)");
-DEFINE_int32(aecm_comfort_noise,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the AECM comfort noise");
-DEFINE_int32(agc_mode,
- kParameterNotSpecifiedValue,
- "Specify the AGC mode (0-2)");
-DEFINE_int32(agc_target_level,
- kParameterNotSpecifiedValue,
- "Specify the AGC target level (0-31)");
-DEFINE_int32(agc_limiter,
- kParameterNotSpecifiedValue,
- "Activate (1) or deactivate(0) the level estimator");
-DEFINE_int32(agc_compression_gain,
- kParameterNotSpecifiedValue,
- "Specify the AGC compression gain (0-90)");
-DEFINE_int32(vad_likelihood,
- kParameterNotSpecifiedValue,
- "Specify the VAD likelihood (0-3)");
-DEFINE_int32(ns_level,
- kParameterNotSpecifiedValue,
- "Specify the NS level (0-3)");
-DEFINE_int32(stream_delay,
- kParameterNotSpecifiedValue,
- "Specify the stream delay in ms to use");
-DEFINE_int32(stream_drift_samples,
- kParameterNotSpecifiedValue,
- "Specify the number of stream drift samples to use");
+DEFINE_int(aecm_routing_mode,
+ kParameterNotSpecifiedValue,
+ "Specify the AECM routing mode (0-4)");
+DEFINE_int(aecm_comfort_noise,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the AECM comfort noise");
+DEFINE_int(agc_mode,
+ kParameterNotSpecifiedValue,
+ "Specify the AGC mode (0-2)");
+DEFINE_int(agc_target_level,
+ kParameterNotSpecifiedValue,
+ "Specify the AGC target level (0-31)");
+DEFINE_int(agc_limiter,
+ kParameterNotSpecifiedValue,
+ "Activate (1) or deactivate(0) the level estimator");
+DEFINE_int(agc_compression_gain,
+ kParameterNotSpecifiedValue,
+ "Specify the AGC compression gain (0-90)");
+DEFINE_int(vad_likelihood,
+ kParameterNotSpecifiedValue,
+ "Specify the VAD likelihood (0-3)");
+DEFINE_int(ns_level,
+ kParameterNotSpecifiedValue,
+ "Specify the NS level (0-3)");
+DEFINE_int(stream_delay,
+ kParameterNotSpecifiedValue,
+ "Specify the stream delay in ms to use");
+DEFINE_int(stream_drift_samples,
+ kParameterNotSpecifiedValue,
+ "Specify the number of stream drift samples to use");
+DEFINE_int(initial_mic_level, 100, "Initial mic level (0-255)");
+DEFINE_int(simulate_mic_gain,
+ 0,
+ "Activate (1) or deactivate(0) the analog mic gain simulation");
+DEFINE_int(simulated_mic_kind,
+ kParameterNotSpecifiedValue,
+ "Specify which microphone kind to use for microphone simulation");
DEFINE_bool(performance_report, false, "Report the APM performance ");
DEFINE_bool(verbose, false, "Produce verbose output");
DEFINE_bool(bitexactness_report,
@@ -173,8 +180,9 @@ DEFINE_bool(store_intermediate_output,
false,
"Creates new output files after each init");
DEFINE_string(custom_call_order_file, "", "Custom process API call order file");
+DEFINE_bool(help, false, "Print this message");
-void SetSettingIfSpecified(const std::string value,
+void SetSettingIfSpecified(const std::string& value,
rtc::Optional<std::string>* parameter) {
if (value.compare("") != 0) {
*parameter = rtc::Optional<std::string>(value);
@@ -197,7 +205,7 @@ void SetSettingIfFlagSet(int32_t flag, rtc::Optional<bool>* parameter) {
SimulationSettings CreateSettings() {
SimulationSettings settings;
- if (FLAGS_all_default) {
+ if (FLAG_all_default) {
settings.use_le = rtc::Optional<bool>(true);
settings.use_vad = rtc::Optional<bool>(true);
settings.use_ie = rtc::Optional<bool>(false);
@@ -210,75 +218,78 @@ SimulationSettings CreateSettings() {
settings.use_aecm = rtc::Optional<bool>(false);
settings.use_ed = rtc::Optional<bool>(false);
}
- SetSettingIfSpecified(FLAGS_dump_input, &settings.aec_dump_input_filename);
- SetSettingIfSpecified(FLAGS_dump_output, &settings.aec_dump_output_filename);
- SetSettingIfSpecified(FLAGS_i, &settings.input_filename);
- SetSettingIfSpecified(FLAGS_o, &settings.output_filename);
- SetSettingIfSpecified(FLAGS_ri, &settings.reverse_input_filename);
- SetSettingIfSpecified(FLAGS_ro, &settings.reverse_output_filename);
- SetSettingIfSpecified(FLAGS_artificial_nearend,
+ SetSettingIfSpecified(FLAG_dump_input, &settings.aec_dump_input_filename);
+ SetSettingIfSpecified(FLAG_dump_output, &settings.aec_dump_output_filename);
+ SetSettingIfSpecified(FLAG_i, &settings.input_filename);
+ SetSettingIfSpecified(FLAG_o, &settings.output_filename);
+ SetSettingIfSpecified(FLAG_ri, &settings.reverse_input_filename);
+ SetSettingIfSpecified(FLAG_ro, &settings.reverse_output_filename);
+ SetSettingIfSpecified(FLAG_artificial_nearend,
&settings.artificial_nearend_filename);
- SetSettingIfSpecified(FLAGS_output_num_channels,
+ SetSettingIfSpecified(FLAG_output_num_channels,
&settings.output_num_channels);
- SetSettingIfSpecified(FLAGS_reverse_output_num_channels,
+ SetSettingIfSpecified(FLAG_reverse_output_num_channels,
&settings.reverse_output_num_channels);
- SetSettingIfSpecified(FLAGS_output_sample_rate_hz,
+ SetSettingIfSpecified(FLAG_output_sample_rate_hz,
&settings.output_sample_rate_hz);
- SetSettingIfSpecified(FLAGS_reverse_output_sample_rate_hz,
+ SetSettingIfSpecified(FLAG_reverse_output_sample_rate_hz,
&settings.reverse_output_sample_rate_hz);
- SetSettingIfSpecified(FLAGS_mic_positions, &settings.microphone_positions);
- settings.target_angle_degrees = FLAGS_target_angle_degrees;
- SetSettingIfFlagSet(FLAGS_aec, &settings.use_aec);
- SetSettingIfFlagSet(FLAGS_aecm, &settings.use_aecm);
- SetSettingIfFlagSet(FLAGS_ed, &settings.use_ed);
- SetSettingIfSpecified(FLAGS_ed_graph, &settings.ed_graph_output_filename);
- SetSettingIfFlagSet(FLAGS_agc, &settings.use_agc);
- SetSettingIfFlagSet(FLAGS_agc2, &settings.use_agc2);
- SetSettingIfFlagSet(FLAGS_hpf, &settings.use_hpf);
- SetSettingIfFlagSet(FLAGS_ns, &settings.use_ns);
- SetSettingIfFlagSet(FLAGS_ts, &settings.use_ts);
- SetSettingIfFlagSet(FLAGS_bf, &settings.use_bf);
- SetSettingIfFlagSet(FLAGS_ie, &settings.use_ie);
- SetSettingIfFlagSet(FLAGS_vad, &settings.use_vad);
- SetSettingIfFlagSet(FLAGS_le, &settings.use_le);
- SetSettingIfSpecified(FLAGS_aec_suppression_level,
+ SetSettingIfSpecified(FLAG_mic_positions, &settings.microphone_positions);
+ settings.target_angle_degrees = FLAG_target_angle_degrees;
+ SetSettingIfFlagSet(FLAG_aec, &settings.use_aec);
+ SetSettingIfFlagSet(FLAG_aecm, &settings.use_aecm);
+ SetSettingIfFlagSet(FLAG_ed, &settings.use_ed);
+ SetSettingIfSpecified(FLAG_ed_graph, &settings.ed_graph_output_filename);
+ SetSettingIfFlagSet(FLAG_agc, &settings.use_agc);
+ SetSettingIfFlagSet(FLAG_agc2, &settings.use_agc2);
+ SetSettingIfFlagSet(FLAG_hpf, &settings.use_hpf);
+ SetSettingIfFlagSet(FLAG_ns, &settings.use_ns);
+ SetSettingIfFlagSet(FLAG_ts, &settings.use_ts);
+ SetSettingIfFlagSet(FLAG_bf, &settings.use_bf);
+ SetSettingIfFlagSet(FLAG_ie, &settings.use_ie);
+ SetSettingIfFlagSet(FLAG_vad, &settings.use_vad);
+ SetSettingIfFlagSet(FLAG_le, &settings.use_le);
+ SetSettingIfSpecified(FLAG_aec_suppression_level,
&settings.aec_suppression_level);
- SetSettingIfFlagSet(FLAGS_delay_agnostic, &settings.use_delay_agnostic);
- SetSettingIfFlagSet(FLAGS_extended_filter, &settings.use_extended_filter);
- SetSettingIfFlagSet(FLAGS_drift_compensation,
+ SetSettingIfFlagSet(FLAG_delay_agnostic, &settings.use_delay_agnostic);
+ SetSettingIfFlagSet(FLAG_extended_filter, &settings.use_extended_filter);
+ SetSettingIfFlagSet(FLAG_drift_compensation,
&settings.use_drift_compensation);
- SetSettingIfFlagSet(FLAGS_refined_adaptive_filter,
+ SetSettingIfFlagSet(FLAG_refined_adaptive_filter,
&settings.use_refined_adaptive_filter);
- SetSettingIfFlagSet(FLAGS_aec3, &settings.use_aec3);
- SetSettingIfFlagSet(FLAGS_lc, &settings.use_lc);
- SetSettingIfFlagSet(FLAGS_experimental_agc, &settings.use_experimental_agc);
- SetSettingIfSpecified(FLAGS_aecm_routing_mode, &settings.aecm_routing_mode);
- SetSettingIfFlagSet(FLAGS_aecm_comfort_noise,
+ SetSettingIfFlagSet(FLAG_aec3, &settings.use_aec3);
+ SetSettingIfFlagSet(FLAG_lc, &settings.use_lc);
+ SetSettingIfFlagSet(FLAG_experimental_agc, &settings.use_experimental_agc);
+ SetSettingIfSpecified(FLAG_aecm_routing_mode, &settings.aecm_routing_mode);
+ SetSettingIfFlagSet(FLAG_aecm_comfort_noise,
&settings.use_aecm_comfort_noise);
- SetSettingIfSpecified(FLAGS_agc_mode, &settings.agc_mode);
- SetSettingIfSpecified(FLAGS_agc_target_level, &settings.agc_target_level);
- SetSettingIfFlagSet(FLAGS_agc_limiter, &settings.use_agc_limiter);
- SetSettingIfSpecified(FLAGS_agc_compression_gain,
+ SetSettingIfSpecified(FLAG_agc_mode, &settings.agc_mode);
+ SetSettingIfSpecified(FLAG_agc_target_level, &settings.agc_target_level);
+ SetSettingIfFlagSet(FLAG_agc_limiter, &settings.use_agc_limiter);
+ SetSettingIfSpecified(FLAG_agc_compression_gain,
&settings.agc_compression_gain);
- SetSettingIfSpecified(FLAGS_vad_likelihood, &settings.vad_likelihood);
- SetSettingIfSpecified(FLAGS_ns_level, &settings.ns_level);
- SetSettingIfSpecified(FLAGS_stream_delay, &settings.stream_delay);
- SetSettingIfSpecified(FLAGS_stream_drift_samples,
+ SetSettingIfSpecified(FLAG_vad_likelihood, &settings.vad_likelihood);
+ SetSettingIfSpecified(FLAG_ns_level, &settings.ns_level);
+ SetSettingIfSpecified(FLAG_stream_delay, &settings.stream_delay);
+ SetSettingIfSpecified(FLAG_stream_drift_samples,
&settings.stream_drift_samples);
- SetSettingIfSpecified(FLAGS_custom_call_order_file,
+ SetSettingIfSpecified(FLAG_custom_call_order_file,
&settings.custom_call_order_filename);
- settings.report_performance = FLAGS_performance_report;
- settings.use_verbose_logging = FLAGS_verbose;
- settings.report_bitexactness = FLAGS_bitexactness_report;
- settings.discard_all_settings_in_aecdump = FLAGS_discard_settings_in_aecdump;
- settings.fixed_interface = FLAGS_fixed_interface;
- settings.store_intermediate_output = FLAGS_store_intermediate_output;
+ settings.initial_mic_level = FLAG_initial_mic_level;
+ settings.simulate_mic_gain = FLAG_simulate_mic_gain;
+ SetSettingIfSpecified(FLAG_simulated_mic_kind, &settings.simulated_mic_kind);
+ settings.report_performance = FLAG_performance_report;
+ settings.use_verbose_logging = FLAG_verbose;
+ settings.report_bitexactness = FLAG_bitexactness_report;
+ settings.discard_all_settings_in_aecdump = FLAG_discard_settings_in_aecdump;
+ settings.fixed_interface = FLAG_fixed_interface;
+ settings.store_intermediate_output = FLAG_store_intermediate_output;
return settings;
}
-void ReportConditionalErrorAndExit(bool condition, std::string message) {
+void ReportConditionalErrorAndExit(bool condition, const std::string& message) {
if (condition) {
std::cerr << message << std::endl;
exit(1);
@@ -384,6 +395,20 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) {
"Error: --custom_call_order_file cannot be used when operating on an "
"aecdump\n");
+ ReportConditionalErrorAndExit(
+ (settings.initial_mic_level < 0 || settings.initial_mic_level > 255),
+ "Error: --initial_mic_level must be specified between 0 and 255.\n");
+
+ ReportConditionalErrorAndExit(
+ settings.simulated_mic_kind && !settings.simulate_mic_gain,
+ "Error: --simulated_mic_kind cannot be specified when mic simulation is "
+ "disabled\n");
+
+ ReportConditionalErrorAndExit(
+ !settings.simulated_mic_kind && settings.simulate_mic_gain,
+ "Error: --simulated_mic_kind must be specified when mic simulation is "
+ "enabled\n");
+
auto valid_wav_name = [](const std::string& wav_file_name) {
if (wav_file_name.size() < 5) {
return false;
@@ -422,8 +447,15 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) {
} // namespace
int main(int argc, char* argv[]) {
- google::SetUsageMessage(kUsageDescription);
- google::ParseCommandLineFlags(&argc, &argv, true);
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
+ FLAG_help || argc != 1) {
+ printf("%s", kUsageDescription);
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
+ return 1;
+ }
SimulationSettings settings = CreateSettings();
PerformBasicParameterSanityChecks(settings);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.cc b/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.cc
index ae3d2163e4b..c49bb5099f1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
#include <math.h>
#include <algorithm>
#include <string>
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "api/array_view.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.h b/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.h
index e4b863ac319..eb5ee081c32 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/bitexactness_tools.h
@@ -9,14 +9,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
#include <string>
-#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_coding/neteq/tools/input_audio_file.h"
+#include "test/gtest.h"
namespace webrtc {
namespace test {
@@ -53,4 +53,4 @@ void ReadFloatSamplesFromStereoFile(size_t samples_per_channel,
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
index 587663b7fcf..c7263301b6a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
@@ -6,7 +6,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-import("../../../../../webrtc/webrtc.gni")
+import("../../../../webrtc.gni")
group("conversational_speech") {
testonly = true
@@ -24,7 +24,6 @@ rtc_executable("conversational_speech_generator") {
":lib",
"../../../../rtc_base:rtc_base_approved",
"../../../../test:test_support",
- "//third_party/gflags",
]
}
@@ -46,6 +45,7 @@ rtc_static_library("lib") {
]
deps = [
"../../../..:webrtc_common",
+ "../../../../api:array_view",
"../../../../common_audio",
"../../../../rtc_base:rtc_base_approved",
]
@@ -64,6 +64,8 @@ rtc_source_set("unittest") {
deps = [
":lib",
"../../../..:webrtc_common",
+ "../../../../api:array_view",
+ "../../../../api:optional",
"../../../../common_audio",
"../../../../rtc_base:rtc_base_approved",
"../../../../test:test_support",
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.cc
index 5a0a32267df..76d3de8108b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/config.h"
+#include "modules/audio_processing/test/conversational_speech/config.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.h
index bad1145e989..f219a65f608 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/config.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
#include <string>
@@ -38,4 +38,4 @@ struct Config {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_CONFIG_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator.cc
index c7f86dec1ea..ee3f81a9a20 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator.cc
@@ -10,27 +10,19 @@
#include <iostream>
-#include "gflags/gflags.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/config.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/simulator.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/timing.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h"
-#include "webrtc/rtc_base/ptr_util.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_processing/test/conversational_speech/config.h"
+#include "modules/audio_processing/test/conversational_speech/multiend_call.h"
+#include "modules/audio_processing/test/conversational_speech/simulator.h"
+#include "modules/audio_processing/test/conversational_speech/timing.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_factory.h"
+#include "rtc_base/flags.h"
+#include "rtc_base/ptr_util.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
namespace test {
namespace {
-// Adapting DirExists/FileExists interfaces to DEFINE_validator.
-auto dir_exists = [](const char* c, const std::string& dirpath) {
- return DirExists(dirpath);
-};
-auto file_exists = [](const char* c, const std::string& filepath) {
- return FileExists(filepath);
-};
-
const char kUsageDescription[] =
"Usage: conversational_speech_generator\n"
" -i <path/to/source/audiotracks>\n"
@@ -38,21 +30,30 @@ const char kUsageDescription[] =
" -o <output/path>\n"
"\n\n"
"Command-line tool to generate multiple-end audio tracks to simulate "
- "conversational speech with two or more participants.";
+ "conversational speech with two or more participants.\n";
DEFINE_string(i, "", "Directory containing the speech turn wav files");
-DEFINE_validator(i, dir_exists);
DEFINE_string(t, "", "Path to the timing text file");
-DEFINE_validator(t, file_exists);
DEFINE_string(o, "", "Output wav files destination path");
-DEFINE_validator(o, dir_exists);
+DEFINE_bool(help, false, "Prints this message");
} // namespace
int main(int argc, char* argv[]) {
- google::SetUsageMessage(kUsageDescription);
- google::ParseCommandLineFlags(&argc, &argv, true);
- conversational_speech::Config config(FLAGS_i, FLAGS_t, FLAGS_o);
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
+ FLAG_help || argc != 1) {
+ printf("%s", kUsageDescription);
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
+ return 1;
+ }
+ RTC_CHECK(DirExists(FLAG_i));
+ RTC_CHECK(FileExists(FLAG_t));
+ RTC_CHECK(DirExists(FLAG_o));
+
+ conversational_speech::Config config(FLAG_i, FLAG_t, FLAG_o);
// Load timing.
std::vector<conversational_speech::Turn> timing =
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
index 9a52e5cc1f1..7e874b06b6a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
@@ -42,19 +42,19 @@
#include <memory>
#include <vector>
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/config.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/simulator.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/timing.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/rtc_base/pathutils.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "api/optional.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/test/conversational_speech/config.h"
+#include "modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
+#include "modules/audio_processing/test/conversational_speech/multiend_call.h"
+#include "modules/audio_processing/test/conversational_speech/simulator.h"
+#include "modules/audio_processing/test/conversational_speech/timing.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_factory.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/pathutils.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
index 6b92339adcb..103483d83e1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h"
+#include "modules/audio_processing/test/conversational_speech/mock_wavreader.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
index a49ba2c74d9..55d00b31aed 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
#include <cstddef>
#include <string>
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gmock.h"
-#include "webrtc/typedefs.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "test/gmock.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace test {
@@ -46,4 +46,4 @@ class MockWavReader : public WavReaderInterface {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
index 0483a33ceca..d2c107aca89 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
+#include "modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/pathutils.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/test/conversational_speech/mock_wavreader.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/pathutils.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h
index d22856e80c4..4c055cf3aed 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
#include <map>
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
-#include "webrtc/test/gmock.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "test/gmock.h"
namespace webrtc {
namespace test {
@@ -53,4 +53,4 @@ class MockWavReaderFactory : public WavReaderAbstractFactory {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVREADER_FACTORY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.cc
index dffbfcbe1e9..7c4244296bd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h"
+#include "modules/audio_processing/test/conversational_speech/multiend_call.h"
#include <algorithm>
#include <iterator>
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/pathutils.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/pathutils.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
index b28dc9b01f8..e4cee7ac965 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
#include <stddef.h>
#include <map>
@@ -19,11 +19,11 @@
#include <utility>
#include <vector>
-#include "webrtc/modules/audio_processing/test/conversational_speech/timing.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/test/conversational_speech/timing.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace test {
@@ -90,4 +90,4 @@ class MultiEndCall {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.cc
index cb4bcfa7b8d..4f3091aaae9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.cc
@@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/simulator.h"
+#include "modules/audio_processing/test/conversational_speech/simulator.h"
#include <set>
#include <utility>
#include <vector>
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/pathutils.h"
-#include "webrtc/rtc_base/ptr_util.h"
+#include "api/array_view.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/logging.h"
+#include "rtc_base/pathutils.h"
+#include "rtc_base/ptr_util.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.h
index 6882cca124b..671c3b9c735 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/simulator.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
#include <map>
#include <memory>
#include <string>
#include <utility>
-#include "webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "modules/audio_processing/test/conversational_speech/multiend_call.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace test {
@@ -41,4 +41,4 @@ std::unique_ptr<std::map<std::string, SpeakerOutputFilePaths>>
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_SIMULATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.cc
index 59ca867f254..773a42ebd75 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/timing.h"
+#include "modules/audio_processing/test/conversational_speech/timing.h"
#include <fstream>
#include <iostream>
-#include "webrtc/rtc_base/stringencode.h"
+#include "rtc_base/stringencode.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.h
index 43a533cd0c3..dc433618150 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/timing.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
#include <string>
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
+#include "api/array_view.h"
namespace webrtc {
namespace test {
@@ -43,4 +43,4 @@ void SaveTiming(const std::string& timing_filepath,
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h
index b48245b1ba0..83fda0d45cf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
namespace webrtc {
namespace test {
@@ -31,4 +31,4 @@ class WavReaderAbstractFactory {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ABSTRACT_FACTORY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.cc b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.cc
index 85ab76d071c..8342d3fed83 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_factory.h"
#include <cstddef>
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/typedefs.h"
+#include "api/array_view.h"
+#include "common_audio/wav_file.h"
+#include "rtc_base/checks.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h
index 5c46af025ab..e168d0d71fa 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
#include <memory>
#include <string>
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
-#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
+#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
namespace webrtc {
namespace test {
@@ -33,4 +33,4 @@ class WavReaderFactory : public WavReaderAbstractFactory {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_FACTORY_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h
index 1d1459f28b2..3aea273ad26 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
+#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
#include <stddef.h>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/typedefs.h"
+#include "api/array_view.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
namespace test {
@@ -38,4 +38,4 @@ class WavReaderInterface {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_INTERFACE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.cc b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.cc
index b88692cee35..a3c4d63f235 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/debug_dump_replayer.h"
+#include "modules/audio_processing/test/debug_dump_replayer.h"
-#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/test/protobuf_utils.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.h b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.h
index 9ee4a6349e3..4cd961dd7f8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_replayer.h
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
+#define MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
#include <memory>
#include <string>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/ignore_wundef.h"
RTC_PUSH_IGNORING_WUNDEF()
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
RTC_POP_IGNORING_WUNDEF()
namespace webrtc {
@@ -74,4 +74,4 @@ class DebugDumpReplayer {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_DEBUG_DUMP_REPLAYER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_test.cc b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_test.cc
index acaadf391e9..c31f3a471a5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_test.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/debug_dump_test.cc
@@ -14,13 +14,13 @@
#include <string>
#include <vector>
-#include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
-#include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h"
-#include "webrtc/modules/audio_processing/test/debug_dump_replayer.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/task_queue.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_coding/neteq/tools/resample_input_audio_file.h"
+#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
+#include "modules/audio_processing/test/debug_dump_replayer.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/task_queue.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
namespace test {
@@ -40,10 +40,10 @@ void MaybeResetBuffer(std::unique_ptr<ChannelBuffer<float>>* buffer,
class DebugDumpGenerator {
public:
DebugDumpGenerator(const std::string& input_file_name,
- int input_file_rate_hz,
+ int input_rate_hz,
int input_channels,
const std::string& reverse_file_name,
- int reverse_file_rate_hz,
+ int reverse_rate_hz,
int reverse_channels,
const Config& config,
const std::string& dump_file_name);
@@ -244,7 +244,7 @@ class DebugDumpTest : public ::testing::Test {
// VerifyDebugDump replays a debug dump using APM and verifies that the result
// is bit-exact-identical to the output channel in the dump. This is only
// guaranteed if the debug dump is started on the first frame.
- void VerifyDebugDump(const std::string& dump_file_name);
+ void VerifyDebugDump(const std::string& in_filename);
private:
DebugDumpReplayer debug_dump_replayer_;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.cc b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.cc
index 9593da45f0a..eba852d4b5f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
@@ -24,7 +24,7 @@ template <typename T>
void DelayBuffer<T>::Delay(rtc::ArrayView<const T> x,
rtc::ArrayView<T> x_delayed) {
RTC_DCHECK_EQ(x.size(), x_delayed.size());
- if (buffer_.size() == 0) {
+ if (buffer_.empty()) {
std::copy(x.begin(), x.end(), x_delayed.begin());
} else {
for (size_t k = 0; k < x.size(); ++k) {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.h b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.h
index 27f75acd770..1cb5b7e7627 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
#include <algorithm>
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/random.h"
+#include "api/array_view.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/random.h"
namespace webrtc {
@@ -41,4 +41,4 @@ class DelayBuffer {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_ECHO_CANCELLER_TEST_TOOLS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools_unittest.cc
index aaef88d58d6..4d5a4fb34b8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/echo_canceller_test_tools_unittest.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
+#include "modules/audio_processing/test/echo_canceller_test_tools.h"
#include <vector>
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/random.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/random.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.cc b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.cc
new file mode 100644
index 00000000000..bd6b644e90b
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.cc
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "modules/audio_processing/test/fake_recording_device.h"
+
+#include <algorithm>
+
+#include "rtc_base/logging.h"
+#include "rtc_base/ptr_util.h"
+
+namespace webrtc {
+namespace test {
+
+namespace {
+
+constexpr int16_t kInt16SampleMin = -32768;
+constexpr int16_t kInt16SampleMax = 32767;
+constexpr float kFloatSampleMin = -32768.f;
+constexpr float kFloatSampleMax = 32767.0f;
+
+} // namespace
+
+// Abstract class for the different fake recording devices.
+class FakeRecordingDeviceWorker {
+ public:
+ explicit FakeRecordingDeviceWorker(const int initial_mic_level)
+ : mic_level_(initial_mic_level) {}
+ int mic_level() const { return mic_level_; }
+ void set_mic_level(const int level) { mic_level_ = level; }
+ void set_undo_mic_level(const int level) {
+ undo_mic_level_ = rtc::Optional<int>(level);
+ }
+ virtual ~FakeRecordingDeviceWorker() = default;
+ virtual void ModifyBufferInt16(AudioFrame* buffer) = 0;
+ virtual void ModifyBufferFloat(ChannelBuffer<float>* buffer) = 0;
+
+ protected:
+ // Mic level to simulate.
+ int mic_level_;
+ // Optional mic level to undo.
+ rtc::Optional<int> undo_mic_level_;
+};
+
+namespace {
+
+// Identity fake recording device. The samples are not modified, which is
+// equivalent to a constant gain curve at 1.0 - only used for testing.
+class FakeRecordingDeviceIdentity final : public FakeRecordingDeviceWorker {
+ public:
+ explicit FakeRecordingDeviceIdentity(const int initial_mic_level)
+ : FakeRecordingDeviceWorker(initial_mic_level) {}
+ ~FakeRecordingDeviceIdentity() override = default;
+ void ModifyBufferInt16(AudioFrame* buffer) override {}
+ void ModifyBufferFloat(ChannelBuffer<float>* buffer) override {}
+};
+
+// Linear fake recording device. The gain curve is a linear function mapping the
+// mic levels range [0, 255] to [0.0, 1.0].
+class FakeRecordingDeviceLinear final : public FakeRecordingDeviceWorker {
+ public:
+ explicit FakeRecordingDeviceLinear(const int initial_mic_level)
+ : FakeRecordingDeviceWorker(initial_mic_level) {}
+ ~FakeRecordingDeviceLinear() override = default;
+ void ModifyBufferInt16(AudioFrame* buffer) override {
+ const size_t number_of_samples =
+ buffer->samples_per_channel_ * buffer->num_channels_;
+ int16_t* data = buffer->mutable_data();
+ // If an undo level is specified, virtually restore the unmodified
+ // microphone level; otherwise simulate the mic gain only.
+ const float divisor =
+ (undo_mic_level_ && *undo_mic_level_ > 0) ? *undo_mic_level_ : 255.f;
+ for (size_t i = 0; i < number_of_samples; ++i) {
+ data[i] =
+ std::max(kInt16SampleMin,
+ std::min(kInt16SampleMax,
+ static_cast<int16_t>(static_cast<float>(data[i]) *
+ mic_level_ / divisor)));
+ }
+ }
+ void ModifyBufferFloat(ChannelBuffer<float>* buffer) override {
+ // If an undo level is specified, virtually restore the unmodified
+ // microphone level; otherwise simulate the mic gain only.
+ const float divisor =
+ (undo_mic_level_ && *undo_mic_level_ > 0) ? *undo_mic_level_ : 255.f;
+ for (size_t c = 0; c < buffer->num_channels(); ++c) {
+ for (size_t i = 0; i < buffer->num_frames(); ++i) {
+ buffer->channels()[c][i] =
+ std::max(kFloatSampleMin,
+ std::min(kFloatSampleMax,
+ buffer->channels()[c][i] * mic_level_ / divisor));
+ }
+ }
+ }
+};
+
+} // namespace
+
+FakeRecordingDevice::FakeRecordingDevice(int initial_mic_level,
+ int device_kind) {
+ switch (device_kind) {
+ case 0:
+ worker_ = rtc::MakeUnique<FakeRecordingDeviceIdentity>(initial_mic_level);
+ break;
+ case 1:
+ worker_ = rtc::MakeUnique<FakeRecordingDeviceLinear>(initial_mic_level);
+ break;
+ default:
+ RTC_NOTREACHED();
+ break;
+ }
+}
+
+FakeRecordingDevice::~FakeRecordingDevice() = default;
+
+int FakeRecordingDevice::MicLevel() const {
+ RTC_CHECK(worker_);
+ return worker_->mic_level();
+}
+
+void FakeRecordingDevice::SetMicLevel(const int level) {
+ RTC_CHECK(worker_);
+ if (level != worker_->mic_level())
+ LOG(LS_INFO) << "Simulate mic level update: " << level;
+ worker_->set_mic_level(level);
+}
+
+void FakeRecordingDevice::SetUndoMicLevel(const int level) {
+ RTC_DCHECK(worker_);
+ // TODO(alessiob): The behavior with undo level equal to zero is not clear yet
+ // and will be defined in future CLs once more FakeRecordingDeviceWorker
+ // implementations need to be added.
+ RTC_CHECK(level > 0) << "Zero undo mic level is unsupported";
+ worker_->set_undo_mic_level(level);
+}
+
+void FakeRecordingDevice::SimulateAnalogGain(AudioFrame* buffer) {
+ RTC_DCHECK(worker_);
+ worker_->ModifyBufferInt16(buffer);
+}
+
+void FakeRecordingDevice::SimulateAnalogGain(ChannelBuffer<float>* buffer) {
+ RTC_DCHECK(worker_);
+ worker_->ModifyBufferFloat(buffer);
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.h b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.h
new file mode 100644
index 00000000000..b1e37a331d9
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef MODULES_AUDIO_PROCESSING_TEST_FAKE_RECORDING_DEVICE_H_
+#define MODULES_AUDIO_PROCESSING_TEST_FAKE_RECORDING_DEVICE_H_
+
+#include <algorithm>
+#include <memory>
+#include <vector>
+
+#include "api/array_view.h"
+#include "common_audio/channel_buffer.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
+
+namespace webrtc {
+namespace test {
+
+class FakeRecordingDeviceWorker;
+
+// Class for simulating a microphone with analog gain.
+//
+// The intended modes of operation are the following:
+//
+// FakeRecordingDevice fake_mic(255, 1);
+//
+// fake_mic.SetMicLevel(170);
+// fake_mic.SimulateAnalogGain(buffer);
+//
+// When the mic level to undo is known:
+//
+// fake_mic.SetMicLevel(170);
+// fake_mic.SetUndoMicLevel(30);
+// fake_mic.SimulateAnalogGain(buffer);
+//
+// The second option virtually restores the unmodified microphone level. Calling
+// SimulateAnalogGain() will first "undo" the gain applied by the real
+// microphone (e.g., 30).
+class FakeRecordingDevice final {
+ public:
+ FakeRecordingDevice(int initial_mic_level, int device_kind);
+ ~FakeRecordingDevice();
+
+ int MicLevel() const;
+ void SetMicLevel(const int level);
+ void SetUndoMicLevel(const int level);
+
+ // Simulates the analog gain.
+ // If |real_device_level| is a valid level, the unmodified mic signal is
+ // virtually restored. To skip the latter step set |real_device_level| to
+ // an empty value.
+ void SimulateAnalogGain(AudioFrame* buffer);
+
+ // Simulates the analog gain.
+ // If |real_device_level| is a valid level, the unmodified mic signal is
+ // virtually restored. To skip the latter step set |real_device_level| to
+ // an empty value.
+ void SimulateAnalogGain(ChannelBuffer<float>* buffer);
+
+ private:
+ // Fake recording device worker.
+ std::unique_ptr<FakeRecordingDeviceWorker> worker_;
+};
+
+} // namespace test
+} // namespace webrtc
+
+#endif // MODULES_AUDIO_PROCESSING_TEST_FAKE_RECORDING_DEVICE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc
new file mode 100644
index 00000000000..504459a3c64
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <cmath>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include "api/array_view.h"
+#include "modules/audio_processing/test/fake_recording_device.h"
+#include "rtc_base/ptr_util.h"
+#include "test/gtest.h"
+
+namespace webrtc {
+namespace test {
+namespace {
+
+constexpr int kInitialMicLevel = 100;
+
+// TODO(alessiob): Add new fake recording device kind values here as they are
+// added in FakeRecordingDevice::FakeRecordingDevice.
+const std::vector<int> kFakeRecDeviceKinds = {0, 1};
+
+const std::vector<std::vector<float>> kTestMultiChannelSamples{
+ std::vector<float>{-10.f, -1.f, -0.1f, 0.f, 0.1f, 1.f, 10.f}};
+
+// Writes samples into ChannelBuffer<float>.
+void WritesDataIntoChannelBuffer(const std::vector<std::vector<float>>& data,
+ ChannelBuffer<float>* buff) {
+ EXPECT_EQ(data.size(), buff->num_channels());
+ EXPECT_EQ(data[0].size(), buff->num_frames());
+ for (size_t c = 0; c < buff->num_channels(); ++c) {
+ for (size_t f = 0; f < buff->num_frames(); ++f) {
+ buff->channels()[c][f] = data[c][f];
+ }
+ }
+}
+
+std::unique_ptr<ChannelBuffer<float>> CreateChannelBufferWithData(
+ const std::vector<std::vector<float>>& data) {
+ auto buff =
+ rtc::MakeUnique<ChannelBuffer<float>>(data[0].size(), data.size());
+ WritesDataIntoChannelBuffer(data, buff.get());
+ return buff;
+}
+
+// Checks that the samples modified using monotonic level values are also
+// monotonic.
+void CheckIfMonotoneSamplesModules(const ChannelBuffer<float>* prev,
+ const ChannelBuffer<float>* curr) {
+ RTC_DCHECK_EQ(prev->num_channels(), curr->num_channels());
+ RTC_DCHECK_EQ(prev->num_frames(), curr->num_frames());
+ bool valid = true;
+ for (size_t i = 0; i < prev->num_channels(); ++i) {
+ for (size_t j = 0; j < prev->num_frames(); ++j) {
+ valid = std::fabs(prev->channels()[i][j]) <=
+ std::fabs(curr->channels()[i][j]);
+ if (!valid) {
+ break;
+ }
+ }
+ if (!valid) {
+ break;
+ }
+ }
+ EXPECT_TRUE(valid);
+}
+
+// Checks that the samples in each pair have the same sign unless the sample in
+// |dst| is zero (because of zero gain).
+void CheckSameSign(const ChannelBuffer<float>* src,
+ const ChannelBuffer<float>* dst) {
+ RTC_DCHECK_EQ(src->num_channels(), dst->num_channels());
+ RTC_DCHECK_EQ(src->num_frames(), dst->num_frames());
+ const auto fsgn = [](float x) { return ((x < 0) ? -1 : (x > 0) ? 1 : 0); };
+ bool valid = true;
+ for (size_t i = 0; i < src->num_channels(); ++i) {
+ for (size_t j = 0; j < src->num_frames(); ++j) {
+ valid = dst->channels()[i][j] == 0.0f ||
+ fsgn(src->channels()[i][j]) == fsgn(dst->channels()[i][j]);
+ if (!valid) {
+ break;
+ }
+ }
+ if (!valid) {
+ break;
+ }
+ }
+ EXPECT_TRUE(valid);
+}
+
+std::string FakeRecordingDeviceKindToString(int fake_rec_device_kind) {
+ std::ostringstream ss;
+ ss << "fake recording device: " << fake_rec_device_kind;
+ return ss.str();
+}
+
+std::string AnalogLevelToString(int level) {
+ std::ostringstream ss;
+ ss << "analog level: " << level;
+ return ss.str();
+}
+
+} // namespace
+
+TEST(FakeRecordingDevice, CheckHelperFunctions) {
+ constexpr size_t kC = 0; // Channel index.
+ constexpr size_t kS = 1; // Sample index.
+
+ // Check read.
+ auto buff = CreateChannelBufferWithData(kTestMultiChannelSamples);
+ for (size_t c = 0; c < kTestMultiChannelSamples.size(); ++c) {
+ for (size_t s = 0; s < kTestMultiChannelSamples[0].size(); ++s) {
+ EXPECT_EQ(kTestMultiChannelSamples[c][s], buff->channels()[c][s]);
+ }
+ }
+
+ // Check write.
+ buff->channels()[kC][kS] = -5.0f;
+ RTC_DCHECK_NE(buff->channels()[kC][kS], kTestMultiChannelSamples[kC][kS]);
+
+ // Check reset.
+ WritesDataIntoChannelBuffer(kTestMultiChannelSamples, buff.get());
+ EXPECT_EQ(buff->channels()[kC][kS], kTestMultiChannelSamples[kC][kS]);
+}
+
+// Implicitly checks that changes to the mic and undo levels are visible to the
+// FakeRecordingDeviceWorker implementation are injected in FakeRecordingDevice.
+TEST(FakeRecordingDevice, TestWorkerAbstractClass) {
+ FakeRecordingDevice fake_recording_device(kInitialMicLevel, 1);
+
+ auto buff1 = CreateChannelBufferWithData(kTestMultiChannelSamples);
+ fake_recording_device.SetMicLevel(100);
+ fake_recording_device.SimulateAnalogGain(buff1.get());
+
+ auto buff2 = CreateChannelBufferWithData(kTestMultiChannelSamples);
+ fake_recording_device.SetMicLevel(200);
+ fake_recording_device.SimulateAnalogGain(buff2.get());
+
+ for (size_t c = 0; c < kTestMultiChannelSamples.size(); ++c) {
+ for (size_t s = 0; s < kTestMultiChannelSamples[0].size(); ++s) {
+ EXPECT_LE(std::abs(buff1->channels()[c][s]),
+ std::abs(buff2->channels()[c][s]));
+ }
+ }
+
+ auto buff3 = CreateChannelBufferWithData(kTestMultiChannelSamples);
+ fake_recording_device.SetMicLevel(200);
+ fake_recording_device.SetUndoMicLevel(100);
+ fake_recording_device.SimulateAnalogGain(buff3.get());
+
+ for (size_t c = 0; c < kTestMultiChannelSamples.size(); ++c) {
+ for (size_t s = 0; s < kTestMultiChannelSamples[0].size(); ++s) {
+ EXPECT_LE(std::abs(buff1->channels()[c][s]),
+ std::abs(buff3->channels()[c][s]));
+ EXPECT_LE(std::abs(buff2->channels()[c][s]),
+ std::abs(buff3->channels()[c][s]));
+ }
+ }
+}
+
+TEST(FakeRecordingDevice, GainCurveShouldBeMonotone) {
+ // Create input-output buffers.
+ auto buff_prev = CreateChannelBufferWithData(kTestMultiChannelSamples);
+ auto buff_curr = CreateChannelBufferWithData(kTestMultiChannelSamples);
+
+ // Test different mappings.
+ for (auto fake_rec_device_kind : kFakeRecDeviceKinds) {
+ SCOPED_TRACE(FakeRecordingDeviceKindToString(fake_rec_device_kind));
+ FakeRecordingDevice fake_recording_device(kInitialMicLevel,
+ fake_rec_device_kind);
+ // TODO(alessiob): The test below is designed for state-less recording
+ // devices. If, for instance, a device has memory, the test might need
+ // to be redesigned (e.g., re-initialize fake recording device).
+
+ // Apply lowest analog level.
+ WritesDataIntoChannelBuffer(kTestMultiChannelSamples, buff_prev.get());
+ fake_recording_device.SetMicLevel(0);
+ fake_recording_device.SimulateAnalogGain(buff_prev.get());
+
+ // Increment analog level to check monotonicity.
+ for (int i = 1; i <= 255; ++i) {
+ SCOPED_TRACE(AnalogLevelToString(i));
+ WritesDataIntoChannelBuffer(kTestMultiChannelSamples, buff_curr.get());
+ fake_recording_device.SetMicLevel(i);
+ fake_recording_device.SimulateAnalogGain(buff_curr.get());
+ CheckIfMonotoneSamplesModules(buff_prev.get(), buff_curr.get());
+
+ // Update prev.
+ buff_prev.swap(buff_curr);
+ }
+ }
+}
+
+TEST(FakeRecordingDevice, GainCurveShouldNotChangeSign) {
+ // Create view on original samples.
+ std::unique_ptr<const ChannelBuffer<float>> buff_orig =
+ CreateChannelBufferWithData(kTestMultiChannelSamples);
+
+ // Create output buffer.
+ auto buff = CreateChannelBufferWithData(kTestMultiChannelSamples);
+
+ // Test different mappings.
+ for (auto fake_rec_device_kind : kFakeRecDeviceKinds) {
+ SCOPED_TRACE(FakeRecordingDeviceKindToString(fake_rec_device_kind));
+ FakeRecordingDevice fake_recording_device(kInitialMicLevel,
+ fake_rec_device_kind);
+
+ // TODO(alessiob): The test below is designed for state-less recording
+ // devices. If, for instance, a device has memory, the test might need
+ // to be redesigned (e.g., re-initialize fake recording device).
+ for (int i = 0; i <= 255; ++i) {
+ SCOPED_TRACE(AnalogLevelToString(i));
+ WritesDataIntoChannelBuffer(kTestMultiChannelSamples, buff.get());
+ fake_recording_device.SetMicLevel(i);
+ fake_recording_device.SimulateAnalogGain(buff.get());
+ CheckSameSign(buff_orig.get(), buff.get());
+ }
+ }
+}
+
+} // namespace test
+} // namespace webrtc
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.cc b/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.cc
index 1e9c68ccb8f..c59aeed405a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/performance_timer.h"
+#include "modules/audio_processing/test/performance_timer.h"
#include <math.h>
#include <numeric>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.h b/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.h
index 3e75e3f5f5e..1c862dc78ef 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/performance_timer.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
+#define MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
#include <vector>
-#include "webrtc/rtc_base/optional.h"
-#include "webrtc/system_wrappers/include/clock.h"
+#include "api/optional.h"
+#include "system_wrappers/include/clock.h"
namespace webrtc {
namespace test {
@@ -44,4 +44,4 @@ class PerformanceTimer {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.cc b/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.cc
index cb8adf92ff2..3b623b915c8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/test/protobuf_utils.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.h b/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.h
index 13ae0cf674f..dded9b4ca76 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/protobuf_utils.h
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
#include <memory>
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/rtc_base/protobuf_utils.h"
+#include "rtc_base/ignore_wundef.h"
+#include "rtc_base/protobuf_utils.h"
RTC_PUSH_IGNORING_WUNDEF()
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
RTC_POP_IGNORING_WUNDEF()
namespace webrtc {
@@ -31,4 +31,4 @@ bool ReadMessageFromFile(FILE* file, MessageLite* msg);
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/BUILD.gn b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/BUILD.gn
index 5b75153ffe7..b627dbad415 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/BUILD.gn
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/BUILD.gn
@@ -22,8 +22,10 @@ copy("scripts") {
"README.md",
"apm_quality_assessment.py",
"apm_quality_assessment.sh",
+ "apm_quality_assessment_boxplot.py",
"apm_quality_assessment_export.py",
"apm_quality_assessment_gencfgs.py",
+ "apm_quality_assessment_optimize.py",
]
outputs = [
"$root_build_dir/py_quality_assessment/{{source_file_part}}",
@@ -33,7 +35,7 @@ copy("scripts") {
":lib",
":output",
"../..:audioproc_f",
- "../../../../../resources/audio_processing/test/py_quality_assessment:probing_signals",
+ "../../../../resources/audio_processing/test/py_quality_assessment:probing_signals",
]
}
@@ -53,6 +55,7 @@ copy("lib") {
sources = [
"quality_assessment/__init__.py",
"quality_assessment/audioproc_wrapper.py",
+ "quality_assessment/collect_data.py",
"quality_assessment/data_access.py",
"quality_assessment/echo_path_simulation.py",
"quality_assessment/echo_path_simulation_factory.py",
@@ -75,7 +78,7 @@ copy("lib") {
"$root_build_dir/py_quality_assessment/quality_assessment/{{source_file_part}}",
]
deps = [
- "../../../../../resources/audio_processing/test/py_quality_assessment:noise_tracks",
+ "../../../../resources/audio_processing/test/py_quality_assessment:noise_tracks",
]
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/README.md b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/README.md
index 981f31555a7..2c116e6be46 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/README.md
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/README.md
@@ -1,17 +1,16 @@
# APM Quality Assessment tool
-Python wrapper of `audioproc_f` with which quality assessment can be
-automatized. The tool allows to simulate different noise conditions, input
-signals, APM configurations and it computes different scores.
+Python wrapper of APM simulators (e.g., `audioproc_f`) with which quality
+assessment can be automatized. The tool allows to simulate different noise
+conditions, input signals, APM configurations and it computes different scores.
Once the scores are computed, the results can be easily exported to an HTML page
which allows to listen to the APM input and output signals and also the
reference one used for evaluation.
## Dependencies
-
- OS: Linux
- Python 2.7
- - Python libraries: numpy, scipy, pydub (0.17.0+), pandas (0.20.1+)
+ - Python libraries: enum34, numpy, scipy, pydub (0.17.0+), pandas (0.20.1+)
- It is recommended that a dedicated Python environment is used
- install `virtualenv`
- `$ sudo apt-get install python-virtualenv`
@@ -28,13 +27,16 @@ reference one used for evaluation.
- Input probing signals and noise tracks (you can make your own dataset - *1)
## Build
-
- Compile WebRTC
- Go to `out/Default/py_quality_assessment` and check that
`apm_quality_assessment.py` exists
-## First time setup
+## Unit tests
+ - Compile WebRTC
+ - Go to `out/Default/py_quality_assessment`
+ - Run `python -m unittest -p "*_unittest.py" discover`
+## First time setup
- Deploy PolqaOem64 and set the `POLQA_PATH` environment variable
- e.g., `$ export POLQA_PATH=/var/opt/PolqaOem64`
- Deploy the AIR Database and set the `AECHEN_IR_DATABASE_PATH` environment
@@ -49,11 +51,7 @@ reference one used for evaluation.
encoded in the 16 bit signed format (it is recommended that the tracks are
converted and exported with Audacity).
-(*2) Adapt `EnvironmentalNoiseTestDataGenerator._NOISE_TRACKS` accordingly in
-`out/Default/py_quality_assessment/quality_assessment/test_data_generation.py`.
-
## Usage (scores computation)
-
- Go to `out/Default/py_quality_assessment`
- Check the `apm_quality_assessment.sh` as an example script to parallelize the
experiments
@@ -63,7 +61,6 @@ converted and exported with Audacity).
scores
## Usage (export reports)
-
Showing all the results at once can be confusing. You therefore may want to
export separate reports. In this case, you can use the
`apm_quality_assessment_export.py` script as follows:
@@ -81,7 +78,7 @@ export separate reports. In this case, you can use the
For instance:
```
-$ ./apm_quality_assessment-export.py \
+$ ./apm_quality_assessment_export.py \
-o output/ \
-c "(^default$)|(.*AE.*)" \
-t \(white_noise\) \
@@ -89,8 +86,25 @@ $ ./apm_quality_assessment-export.py \
-f echo
```
-## Troubleshooting
+## Usage (boxplot)
+After generating stats, it can help to visualize how a score depends on a
+certain APM simulator parameter. The `apm_quality_assessment_boxplot.py` script
+helps with that, producing plots similar to [this
+one](https://matplotlib.org/mpl_examples/pylab_examples/boxplot_demo_06.png).
+Suppose some scores come from running the APM simulator `audioproc_f` with
+or without the intelligibility enhancer: `--ie=1` or `--ie=0`. Then two boxplots
+side by side can be generated with
+
+```
+$ ./apm_quality_assessment_boxplot.py \
+ -o /path/to/output
+ -v <score_name>
+ -n /path/to/dir/with/apm_configs
+ -z ie
+```
+
+## Troubleshooting
The input wav file must be:
- sampled at a sample rate that is a multiple of 100 (required by POLQA)
- in the 16 bit format (required by `audioproc_f`)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
index ee08ff7b7f7..cdb43d42768 100755
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
@@ -8,7 +8,7 @@
# be found in the AUTHORS file in the root of the source tree.
"""Perform APM module quality assessment on one or more input files using one or
- more audioproc_f configuration files and one or more test data generators.
+ more APM simulator configuration files and one or more test data generators.
Usage: apm_quality_assessment.py -i audio1.wav [audio2.wav ...]
-c cfg1.json [cfg2.json ...]
@@ -26,7 +26,10 @@ import quality_assessment.audioproc_wrapper as audioproc_wrapper
import quality_assessment.echo_path_simulation as echo_path_simulation
import quality_assessment.eval_scores as eval_scores
import quality_assessment.evaluation as evaluation
+import quality_assessment.eval_scores_factory as eval_scores_factory
import quality_assessment.test_data_generation as test_data_generation
+import quality_assessment.test_data_generation_factory as \
+ test_data_generation_factory
import quality_assessment.simulation as simulation
_ECHO_PATH_SIMULATOR_NAMES = (
@@ -47,12 +50,12 @@ def _InstanceArgumentsParser():
"""
parser = argparse.ArgumentParser(description=(
'Perform APM module quality assessment on one or more input files using '
- 'one or more audioproc_f configuration files and one or more '
+ 'one or more APM simulator configuration files and one or more '
'test data generators.'))
parser.add_argument('-c', '--config_files', nargs='+', required=False,
help=('path to the configuration files defining the '
- 'arguments with which the audioproc_f tool is '
+ 'arguments with which the APM simulator tool is '
'called'),
default=[_DEFAULT_CONFIG_FILE])
@@ -76,6 +79,12 @@ def _InstanceArgumentsParser():
choices=_TEST_DATA_GENERATORS_NAMES,
default=_TEST_DATA_GENERATORS_NAMES)
+ parser.add_argument('--additive_noise_tracks_path', required=False,
+ help='path to the wav files for the additive',
+ default=test_data_generation. \
+ AdditiveNoiseTestDataGenerator. \
+ DEFAULT_NOISE_TRACKS_PATH)
+
parser.add_argument('-e', '--eval_scores', nargs='+', required=False,
help='custom list of evaluation scores to use',
choices=_EVAL_SCORE_WORKER_NAMES,
@@ -93,29 +102,43 @@ def _InstanceArgumentsParser():
parser.add_argument('--air_db_path', required=True,
help='path to the Aechen IR database')
+ parser.add_argument('--apm_sim_path', required=False,
+ help='path to the APM simulator tool',
+ default=audioproc_wrapper. \
+ AudioProcWrapper. \
+ DEFAULT_APM_SIMULATOR_BIN_PATH)
+
return parser
-def main():
- # TODO(alessiob): level = logging.INFO once debugged.
- logging.basicConfig(level=logging.DEBUG)
-
- parser = _InstanceArgumentsParser()
- args = parser.parse_args()
+def _ValidateArguments(args, parser):
if args.capture_input_files and args.render_input_files and (
len(args.capture_input_files) != len(args.render_input_files)):
parser.error('--render_input_files and --capture_input_files must be lists '
'having the same length')
sys.exit(1)
+
if args.render_input_files and not args.echo_path_simulator:
parser.error('when --render_input_files is set, --echo_path_simulator is '
'also required')
sys.exit(1)
+
+def main():
+ # TODO(alessiob): level = logging.INFO once debugged.
+ logging.basicConfig(level=logging.DEBUG)
+ parser = _InstanceArgumentsParser()
+ args = parser.parse_args()
+ _ValidateArguments(args, parser)
+
simulator = simulation.ApmModuleSimulator(
- aechen_ir_database_path=args.air_db_path,
- polqa_tool_bin_path=os.path.join(args.polqa_path, _POLQA_BIN_NAME),
- ap_wrapper=audioproc_wrapper.AudioProcWrapper(),
+ test_data_generator_factory=(
+ test_data_generation_factory.TestDataGeneratorFactory(
+ aechen_ir_database_path=args.air_db_path,
+ noise_tracks_path=args.additive_noise_tracks_path)),
+ evaluation_score_factory=eval_scores_factory.EvaluationScoreWorkerFactory(
+ polqa_tool_bin_path=os.path.join(args.polqa_path, _POLQA_BIN_NAME)),
+ ap_wrapper=audioproc_wrapper.AudioProcWrapper(args.apm_sim_path),
evaluator=evaluation.ApmModuleEvaluator())
simulator.Run(
config_filepaths=args.config_files,
@@ -125,7 +148,6 @@ def main():
test_data_generator_names=args.test_data_generators,
eval_score_names=args.eval_scores,
output_dir=args.output_dir)
-
sys.exit(0)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_boxplot.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_boxplot.py
new file mode 100644
index 00000000000..ec87970d754
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_boxplot.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+"""Shows boxplots of given score for different values of selected
+parameters. Can be used to compare scores by audioproc_f flag.
+
+Usage: apm_quality_assessment_boxplot.py -o /path/to/output
+ -v polqa
+ -n /path/to/dir/with/apm_configs
+ -z audioproc_f_arg1 [arg2 ...]
+
+Arguments --config_names, --render_names, --echo_simulator_names,
+--test_data_generators, --eval_scores can be used to filter the data
+used for plotting.
+"""
+
+import collections
+import logging
+import matplotlib.pyplot as plt
+import os
+
+import quality_assessment.data_access as data_access
+import quality_assessment.collect_data as collect_data
+
+
+def InstanceArgumentsParser():
+ """Arguments parser factory.
+ """
+ parser = collect_data.InstanceArgumentsParser()
+ parser.description = (
+ 'Shows boxplot of given score for different values of selected'
+ 'parameters. Can be used to compare scores by audioproc_f flag')
+
+ parser.add_argument('-v', '--eval_score', required=True,
+ help=('Score name for constructing boxplots'))
+
+ parser.add_argument('-n', '--config_dir', required=False,
+ help=('path to the folder with the configuration files'),
+ default='apm_configs')
+
+ parser.add_argument('-z', '--params_to_plot', required=True,
+ nargs='+', help=('audioproc_f parameter values'
+ 'by which to group scores (no leading dash)'))
+
+ return parser
+
+
+def FilterScoresByParams(data_frame, filter_params, score_name, config_dir):
+ """Filters data on the values of one or more parameters.
+
+ Args:
+ data_frame: pandas.DataFrame of all used input data.
+
+ filter_params: each config of the input data is assumed to have
+ exactly one parameter from `filter_params` defined. Every value
+ of the parameters in `filter_params` is a key in the returned
+ dict; the associated value is all cells of the data with that
+ value of the parameter.
+
+ score_name: Name of score which value is boxplotted. Currently cannot do
+ more than one value.
+
+ config_dir: path to dir with APM configs.
+
+ Returns: dictionary, key is a param value, result is all scores for
+ that param value (see `filter_params` for explanation).
+ """
+ results = collections.defaultdict(dict)
+ config_names = data_frame['apm_config'].drop_duplicates().values.tolist()
+
+ for config_name in config_names:
+ config_json = data_access.AudioProcConfigFile.Load(
+ os.path.join(config_dir, config_name + '.json'))
+ data_with_config = data_frame[data_frame.apm_config == config_name]
+ data_cell_scores = data_with_config[data_with_config.eval_score_name ==
+ score_name]
+
+ # Exactly one of |params_to_plot| must match:
+ (matching_param, ) = [x for x in filter_params if '-' + x in config_json]
+
+ # Add scores for every track to the result.
+ for capture_name in data_cell_scores.capture:
+ result_score = float(data_cell_scores[data_cell_scores.capture ==
+ capture_name].score)
+ config_dict = results[config_json['-' + matching_param]]
+ if capture_name not in config_dict:
+ config_dict[capture_name] = {}
+
+ config_dict[capture_name][matching_param] = result_score
+
+ return results
+
+
+def _FlattenToScoresList(config_param_score_dict):
+ """Extracts a list of scores from input data structure.
+
+ Args:
+ config_param_score_dict: of the form {'capture_name':
+ {'param_name' : score_value,.. } ..}
+
+ Returns: Plain list of all score value present in input data
+ structure
+ """
+ result = []
+ for capture_name in config_param_score_dict:
+ result += list(config_param_score_dict[capture_name].values())
+ return result
+
+
+def main():
+ # Init.
+ # TODO(alessiob): INFO once debugged.
+ logging.basicConfig(level=logging.DEBUG)
+ parser = InstanceArgumentsParser()
+ args = parser.parse_args()
+
+ # Get the scores.
+ src_path = collect_data.ConstructSrcPath(args)
+ logging.debug(src_path)
+ scores_data_frame = collect_data.FindScores(src_path, args)
+
+ # Filter the data by `args.params_to_plot`
+ scores_filtered = FilterScoresByParams(scores_data_frame,
+ args.params_to_plot,
+ args.eval_score,
+ args.config_dir)
+
+ data_list = sorted(scores_filtered.items())
+ data_values = [_FlattenToScoresList(x) for (_, x) in data_list]
+ data_labels = [x for (x, _) in data_list]
+
+ _, axes = plt.subplots(nrows=1, ncols=1, figsize=(6, 6))
+ axes.boxplot(data_values, labels=data_labels)
+ axes.set_ylabel(args.eval_score)
+ axes.set_xlabel('/'.join(args.params_to_plot))
+ plt.show()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_export.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_export.py
index 29618dcb6e0..5c8a52bf167 100755
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_export.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_export.py
@@ -11,142 +11,12 @@
HTML file.
"""
-import argparse
import logging
-import glob
import os
-import re
import sys
-try:
- import pandas as pd
-except ImportError:
- logging.critical('Cannot import the third-party Python package pandas')
- sys.exit(1)
-
-import quality_assessment.data_access as data_access
+import quality_assessment.collect_data as collect_data
import quality_assessment.export as export
-import quality_assessment.simulation as sim
-
-# Compiled regular expressions used to extract score descriptors.
-RE_CONFIG_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixApmConfig() + r'(.+)')
-RE_CAPTURE_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixCapture() + r'(.+)')
-RE_RENDER_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixRender() + r'(.+)')
-RE_ECHO_SIM_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixEchoSimulator() + r'(.+)')
-RE_TEST_DATA_GEN_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixTestDataGenerator() + r'(.+)')
-RE_TEST_DATA_GEN_PARAMS = re.compile(
- sim.ApmModuleSimulator.GetPrefixTestDataGeneratorParameters() + r'(.+)')
-RE_SCORE_NAME = re.compile(
- sim.ApmModuleSimulator.GetPrefixScore() + r'(.+)(\..+)')
-
-
-def _InstanceArgumentsParser():
- """Arguments parser factory.
- """
- parser = argparse.ArgumentParser(description=(
- 'Exports pre-computed APM module quality assessment results into HTML '
- 'tables.'))
-
- parser.add_argument('-o', '--output_dir', required=True,
- help=('the same base path used with the '
- 'apm_quality_assessment tool'))
-
- parser.add_argument('-f', '--filename_suffix',
- help=('suffix of the exported file'))
-
- parser.add_argument('-c', '--config_names', type=re.compile,
- help=('regular expression to filter the APM configuration'
- ' names'))
-
- parser.add_argument('-i', '--capture_names', type=re.compile,
- help=('regular expression to filter the capture signal '
- 'names'))
-
- parser.add_argument('-r', '--render_names', type=re.compile,
- help=('regular expression to filter the render signal '
- 'names'))
-
- parser.add_argument('-e', '--echo_simulator_names', type=re.compile,
- help=('regular expression to filter the echo simulator '
- 'names'))
-
- parser.add_argument('-t', '--test_data_generators', type=re.compile,
- help=('regular expression to filter the test data '
- 'generator names'))
-
- parser.add_argument('-s', '--eval_scores', type=re.compile,
- help=('regular expression to filter the evaluation score '
- 'names'))
-
- return parser
-
-
-def _GetScoreDescriptors(score_filepath):
- """Extracts a score descriptor from the given score file path.
-
- Args:
- score_filepath: path to the score file.
-
- Returns:
- A tuple of strings (APM configuration name, capture audio track name,
- render audio track name, echo simulator name, test data generator name,
- test data generator parameters as string, evaluation score name).
- """
- fields = score_filepath.split(os.sep)[-7:]
- extract_name = lambda index, reg_expr: (
- reg_expr.match(fields[index]).groups(0)[0])
- return (
- extract_name(0, RE_CONFIG_NAME),
- extract_name(1, RE_CAPTURE_NAME),
- extract_name(2, RE_RENDER_NAME),
- extract_name(3, RE_ECHO_SIM_NAME),
- extract_name(4, RE_TEST_DATA_GEN_NAME),
- extract_name(5, RE_TEST_DATA_GEN_PARAMS),
- extract_name(6, RE_SCORE_NAME),
- )
-
-
-def _ExcludeScore(config_name, capture_name, render_name, echo_simulator_name,
- test_data_gen_name, score_name, args):
- """Decides whether excluding a score.
-
- A set of optional regular expressions in args is used to determine if the
- score should be excluded (depending on its |*_name| descriptors).
-
- Args:
- config_name: APM configuration name.
- capture_name: capture audio track name.
- render_name: render audio track name.
- echo_simulator_name: echo simulator name.
- test_data_gen_name: test data generator name.
- score_name: evaluation score name.
- args: parsed arguments.
-
- Returns:
- A boolean.
- """
- value_regexpr_pairs = [
- (config_name, args.config_names),
- (capture_name, args.capture_names),
- (render_name, args.render_names),
- (echo_simulator_name, args.echo_simulator_names),
- (test_data_gen_name, args.test_data_generators),
- (score_name, args.eval_scores),
- ]
-
- # Score accepted if each value matches the corresponding regular expression.
- for value, regexpr in value_regexpr_pairs:
- if regexpr is None:
- continue
- if not regexpr.match(value):
- return True
-
- return False
def _BuildOutputFilename(filename_suffix):
@@ -162,111 +32,20 @@ def _BuildOutputFilename(filename_suffix):
return 'results.html'
return 'results-{}.html'.format(filename_suffix)
-
-def _FindScores(src_path, args):
- """Given a search path, find scores and return a DataFrame object.
-
- Args:
- src_path: Search path pattern.
- args: parsed arguments.
-
- Returns:
- A DataFrame object.
- """
- # Get scores.
- scores = []
- for score_filepath in glob.iglob(src_path):
- # Extract score descriptor fields from the path.
- (config_name,
- capture_name,
- render_name,
- echo_simulator_name,
- test_data_gen_name,
- test_data_gen_params,
- score_name) = _GetScoreDescriptors(score_filepath)
-
- # Ignore the score if required.
- if _ExcludeScore(
- config_name,
- capture_name,
- render_name,
- echo_simulator_name,
- test_data_gen_name,
- score_name,
- args):
- logging.info(
- 'ignored score: %s %s %s %s %s %s',
- config_name,
- capture_name,
- render_name,
- echo_simulator_name,
- test_data_gen_name,
- score_name)
- continue
-
- # Read metadata and score.
- metadata = data_access.Metadata.LoadAudioTestDataPaths(
- os.path.split(score_filepath)[0])
- score = data_access.ScoreFile.Load(score_filepath)
-
- # Add a score with its descriptor fields.
- scores.append((
- metadata['clean_capture_input_filepath'],
- metadata['echo_free_capture_filepath'],
- metadata['echo_filepath'],
- metadata['render_filepath'],
- metadata['capture_filepath'],
- metadata['apm_output_filepath'],
- metadata['apm_reference_filepath'],
- config_name,
- capture_name,
- render_name,
- echo_simulator_name,
- test_data_gen_name,
- test_data_gen_params,
- score_name,
- score,
- ))
-
- return pd.DataFrame(
- data=scores,
- columns=(
- 'clean_capture_input_filepath',
- 'echo_free_capture_filepath',
- 'echo_filepath',
- 'render_filepath',
- 'capture_filepath',
- 'apm_output_filepath',
- 'apm_reference_filepath',
- 'apm_config',
- 'capture',
- 'render',
- 'echo_simulator',
- 'test_data_gen',
- 'test_data_gen_params',
- 'eval_score_name',
- 'score',
- ))
-
-
def main():
# Init.
logging.basicConfig(level=logging.DEBUG) # TODO(alessio): INFO once debugged.
- parser = _InstanceArgumentsParser()
+ parser = collect_data.InstanceArgumentsParser()
+ parser.add_argument('-f', '--filename_suffix',
+ help=('suffix of the exported file'))
+ parser.description = ('Exports pre-computed APM module quality assessment '
+ 'results into HTML tables')
args = parser.parse_args()
# Get the scores.
- src_path = os.path.join(
- args.output_dir,
- sim.ApmModuleSimulator.GetPrefixApmConfig() + '*',
- sim.ApmModuleSimulator.GetPrefixCapture() + '*',
- sim.ApmModuleSimulator.GetPrefixRender() + '*',
- sim.ApmModuleSimulator.GetPrefixEchoSimulator() + '*',
- sim.ApmModuleSimulator.GetPrefixTestDataGenerator() + '*',
- sim.ApmModuleSimulator.GetPrefixTestDataGeneratorParameters() + '*',
- sim.ApmModuleSimulator.GetPrefixScore() + '*')
+ src_path = collect_data.ConstructSrcPath(args)
logging.debug(src_path)
- scores_data_frame = _FindScores(src_path, args)
+ scores_data_frame = collect_data.FindScores(src_path, args)
# Export.
output_filepath = os.path.join(args.output_dir, _BuildOutputFilename(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py
index d2764b06d1d..4017747cc28 100755
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py
@@ -8,7 +8,7 @@
# be found in the AUTHORS file in the root of the source tree.
"""Generate .json files with which the APM module can be tested using the
- apm_quality_assessment.py script.
+ apm_quality_assessment.py script and audioproc_f as APM simulator.
"""
import logging
@@ -26,8 +26,8 @@ def _GenerateDefaultOverridden(config_override):
writes a new APM configuration file.
The default settings are loaded via "-all_default".
- Check "src/webrtc/modules/audio_processing/test/audioproc_float.cc" and search
- for "if (FLAGS_all_default) {".
+ Check "src/modules/audio_processing/test/audioproc_float.cc" and search
+ for "if (FLAG_all_default) {".
For instance, in 55eb6d621489730084927868fed195d3645a9ec9 the default is this:
settings.use_aec = rtc::Optional<bool>(true);
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py
new file mode 100644
index 00000000000..7946fe2aeb4
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py
@@ -0,0 +1,179 @@
+#!/usr/bin/env python
+# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+"""Finds the APM configuration that maximizes a provided metric by
+parsing the output generated apm_quality_assessment.py.
+"""
+
+from __future__ import division
+
+import collections
+import logging
+import os
+
+import quality_assessment.data_access as data_access
+import quality_assessment.collect_data as collect_data
+
+def _InstanceArgumentsParser():
+ """Arguments parser factory. Extends the arguments from 'collect_data'
+ with a few extra for selecting what parameters to optimize for.
+ """
+ parser = collect_data.InstanceArgumentsParser()
+ parser.description = (
+ 'Rudimentary optimization of a function over different parameter'
+ 'combinations.')
+
+ parser.add_argument('-n', '--config_dir', required=False,
+ help=('path to the folder with the configuration files'),
+ default='apm_configs')
+
+ parser.add_argument('-p', '--params', required=True, nargs='+',
+ help=('parameters to parse from the config files in'
+ 'config_dir'))
+
+ parser.add_argument('-z', '--params_not_to_optimize', required=False,
+ nargs='+', default=[],
+ help=('parameters from `params` not to be optimized for'))
+
+ return parser
+
+
+def _ConfigurationAndScores(data_frame, params,
+ params_not_to_optimize, config_dir):
+ """Returns a list of all configurations and scores.
+
+ Args:
+ data_frame: A pandas data frame with the scores and config name
+ returned by _FindScores.
+ params: The parameter names to parse from configs the config
+ directory
+
+ params_not_to_optimize: The parameter names which shouldn't affect
+ the optimal parameter
+ selection. E.g., fixed settings and not
+ tunable parameters.
+
+ config_dir: Path to folder with config files.
+
+ Returns:
+ Dictionary of the form
+ {param_combination: [{params: {param1: value1, ...},
+ scores: {score1: value1, ...}}]}.
+
+ The key `param_combination` runs over all parameter combinations
+ of the parameters in `params` and not in
+ `params_not_to_optimize`. A corresponding value is a list of all
+ param combinations for params in `params_not_to_optimize` and
+ their scores.
+ """
+ results = collections.defaultdict(list)
+ config_names = data_frame['apm_config'].drop_duplicates().values.tolist()
+ score_names = data_frame['eval_score_name'].drop_duplicates().values.tolist()
+
+ # Normalize the scores
+ normalization_constants = {}
+ for score_name in score_names:
+ scores = data_frame[data_frame.eval_score_name == score_name].score
+ normalization_constants[score_name] = max(scores)
+
+ params_to_optimize = [p for p in params if p not in params_not_to_optimize]
+ param_combination = collections.namedtuple("ParamCombination",
+ params_to_optimize)
+
+ for config_name in config_names:
+ config_json = data_access.AudioProcConfigFile.Load(
+ os.path.join(config_dir, config_name + ".json"))
+ scores = {}
+ data_cell = data_frame[data_frame.apm_config == config_name]
+ for score_name in score_names:
+ data_cell_scores = data_cell[data_cell.eval_score_name ==
+ score_name].score
+ scores[score_name] = sum(data_cell_scores) / len(data_cell_scores)
+ scores[score_name] /= normalization_constants[score_name]
+
+ result = {'scores': scores, 'params': {}}
+ config_optimize_params = {}
+ for param in params:
+ if param in params_to_optimize:
+ config_optimize_params[param] = config_json['-' + param]
+ else:
+ result['params'][param] = config_json['-' + param]
+
+ current_param_combination = param_combination( # pylint: disable=star-args
+ **config_optimize_params)
+ results[current_param_combination].append(result)
+ return results
+
+
+def _FindOptimalParameter(configs_and_scores, score_weighting):
+ """Finds the config producing the maximal score.
+
+ Args:
+ configs_and_scores: structure of the form returned by
+ _ConfigurationAndScores
+
+ score_weighting: a function to weight together all score values of
+ the form [{params: {param1: value1, ...}, scores:
+ {score1: value1, ...}}] into a numeric
+ value
+ Returns:
+ the config that has the largest values of |score_weighting| applied
+ to its scores.
+ """
+
+ min_score = float('+inf')
+ best_params = None
+ for config in configs_and_scores:
+ scores_and_params = configs_and_scores[config]
+ current_score = score_weighting(scores_and_params)
+ if current_score < min_score:
+ min_score = current_score
+ best_params = config
+ logging.debug("Score: %f", current_score)
+ logging.debug("Config: %s", str(config))
+ return best_params
+
+
+def _ExampleWeighting(scores_and_configs):
+ """Example argument to `_FindOptimalParameter`
+ Args:
+ scores_and_configs: a list of configs and scores, in the form
+ described in _FindOptimalParameter
+ Returns:
+ numeric value, the sum of all scores
+ """
+ res = 0
+ for score_config in scores_and_configs:
+ res += sum(score_config['scores'].values())
+ return res
+
+
+def main():
+ # Init.
+ # TODO(alessiob): INFO once debugged.
+ logging.basicConfig(level=logging.DEBUG)
+ parser = _InstanceArgumentsParser()
+ args = parser.parse_args()
+
+ # Get the scores.
+ src_path = collect_data.ConstructSrcPath(args)
+ logging.debug('Src path <%s>', src_path)
+ scores_data_frame = collect_data.FindScores(src_path, args)
+ all_scores = _ConfigurationAndScores(scores_data_frame,
+ args.params,
+ args.params_not_to_optimize,
+ args.config_dir)
+
+ opt_param = _FindOptimalParameter(all_scores, _ExampleWeighting)
+
+ logging.info('Optimal parameter combination: <%s>', opt_param)
+ logging.info('It\'s score values: <%s>', all_scores[opt_param])
+
+if __name__ == "__main__":
+ main()
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/audioproc_wrapper.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/audioproc_wrapper.py
index d0dd51c34f2..399e3864dc5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/audioproc_wrapper.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/audioproc_wrapper.py
@@ -6,7 +6,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-"""Class implementing a wrapper for audioproc_f.
+"""Class implementing a wrapper for APM simulators.
"""
import cProfile
@@ -19,18 +19,24 @@ from . import exceptions
class AudioProcWrapper(object):
- """Wrapper for audioproc_f.
+ """Wrapper for APM simulators.
"""
- OUTPUT_FILENAME = 'output.wav'
- _AUDIOPROC_F_BIN_PATH = os.path.abspath(os.path.join(
+ DEFAULT_APM_SIMULATOR_BIN_PATH = os.path.abspath(os.path.join(
os.pardir, 'audioproc_f'))
+ OUTPUT_FILENAME = 'output.wav'
+
+ def __init__(self, simulator_bin_path):
+ """Ctor.
- def __init__(self):
+ Args:
+ simulator_bin_path: path to the APM simulator binary.
+ """
+ self._simulator_bin_path = simulator_bin_path
self._config = None
self._output_signal_filepath = None
- # Profiler instance to measure audioproc_f running time.
+ # Profiler instance to measure running time.
self._profiler = cProfile.Profile()
@property
@@ -39,11 +45,11 @@ class AudioProcWrapper(object):
def Run(self, config_filepath, capture_input_filepath, output_path,
render_input_filepath=None):
- """Run audioproc_f.
+ """Runs APM simulator.
Args:
- config_filepath: path to the configuration file specifing the arguments
- for audioproc_f.
+ config_filepath: path to the configuration file specifying the arguments
+ for the APM simulator.
capture_input_filepath: path to the capture audio track input file (aka
forward or near-end).
output_path: path of the audio track output file.
@@ -63,7 +69,7 @@ class AudioProcWrapper(object):
# Load configuration.
self._config = data_access.AudioProcConfigFile.Load(config_filepath)
- # Set remaining parametrs.
+ # Set remaining parameters.
if not os.path.exists(capture_input_filepath):
raise exceptions.FileNotFoundError('cannot find capture input file')
self._config['-i'] = capture_input_filepath
@@ -74,7 +80,7 @@ class AudioProcWrapper(object):
self._config['-ri'] = render_input_filepath
# Build arguments list.
- args = [self._AUDIOPROC_F_BIN_PATH]
+ args = [self._simulator_bin_path]
for param_name in self._config:
args.append(param_name)
if self._config[param_name] is not None:
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/collect_data.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/collect_data.py
new file mode 100644
index 00000000000..3147d051c50
--- /dev/null
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/collect_data.py
@@ -0,0 +1,241 @@
+# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+"""Imports a filtered subset of the scores and configurations computed
+by apm_quality_assessment.py into a pandas data frame.
+"""
+
+import argparse
+import glob
+import logging
+import os
+import re
+import sys
+
+try:
+ import pandas as pd
+except ImportError:
+ logging.critical('Cannot import the third-party Python package pandas')
+ sys.exit(1)
+
+from . import data_access as data_access
+from . import simulation as sim
+
+# Compiled regular expressions used to extract score descriptors.
+RE_CONFIG_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixApmConfig() + r'(.+)')
+RE_CAPTURE_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixCapture() + r'(.+)')
+RE_RENDER_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixRender() + r'(.+)')
+RE_ECHO_SIM_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixEchoSimulator() + r'(.+)')
+RE_TEST_DATA_GEN_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixTestDataGenerator() + r'(.+)')
+RE_TEST_DATA_GEN_PARAMS = re.compile(
+ sim.ApmModuleSimulator.GetPrefixTestDataGeneratorParameters() + r'(.+)')
+RE_SCORE_NAME = re.compile(
+ sim.ApmModuleSimulator.GetPrefixScore() + r'(.+)(\..+)')
+
+def InstanceArgumentsParser():
+ """Arguments parser factory.
+ """
+ parser = argparse.ArgumentParser(description=(
+ 'Override this description in a user script by changing'
+ ' `parser.description` of the returned parser.'))
+
+ parser.add_argument('-o', '--output_dir', required=True,
+ help=('the same base path used with the '
+ 'apm_quality_assessment tool'))
+
+ parser.add_argument('-c', '--config_names', type=re.compile,
+ help=('regular expression to filter the APM configuration'
+ ' names'))
+
+ parser.add_argument('-i', '--capture_names', type=re.compile,
+ help=('regular expression to filter the capture signal '
+ 'names'))
+
+ parser.add_argument('-r', '--render_names', type=re.compile,
+ help=('regular expression to filter the render signal '
+ 'names'))
+
+ parser.add_argument('-e', '--echo_simulator_names', type=re.compile,
+ help=('regular expression to filter the echo simulator '
+ 'names'))
+
+ parser.add_argument('-t', '--test_data_generators', type=re.compile,
+ help=('regular expression to filter the test data '
+ 'generator names'))
+
+ parser.add_argument('-s', '--eval_scores', type=re.compile,
+ help=('regular expression to filter the evaluation score '
+ 'names'))
+
+ return parser
+
+
+def _GetScoreDescriptors(score_filepath):
+ """Extracts a score descriptor from the given score file path.
+
+ Args:
+ score_filepath: path to the score file.
+
+ Returns:
+ A tuple of strings (APM configuration name, capture audio track name,
+ render audio track name, echo simulator name, test data generator name,
+ test data generator parameters as string, evaluation score name).
+ """
+ fields = score_filepath.split(os.sep)[-7:]
+ extract_name = lambda index, reg_expr: (
+ reg_expr.match(fields[index]).groups(0)[0])
+ return (
+ extract_name(0, RE_CONFIG_NAME),
+ extract_name(1, RE_CAPTURE_NAME),
+ extract_name(2, RE_RENDER_NAME),
+ extract_name(3, RE_ECHO_SIM_NAME),
+ extract_name(4, RE_TEST_DATA_GEN_NAME),
+ extract_name(5, RE_TEST_DATA_GEN_PARAMS),
+ extract_name(6, RE_SCORE_NAME),
+ )
+
+
+def _ExcludeScore(config_name, capture_name, render_name, echo_simulator_name,
+ test_data_gen_name, score_name, args):
+ """Decides whether excluding a score.
+
+ A set of optional regular expressions in args is used to determine if the
+ score should be excluded (depending on its |*_name| descriptors).
+
+ Args:
+ config_name: APM configuration name.
+ capture_name: capture audio track name.
+ render_name: render audio track name.
+ echo_simulator_name: echo simulator name.
+ test_data_gen_name: test data generator name.
+ score_name: evaluation score name.
+ args: parsed arguments.
+
+ Returns:
+ A boolean.
+ """
+ value_regexpr_pairs = [
+ (config_name, args.config_names),
+ (capture_name, args.capture_names),
+ (render_name, args.render_names),
+ (echo_simulator_name, args.echo_simulator_names),
+ (test_data_gen_name, args.test_data_generators),
+ (score_name, args.eval_scores),
+ ]
+
+ # Score accepted if each value matches the corresponding regular expression.
+ for value, regexpr in value_regexpr_pairs:
+ if regexpr is None:
+ continue
+ if not regexpr.match(value):
+ return True
+
+ return False
+
+
+def FindScores(src_path, args):
+ """Given a search path, find scores and return a DataFrame object.
+
+ Args:
+ src_path: Search path pattern.
+ args: parsed arguments.
+
+ Returns:
+ A DataFrame object.
+ """
+ # Get scores.
+ scores = []
+ for score_filepath in glob.iglob(src_path):
+ # Extract score descriptor fields from the path.
+ (config_name,
+ capture_name,
+ render_name,
+ echo_simulator_name,
+ test_data_gen_name,
+ test_data_gen_params,
+ score_name) = _GetScoreDescriptors(score_filepath)
+
+ # Ignore the score if required.
+ if _ExcludeScore(
+ config_name,
+ capture_name,
+ render_name,
+ echo_simulator_name,
+ test_data_gen_name,
+ score_name,
+ args):
+ logging.info(
+ 'ignored score: %s %s %s %s %s %s',
+ config_name,
+ capture_name,
+ render_name,
+ echo_simulator_name,
+ test_data_gen_name,
+ score_name)
+ continue
+
+ # Read metadata and score.
+ metadata = data_access.Metadata.LoadAudioTestDataPaths(
+ os.path.split(score_filepath)[0])
+ score = data_access.ScoreFile.Load(score_filepath)
+
+ # Add a score with its descriptor fields.
+ scores.append((
+ metadata['clean_capture_input_filepath'],
+ metadata['echo_free_capture_filepath'],
+ metadata['echo_filepath'],
+ metadata['render_filepath'],
+ metadata['capture_filepath'],
+ metadata['apm_output_filepath'],
+ metadata['apm_reference_filepath'],
+ config_name,
+ capture_name,
+ render_name,
+ echo_simulator_name,
+ test_data_gen_name,
+ test_data_gen_params,
+ score_name,
+ score,
+ ))
+
+ return pd.DataFrame(
+ data=scores,
+ columns=(
+ 'clean_capture_input_filepath',
+ 'echo_free_capture_filepath',
+ 'echo_filepath',
+ 'render_filepath',
+ 'capture_filepath',
+ 'apm_output_filepath',
+ 'apm_reference_filepath',
+ 'apm_config',
+ 'capture',
+ 'render',
+ 'echo_simulator',
+ 'test_data_gen',
+ 'test_data_gen_params',
+ 'eval_score_name',
+ 'score',
+ ))
+
+
+def ConstructSrcPath(args):
+ return os.path.join(
+ args.output_dir,
+ sim.ApmModuleSimulator.GetPrefixApmConfig() + '*',
+ sim.ApmModuleSimulator.GetPrefixCapture() + '*',
+ sim.ApmModuleSimulator.GetPrefixRender() + '*',
+ sim.ApmModuleSimulator.GetPrefixEchoSimulator() + '*',
+ sim.ApmModuleSimulator.GetPrefixTestDataGenerator() + '*',
+ sim.ApmModuleSimulator.GetPrefixTestDataGeneratorParameters() + '*',
+ sim.ApmModuleSimulator.GetPrefixScore() + '*')
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/data_access.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/data_access.py
index 826a0899abd..17aa7e2b673 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/data_access.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/data_access.py
@@ -31,9 +31,34 @@ class Metadata(object):
def __init__(self):
pass
+ _GENERIC_METADATA_SUFFIX = '.mdata'
_AUDIO_TEST_DATA_FILENAME = 'audio_test_data.json'
@classmethod
+ def LoadFileMetadata(cls, filepath):
+ """Loads generic metadata linked to a file.
+
+ Args:
+ filepath: path to the metadata file to read.
+
+ Returns:
+ A dict.
+ """
+ with open(filepath + cls._GENERIC_METADATA_SUFFIX) as f:
+ return json.load(f)
+
+ @classmethod
+ def SaveFileMetadata(cls, filepath, metadata):
+ """Saves generic metadata linked to a file.
+
+ Args:
+ filepath: path to the metadata file to write.
+ metadata: a dict.
+ """
+ with open(filepath + cls._GENERIC_METADATA_SUFFIX, 'w') as f:
+ json.dump(metadata, f)
+
+ @classmethod
def LoadAudioTestDataPaths(cls, metadata_path):
"""Loads the input and the reference audio track paths.
@@ -64,7 +89,7 @@ class Metadata(object):
class AudioProcConfigFile(object):
- """Data access to load/save audioproc_f argument lists.
+ """Data access to load/save APM simulator argument lists.
The arguments stored in the config files are used to control the APM flags.
"""
@@ -74,7 +99,7 @@ class AudioProcConfigFile(object):
@classmethod
def Load(cls, filepath):
- """Loads a configuration file for audioproc_f.
+ """Loads a configuration file for an APM simulator.
Args:
filepath: path to the configuration file.
@@ -87,7 +112,7 @@ class AudioProcConfigFile(object):
@classmethod
def Save(cls, filepath, config):
- """Saves a configuration file for audioproc_f.
+ """Saves a configuration file for an APM simulator.
Args:
filepath: path to the configuration file.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
index 78d0c18558f..420afd22438 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
@@ -14,6 +14,13 @@ import logging
import os
import re
import subprocess
+import sys
+
+try:
+ import numpy as np
+except ImportError:
+ logging.critical('Cannot import the third-party Python package numpy')
+ sys.exit(1)
from . import data_access
from . import exceptions
@@ -27,6 +34,7 @@ class EvaluationScore(object):
def __init__(self, score_filename_prefix):
self._score_filename_prefix = score_filename_prefix
+ self._input_signal_metadata = None
self._reference_signal = None
self._reference_signal_filepath = None
self._tested_signal = None
@@ -56,8 +64,16 @@ class EvaluationScore(object):
def score(self):
return self._score
+ def SetInputSignalMetadata(self, metadata):
+ """Sets input signal metadata.
+
+ Args:
+ metadata: dict instance.
+ """
+ self._input_signal_metadata = metadata
+
def SetReferenceSignalFilepath(self, filepath):
- """ Sets the path to the audio track used as reference signal.
+ """Sets the path to the audio track used as reference signal.
Args:
filepath: path to the reference audio track.
@@ -65,7 +81,7 @@ class EvaluationScore(object):
self._reference_signal_filepath = filepath
def SetTestedSignalFilepath(self, filepath):
- """ Sets the path to the audio track used as test signal.
+ """Sets the path to the audio track used as test signal.
Args:
filepath: path to the test audio track.
@@ -242,3 +258,84 @@ class PolqaScore(EvaluationScore):
# Build and return a dictionary with field names (header) as keys and the
# corresponding field values as values.
return {data[0][index]: data[1][index] for index in range(number_of_fields)}
+
+
+@EvaluationScore.RegisterClass
+class TotalHarmonicDistorsionScore(EvaluationScore):
+ """Total harmonic distorsion plus noise score.
+
+ Total harmonic distorsion plus noise score.
+ See "https://en.wikipedia.org/wiki/Total_harmonic_distortion#THD.2BN".
+
+ Unit: -.
+ Ideal: 0.
+ Worst case: +inf
+ """
+
+ NAME = 'thd'
+
+ def __init__(self, score_filename_prefix):
+ EvaluationScore.__init__(self, score_filename_prefix)
+ self._input_frequency = None
+
+ def _Run(self, output_path):
+ # TODO(aleloi): Integrate changes made locally.
+ self._CheckInputSignal()
+
+ self._LoadTestedSignal()
+ if self._tested_signal.channels != 1:
+ raise exceptions.EvaluationScoreException(
+ 'unsupported number of channels')
+ samples = signal_processing.SignalProcessingUtils.AudioSegmentToRawData(
+ self._tested_signal)
+
+ # Init.
+ num_samples = len(samples)
+ duration = len(self._tested_signal) / 1000.0
+ scaling = 2.0 / num_samples
+ max_freq = self._tested_signal.frame_rate / 2
+ f0_freq = float(self._input_frequency)
+ t = np.linspace(0, duration, num_samples)
+
+ # Analyze harmonics.
+ b_terms = []
+ n = 1
+ while f0_freq * n < max_freq:
+ x_n = np.sum(samples * np.sin(2.0 * np.pi * n * f0_freq * t)) * scaling
+ y_n = np.sum(samples * np.cos(2.0 * np.pi * n * f0_freq * t)) * scaling
+ b_terms.append(np.sqrt(x_n**2 + y_n**2))
+ n += 1
+
+ output_without_fundamental = samples - b_terms[0] * np.sin(
+ 2.0 * np.pi * f0_freq * t)
+ distortion_and_noise = np.sqrt(np.sum(
+ output_without_fundamental**2) * np.pi * scaling)
+
+ # TODO(alessiob): Fix or remove if not needed.
+ # thd = np.sqrt(np.sum(b_terms[1:]**2)) / b_terms[0]
+
+ # TODO(alessiob): Check the range of |thd_plus_noise| and update the class
+ # docstring above if accordingly.
+ thd_plus_noise = distortion_and_noise / b_terms[0]
+
+ self._score = thd_plus_noise
+ self._SaveScore()
+
+ def _CheckInputSignal(self):
+ # Check input signal and get properties.
+ try:
+ if self._input_signal_metadata['signal'] != 'pure_tone':
+ raise exceptions.EvaluationScoreException(
+ 'The THD score requires a pure tone as input signal')
+ self._input_frequency = self._input_signal_metadata['frequency']
+ if self._input_signal_metadata['test_data_gen_name'] != 'identity' or (
+ self._input_signal_metadata['test_data_gen_config'] != 'default'):
+ raise exceptions.EvaluationScoreException(
+ 'The THD score cannot be used with any test data generator other '
+ 'than "identity"')
+ except TypeError:
+ raise exceptions.EvaluationScoreException(
+ 'The THD score requires an input signal with associated metadata')
+ except KeyError:
+ raise exceptions.EvaluationScoreException(
+ 'Invalid input signal metadata to compute the THD score')
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_factory.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_factory.py
index c19e1f9ceff..c2ef317cc99 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_factory.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_factory.py
@@ -11,6 +11,7 @@
import logging
+from . import exceptions
from . import eval_scores
@@ -21,10 +22,13 @@ class EvaluationScoreWorkerFactory(object):
workers.
"""
- def __init__(self, score_filename_prefix, polqa_tool_bin_path):
- self._score_filename_prefix = score_filename_prefix
+ def __init__(self, polqa_tool_bin_path):
+ self._score_filename_prefix = None
self._polqa_tool_bin_path = polqa_tool_bin_path
+ def SetScoreFilenamePrefix(self, prefix):
+ self._score_filename_prefix = prefix
+
def GetInstance(self, evaluation_score_class):
"""Creates an EvaluationScore instance given a class object.
@@ -34,8 +38,12 @@ class EvaluationScoreWorkerFactory(object):
Returns:
An EvaluationScore instance.
"""
+ if self._score_filename_prefix is None:
+ raise exceptions.InitializationException(
+ 'The score file name prefix for evaluation score workers is not set')
logging.debug(
'factory producing a %s evaluation score', evaluation_score_class)
+
if evaluation_score_class == eval_scores.PolqaScore:
return eval_scores.PolqaScore(
self._score_filename_prefix, self._polqa_tool_bin_path)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py
index b3bd4f9a9e0..ddb5d0b07a3 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py
@@ -52,6 +52,9 @@ class TestEvalScores(unittest.TestCase):
shutil.rmtree(self._output_path)
def testRegisteredClasses(self):
+ # Evaluation score names to exclude (tested separately).
+ exceptions = ['thd']
+
# Preliminary check.
self.assertTrue(os.path.exists(self._output_path))
@@ -63,17 +66,20 @@ class TestEvalScores(unittest.TestCase):
# Instance evaluation score workers factory with fake dependencies.
eval_score_workers_factory = (
eval_scores_factory.EvaluationScoreWorkerFactory(
- score_filename_prefix='scores-',
polqa_tool_bin_path=os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'fake_polqa')))
+ eval_score_workers_factory.SetScoreFilenamePrefix('scores-')
# Try each registered evaluation score worker.
for eval_score_name in registered_classes:
+ if eval_score_name in exceptions:
+ continue
+
# Instance evaluation score worker.
eval_score_worker = eval_score_workers_factory.GetInstance(
registered_classes[eval_score_name])
- # Set reference and test, then run.
+ # Set fake input metadata and reference and test file paths, then run.
eval_score_worker.SetReferenceSignalFilepath(
self._fake_reference_signal_filepath)
eval_score_worker.SetTestedSignalFilepath(
@@ -83,3 +89,43 @@ class TestEvalScores(unittest.TestCase):
# Check output.
score = data_access.ScoreFile.Load(eval_score_worker.output_filepath)
self.assertTrue(isinstance(score, float))
+
+ def testTotalHarmonicDistorsionScore(self):
+ # Init.
+ pure_tone_freq = 5000.0
+ eval_score_worker = eval_scores.TotalHarmonicDistorsionScore('scores-')
+ eval_score_worker.SetInputSignalMetadata({
+ 'signal': 'pure_tone',
+ 'frequency': pure_tone_freq,
+ 'test_data_gen_name': 'identity',
+ 'test_data_gen_config': 'default',
+ })
+ template = pydub.AudioSegment.silent(duration=1000, frame_rate=48000)
+
+ # Create 3 test signals: pure tone, pure tone + white noise, white noise
+ # only.
+ pure_tone = signal_processing.SignalProcessingUtils.GeneratePureTone(
+ template, pure_tone_freq)
+ white_noise = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
+ template)
+ noisy_tone = signal_processing.SignalProcessingUtils.MixSignals(
+ pure_tone, white_noise)
+
+ # Compute scores for increasingly distorted pure tone signals.
+ scores = [None, None, None]
+ for index, tested_signal in enumerate([pure_tone, noisy_tone, white_noise]):
+ # Save signal.
+ tmp_filepath = os.path.join(self._output_path, 'tmp_thd.wav')
+ signal_processing.SignalProcessingUtils.SaveWav(
+ tmp_filepath, tested_signal)
+
+ # Compute score.
+ eval_score_worker.SetTestedSignalFilepath(tmp_filepath)
+ eval_score_worker.Run(self._output_path)
+ scores[index] = eval_score_worker.score
+
+ # Remove output file to avoid caching.
+ os.remove(eval_score_worker.output_filepath)
+
+ # Validate scores (lowest score with a pure tone).
+ self.assertTrue(all([scores[i + 1] > scores[i] for i in range(2)]))
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
index e18f193bb09..09ded4cbd5c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
@@ -20,14 +20,15 @@ class ApmModuleEvaluator(object):
pass
@classmethod
- def Run(cls, evaluation_score_workers, apm_output_filepath,
- reference_input_filepath, output_path):
+ def Run(cls, evaluation_score_workers, apm_input_metadata,
+ apm_output_filepath, reference_input_filepath, output_path):
"""Runs the evaluation.
Iterates over the given evaluation score workers.
Args:
evaluation_score_workers: list of EvaluationScore instances.
+ apm_input_metadata: dictionary with metadata of the APM input.
apm_output_filepath: path to the audio track file with the APM output.
reference_input_filepath: path to the reference audio track file.
output_path: output path.
@@ -40,6 +41,7 @@ class ApmModuleEvaluator(object):
for evaluation_score_worker in evaluation_score_workers:
logging.info(' computing <%s> score', evaluation_score_worker.NAME)
+ evaluation_score_worker.SetInputSignalMetadata(apm_input_metadata)
evaluation_score_worker.SetReferenceSignalFilepath(
reference_input_filepath)
evaluation_score_worker.SetTestedSignalFilepath(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py
index 0f7716a8c82..852e9e84688 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py
@@ -11,24 +11,36 @@
class FileNotFoundError(Exception):
- """File not found exeception.
+ """File not found exception.
"""
pass
class SignalProcessingException(Exception):
- """Signal processing exeception.
+ """Signal processing exception.
"""
pass
class InputMixerException(Exception):
- """Input mixer exeception.
+ """Input mixer exception.
"""
pass
class InputSignalCreatorException(Exception):
- """Input signal creator exeception.
+ """Input signal creator exception.
+ """
+ pass
+
+
+class EvaluationScoreException(Exception):
+ """Evaluation score exception.
+ """
+ pass
+
+
+class InitializationException(Exception):
+ """Initialization exception.
"""
pass
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py
index 720cb9b4cc9..b32dfc50663 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py
@@ -6,6 +6,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
+import functools
import hashlib
import os
import re
@@ -79,7 +80,8 @@ class HtmlExport(object):
def _BuildBody(self):
"""Builds the content of the <body> section."""
- score_names = self._scores_data_frame.eval_score_name.unique().tolist()
+ score_names = self._scores_data_frame['eval_score_name'].drop_duplicates(
+ ).values.tolist()
html = [
('<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header '
@@ -102,7 +104,7 @@ class HtmlExport(object):
html.append('</div>')
html.append('</header>')
- html.append('<main class="mdl-layout__content">')
+ html.append('<main class="mdl-layout__content" style="overflow-x: auto;">')
# Tabs content.
for tab_index, score_name in enumerate(score_names):
@@ -178,7 +180,7 @@ class HtmlExport(object):
score_name + test_data_gen + test_data_gen_params + apm_config)
if stats['count'] == 1:
# Show the only available score.
- item_id = hashlib.md5(items_id_prefix).hexdigest()
+ item_id = hashlib.md5(items_id_prefix.encode('utf-8')).hexdigest()
html.append('<div id="single-value-{0}">{1:f}</div>'.format(
item_id, scores['score'].mean()))
html.append('<div class="mdl-tooltip" data-mdl-for="single-value-{}">{}'
@@ -186,7 +188,8 @@ class HtmlExport(object):
else:
# Show stats.
for stat_name in ['min', 'max', 'mean', 'std dev']:
- item_id = hashlib.md5(items_id_prefix + stat_name).hexdigest()
+ item_id = hashlib.md5(
+ (items_id_prefix + stat_name).encode('utf-8')).hexdigest()
html.append('<div id="stats-{0}">{1:f}</div>'.format(
item_id, stats[stat_name]))
html.append('<div class="mdl-tooltip" data-mdl-for="stats-{}">{}'
@@ -289,7 +292,7 @@ class HtmlExport(object):
masks.append(self._scores_data_frame.test_data_gen == test_data_gen)
masks.append(
self._scores_data_frame.test_data_gen_params == test_data_gen_params)
- mask = reduce((lambda i1, i2: i1 & i2), masks)
+ mask = functools.reduce((lambda i1, i2: i1 & i2), masks)
del masks
return self._scores_data_frame[mask]
@@ -302,7 +305,7 @@ class HtmlExport(object):
masks.append(scores.capture == capture)
masks.append(scores.render == render)
masks.append(scores.echo_simulator == echo_simulator)
- mask = reduce((lambda i1, i2: i1 & i2), masks)
+ mask = functools.reduce((lambda i1, i2: i1 & i2), masks)
del masks
sliced_data = scores[mask]
@@ -333,7 +336,7 @@ class HtmlExport(object):
return 'score-stats-dialog-' + hashlib.md5(
'score-stats-inspector-{}-{}-{}-{}'.format(
score_name, apm_config, test_data_gen,
- test_data_gen_params)).hexdigest()
+ test_data_gen_params).encode('utf-8')).hexdigest()
@classmethod
def _Save(cls, output_filepath, html):
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/fake_polqa.cc b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/fake_polqa.cc
index 9345a87baad..62d8ebb84d9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/fake_polqa.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/fake_polqa.cc
@@ -11,7 +11,7 @@
#include <fstream>
#include <iostream>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_signal_creator.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_signal_creator.py
index e2a720c796f..5d97c3b2fc1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_signal_creator.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_signal_creator.py
@@ -18,26 +18,36 @@ class InputSignalCreator(object):
"""
@classmethod
- def Create(cls, name, params):
- """Creates a input signal.
+ def Create(cls, name, raw_params):
+ """Creates a input signal and its metadata.
Args:
name: Input signal creator name.
- params: Tuple of parameters to pass to the specific signal creator.
+ raw_params: Tuple of parameters to pass to the specific signal creator.
Returns:
- AudioSegment instance.
+ (AudioSegment, dict) tuple.
"""
try:
+ signal = {}
+ params = {}
+
if name == 'pure_tone':
- return cls._CreatePureTone(float(params[0]), int(params[1]))
+ params['frequency'] = float(raw_params[0])
+ params['duration'] = int(raw_params[1])
+ signal = cls._CreatePureTone(params['frequency'], params['duration'])
+ else:
+ raise exceptions.InputSignalCreatorException(
+ 'Invalid input signal creator name')
+
+ # Complete metadata.
+ params['signal'] = name
+
+ return signal, params
except (TypeError, AssertionError) as e:
raise exceptions.InputSignalCreatorException(
'Invalid signal creator parameters: {}'.format(e))
- raise exceptions.InputSignalCreatorException(
- 'Invalid input signal creator name')
-
@classmethod
def _CreatePureTone(cls, frequency, duration):
"""
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing.py
index 9a1f27978bb..5591a289c93 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing.py
@@ -10,6 +10,7 @@
"""
import array
+import enum
import logging
import os
import sys
@@ -29,6 +30,7 @@ except ImportError:
try:
import scipy.signal
+ import scipy.fftpack
except ImportError:
logging.critical('Cannot import the third-party Python package scipy')
sys.exit(1)
@@ -40,6 +42,12 @@ class SignalProcessingUtils(object):
"""Collection of signal processing utilities.
"""
+ @enum.unique
+ class MixPadding(enum.Enum):
+ NO_PADDING = 0
+ ZERO_PADDING = 1
+ LOOP = 2
+
def __init__(self):
pass
@@ -149,6 +157,21 @@ class SignalProcessingUtils(object):
volume=0.0)
@classmethod
+ def AudioSegmentToRawData(cls, signal):
+ samples = signal.get_array_of_samples()
+ if samples.typecode != 'h':
+ raise exceptions.SignalProcessingException('Unsupported samples type')
+ return np.array(signal.get_array_of_samples(), np.int16)
+
+ @classmethod
+ def Fft(cls, signal, normalize=True):
+ x = cls.AudioSegmentToRawData(signal).astype(np.float32)
+ if normalize:
+ x /= max(abs(np.max(x)), 1.0)
+ y = scipy.fftpack.fft(x)
+ return y[:len(y) / 2]
+
+ @classmethod
def DetectHardClipping(cls, signal, threshold=2):
"""Detects hard clipping.
@@ -169,13 +192,7 @@ class SignalProcessingUtils(object):
if signal.sample_width != 2: # Note that signal.sample_width is in bytes.
raise exceptions.SignalProcessingException(
'hard-clipping detection only supported for 16 bit samples')
-
- # Get raw samples, check type, cast.
- samples = signal.get_array_of_samples()
- if samples.typecode != 'h':
- raise exceptions.SignalProcessingException(
- 'hard-clipping detection only supported for 16 bit samples')
- samples = np.array(signal.get_array_of_samples(), np.int16)
+ samples = cls.AudioSegmentToRawData(signal)
# Detect adjacent clipped samples.
samples_type_info = np.iinfo(samples.dtype)
@@ -271,18 +288,24 @@ class SignalProcessingUtils(object):
})
@classmethod
- def MixSignals(cls, signal, noise, target_snr=0.0, bln_pad_shortest=False):
- """Mixes two signals with a target SNR.
+ def MixSignals(cls, signal, noise, target_snr=0.0,
+ pad_noise=MixPadding.NO_PADDING):
+ """Mixes |signal| and |noise| with a target SNR.
- Mix two signals with a desired SNR by scaling noise (noise).
+ Mix |signal| and |noise| with a desired SNR by scaling |noise|.
If the target SNR is +/- infinite, a copy of signal/noise is returned.
+ If |signal| is shorter than |noise|, the length of the mix equals that of
+ |signal|. Otherwise, the mix length depends on whether padding is applied.
+ When padding is not applied, that is |pad_noise| is set to NO_PADDING
+ (default), the mix length equals that of |noise| - i.e., |signal| is
+ truncated. Otherwise, |noise| is extended and the resulting mix has the same
+ length of |signal|.
Args:
signal: AudioSegment instance (signal).
noise: AudioSegment instance (noise).
target_snr: float, numpy.Inf or -numpy.Inf (dB).
- bln_pad_shortest: if True, it pads the shortest signal with silence at the
- end.
+ pad_noise: SignalProcessingUtils.MixPadding, default: NO_PADDING.
Returns:
An AudioSegment instance.
@@ -309,28 +332,23 @@ class SignalProcessingUtils(object):
raise exceptions.SignalProcessingException(
'cannot mix a signal with -Inf power')
- # Pad signal (if necessary). If noise is the shortest, the AudioSegment
- # overlay() method implictly pads noise. Hence, the only case to handle
- # is signal shorter than noise and bln_pad_shortest True.
- if bln_pad_shortest:
- signal_duration = len(signal)
- noise_duration = len(noise)
- logging.warning('mix signals with padding')
- logging.warning(' signal: %d ms', signal_duration)
- logging.warning(' noise: %d ms', noise_duration)
- padding_duration = noise_duration - signal_duration
- if padding_duration > 0: # That is signal_duration < noise_duration.
- logging.debug(' padding: %d ms', padding_duration)
- padding = pydub.AudioSegment.silent(
- duration=padding_duration,
- frame_rate=signal.frame_rate)
- logging.debug(' signal (pre): %d ms', len(signal))
- signal = signal + padding
- logging.debug(' signal (post): %d ms', len(signal))
-
- # Update power.
- signal_power = float(signal.dBFS)
-
- # Mix signals using the target SNR.
+ # Mix.
gain_db = signal_power - noise_power - target_snr
- return cls.Normalize(signal.overlay(noise.apply_gain(gain_db)))
+ signal_duration = len(signal)
+ noise_duration = len(noise)
+ if signal_duration <= noise_duration:
+ # Ignore |pad_noise|, |noise| is truncated if longer that |signal|, the
+ # mix will have the same length of |signal|.
+ return signal.overlay(noise.apply_gain(gain_db))
+ elif pad_noise == cls.MixPadding.NO_PADDING:
+ # |signal| is longer than |noise|, but no padding is applied to |noise|.
+ # Truncate |signal|.
+ return noise.overlay(signal, gain_during_overlay=gain_db)
+ elif pad_noise == cls.MixPadding.ZERO_PADDING:
+ # TODO(alessiob): Check that this works as expected.
+ return signal.overlay(noise.apply_gain(gain_db))
+ elif pad_noise == cls.MixPadding.LOOP:
+ # |signal| is longer than |noise|, extend |noise| by looping.
+ return signal.overlay(noise.apply_gain(gain_db), loop=True)
+ else:
+ raise exceptions.SignalProcessingException('invalid padding type')
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing_unittest.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing_unittest.py
index 3edd5387d5a..30ada41fb91 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing_unittest.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/signal_processing_unittest.py
@@ -75,3 +75,112 @@ class TestSignalProcessing(unittest.TestCase):
with self.assertRaises(exceptions.SignalProcessingException):
_ = signal_processing.SignalProcessingUtils.MixSignals(
silence, signal, 0.0)
+
+ def testMixSignalNoiseDifferentLengths(self):
+ # Test signals.
+ shorter = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
+ pydub.AudioSegment.silent(duration=1000, frame_rate=8000))
+ longer = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
+ pydub.AudioSegment.silent(duration=2000, frame_rate=8000))
+
+ # When the signal is shorter than the noise, the mix length always equals
+ # that of the signal regardless of whether padding is applied.
+ # No noise padding, length of signal less than that of noise.
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=shorter,
+ noise=longer,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.NO_PADDING)
+ self.assertEqual(len(shorter), len(mix))
+ # With noise padding, length of signal less than that of noise.
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=shorter,
+ noise=longer,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.ZERO_PADDING)
+ self.assertEqual(len(shorter), len(mix))
+
+ # When the signal is longer than the noise, the mix length depends on
+ # whether padding is applied.
+ # No noise padding, length of signal greater than that of noise.
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=longer,
+ noise=shorter,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.NO_PADDING)
+ self.assertEqual(len(shorter), len(mix))
+ # With noise padding, length of signal greater than that of noise.
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=longer,
+ noise=shorter,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.ZERO_PADDING)
+ self.assertEqual(len(longer), len(mix))
+
+ def testMixSignalNoisePaddingTypes(self):
+ # Test signals.
+ shorter = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
+ pydub.AudioSegment.silent(duration=1000, frame_rate=8000))
+ longer = signal_processing.SignalProcessingUtils.GeneratePureTone(
+ pydub.AudioSegment.silent(duration=2000, frame_rate=8000), 440.0)
+
+ # Zero padding: expect pure tone only in 1-2s.
+ mix_zero_pad = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=longer,
+ noise=shorter,
+ target_snr=-6,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.ZERO_PADDING)
+
+ # Loop: expect pure tone plus noise in 1-2s.
+ mix_loop = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=longer,
+ noise=shorter,
+ target_snr=-6,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.LOOP)
+
+ def Energy(signal):
+ samples = signal_processing.SignalProcessingUtils.AudioSegmentToRawData(
+ signal).astype(np.float32)
+ return np.sum(samples * samples)
+
+ e_mix_zero_pad = Energy(mix_zero_pad[-1000:])
+ e_mix_loop = Energy(mix_loop[-1000:])
+ self.assertLess(0, e_mix_zero_pad)
+ self.assertLess(e_mix_zero_pad, e_mix_loop)
+
+ def testMixSignalSnr(self):
+ # Test signals.
+ tone_low = signal_processing.SignalProcessingUtils.GeneratePureTone(
+ pydub.AudioSegment.silent(duration=64, frame_rate=8000), 250.0)
+ tone_high = signal_processing.SignalProcessingUtils.GeneratePureTone(
+ pydub.AudioSegment.silent(duration=64, frame_rate=8000), 3000.0)
+
+ def ToneAmplitudes(mix):
+ """Returns the amplitude of the coefficients #16 and #192, which
+ correspond to the tones at 250 and 3k Hz respectively."""
+ mix_fft = np.absolute(signal_processing.SignalProcessingUtils.Fft(mix))
+ return mix_fft[16], mix_fft[192]
+
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=tone_low,
+ noise=tone_high,
+ target_snr=-6)
+ ampl_low, ampl_high = ToneAmplitudes(mix)
+ self.assertLess(ampl_low, ampl_high)
+
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=tone_high,
+ noise=tone_low,
+ target_snr=-6)
+ ampl_low, ampl_high = ToneAmplitudes(mix)
+ self.assertLess(ampl_high, ampl_low)
+
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=tone_low,
+ noise=tone_high,
+ target_snr=6)
+ ampl_low, ampl_high = ToneAmplitudes(mix)
+ self.assertLess(ampl_high, ampl_low)
+
+ mix = signal_processing.SignalProcessingUtils.MixSignals(
+ signal=tone_high,
+ noise=tone_low,
+ target_snr=6)
+ ampl_low, ampl_high = ToneAmplitudes(mix)
+ self.assertLess(ampl_low, ampl_high)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation.py
index 7023b6a8c54..6545e0ec3f2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation.py
@@ -16,10 +16,9 @@ from . import data_access
from . import echo_path_simulation
from . import echo_path_simulation_factory
from . import eval_scores
-from . import eval_scores_factory
+from . import exceptions
from . import input_mixer
from . import test_data_generation
-from . import test_data_generation_factory
class ApmModuleSimulator(object):
@@ -38,21 +37,18 @@ class ApmModuleSimulator(object):
_PREFIX_TEST_DATA_GEN_PARAMS = 'datagen_params-'
_PREFIX_SCORE = 'score-'
- def __init__(self, aechen_ir_database_path, polqa_tool_bin_path,
+ def __init__(self, test_data_generator_factory, evaluation_score_factory,
ap_wrapper, evaluator):
- # Init.
+ self._test_data_generator_factory = test_data_generator_factory
+ self._evaluation_score_factory = evaluation_score_factory
self._audioproc_wrapper = ap_wrapper
self._evaluator = evaluator
- # Instance factory objects.
- self._test_data_generator_factory = (
- test_data_generation_factory.TestDataGeneratorFactory(
- output_directory_prefix=self._PREFIX_TEST_DATA_GEN_PARAMS,
- aechen_ir_database_path=aechen_ir_database_path))
- self._evaluation_score_factory = (
- eval_scores_factory.EvaluationScoreWorkerFactory(
- score_filename_prefix=self._PREFIX_SCORE,
- polqa_tool_bin_path=polqa_tool_bin_path))
+ # Init.
+ self._test_data_generator_factory.SetOutputDirectoryPrefix(
+ self._PREFIX_TEST_DATA_GEN_PARAMS)
+ self._evaluation_score_factory.SetScoreFilenamePrefix(
+ self._PREFIX_SCORE)
# Properties for each run.
self._base_output_path = None
@@ -248,9 +244,20 @@ class ApmModuleSimulator(object):
test_data_cache_path=test_data_cache_path,
base_output_path=output_path)
+ # Extract metadata linked to the clean input file (if any).
+ apm_input_metadata = None
+ try:
+ apm_input_metadata = data_access.Metadata.LoadFileMetadata(
+ clean_capture_input_filepath)
+ except IOError as e:
+ apm_input_metadata = {}
+ apm_input_metadata['test_data_gen_name'] = test_data_generators.NAME
+ apm_input_metadata['test_data_gen_config'] = None
+
# For each test data pair, simulate a call and evaluate.
for config_name in test_data_generators.config_names:
logging.info(' - test data generator config: <%s>', config_name)
+ apm_input_metadata['test_data_gen_config'] = config_name
# Paths to the test data generator output.
# Note that the reference signal does not depend on the render input
@@ -278,23 +285,28 @@ class ApmModuleSimulator(object):
render_input_filepath=render_input_filepath,
output_path=evaluation_output_path)
- # Evaluate.
- self._evaluator.Run(
- evaluation_score_workers=self._evaluation_score_workers,
- apm_output_filepath=self._audioproc_wrapper.output_filepath,
- reference_input_filepath=reference_signal_filepath,
- output_path=evaluation_output_path)
-
- # Save simulation metadata.
- data_access.Metadata.SaveAudioTestDataPaths(
- output_path=evaluation_output_path,
- clean_capture_input_filepath=clean_capture_input_filepath,
- echo_free_capture_filepath=noisy_capture_input_filepath,
- echo_filepath=echo_path_filepath,
- render_filepath=render_input_filepath,
- capture_filepath=apm_input_filepath,
- apm_output_filepath=self._audioproc_wrapper.output_filepath,
- apm_reference_filepath=reference_signal_filepath)
+ try:
+ # Evaluate.
+ self._evaluator.Run(
+ evaluation_score_workers=self._evaluation_score_workers,
+ apm_input_metadata=apm_input_metadata,
+ apm_output_filepath=self._audioproc_wrapper.output_filepath,
+ reference_input_filepath=reference_signal_filepath,
+ output_path=evaluation_output_path)
+
+ # Save simulation metadata.
+ data_access.Metadata.SaveAudioTestDataPaths(
+ output_path=evaluation_output_path,
+ clean_capture_input_filepath=clean_capture_input_filepath,
+ echo_free_capture_filepath=noisy_capture_input_filepath,
+ echo_filepath=echo_path_filepath,
+ render_filepath=render_input_filepath,
+ capture_filepath=apm_input_filepath,
+ apm_output_filepath=self._audioproc_wrapper.output_filepath,
+ apm_reference_filepath=reference_signal_filepath)
+ except exceptions.EvaluationScoreException as e:
+ logging.warning('the evaluation failed: %s', e.message)
+ continue
def _SetTestInputSignalFilePaths(self, capture_input_filepaths,
render_input_filepaths):
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation_unittest.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation_unittest.py
index 544ad97ffcd..521f006b6df 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation_unittest.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/simulation_unittest.py
@@ -9,6 +9,7 @@
"""Unit tests for the simulation module.
"""
+import logging
import os
import shutil
import sys
@@ -23,9 +24,11 @@ import mock
import pydub
from . import audioproc_wrapper
+from . import eval_scores_factory
from . import evaluation
from . import signal_processing
from . import simulation
+from . import test_data_generation_factory
class TestApmModuleSimulator(unittest.TestCase):
@@ -33,8 +36,9 @@ class TestApmModuleSimulator(unittest.TestCase):
"""
def setUp(self):
- """Create temporary folder and fake audio track."""
+ """Create temporary folders and fake audio track."""
self._output_path = tempfile.mkdtemp()
+ self._tmp_path = tempfile.mkdtemp()
silence = pydub.AudioSegment.silent(duration=1000, frame_rate=48000)
fake_signal = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
@@ -46,19 +50,29 @@ class TestApmModuleSimulator(unittest.TestCase):
def tearDown(self):
"""Recursively delete temporary folders."""
shutil.rmtree(self._output_path)
+ shutil.rmtree(self._tmp_path)
def testSimulation(self):
- # Instance dependencies to inject and mock.
- ap_wrapper = audioproc_wrapper.AudioProcWrapper()
+ # Instance dependencies to mock and inject.
+ ap_wrapper = audioproc_wrapper.AudioProcWrapper(
+ audioproc_wrapper.AudioProcWrapper.DEFAULT_APM_SIMULATOR_BIN_PATH)
evaluator = evaluation.ApmModuleEvaluator()
ap_wrapper.Run = mock.MagicMock(name='Run')
evaluator.Run = mock.MagicMock(name='Run')
+ # Instance non-mocked dependencies.
+ test_data_generator_factory = (
+ test_data_generation_factory.TestDataGeneratorFactory(
+ aechen_ir_database_path='',
+ noise_tracks_path=''))
+ evaluation_score_factory = eval_scores_factory.EvaluationScoreWorkerFactory(
+ polqa_tool_bin_path=os.path.join(
+ os.path.dirname(__file__), 'fake_polqa'))
+
# Instance simulator.
simulator = simulation.ApmModuleSimulator(
- aechen_ir_database_path='',
- polqa_tool_bin_path=os.path.join(
- os.path.dirname(__file__), 'fake_polqa'),
+ test_data_generator_factory=test_data_generator_factory,
+ evaluation_score_factory=evaluation_score_factory,
ap_wrapper=ap_wrapper,
evaluator=evaluator)
@@ -78,8 +92,8 @@ class TestApmModuleSimulator(unittest.TestCase):
# Check.
# TODO(alessiob): Once the TestDataGenerator classes can be configured by
- # the client code (e.g., number of SNR pairs for the white noise teste data
- # gnerator), the exact number of calls to ap_wrapper.Run and evaluator.Run
+ # the client code (e.g., number of SNR pairs for the white noise test data
+ # generator), the exact number of calls to ap_wrapper.Run and evaluator.Run
# is known; use that with assertEqual.
min_number_of_simulations = len(config_files) * len(input_files) * len(
test_data_generators)
@@ -87,3 +101,45 @@ class TestApmModuleSimulator(unittest.TestCase):
min_number_of_simulations)
self.assertGreaterEqual(len(evaluator.Run.call_args_list),
min_number_of_simulations)
+
+ def testPureToneGenerationWithTotalHarmonicDistorsion(self):
+ logging.warning = mock.MagicMock(name='warning')
+
+ # Instance simulator.
+ simulator = simulation.ApmModuleSimulator(
+ test_data_generator_factory=(
+ test_data_generation_factory.TestDataGeneratorFactory(
+ aechen_ir_database_path='',
+ noise_tracks_path='')),
+ evaluation_score_factory=(
+ eval_scores_factory.EvaluationScoreWorkerFactory(
+ polqa_tool_bin_path=os.path.join(
+ os.path.dirname(__file__), 'fake_polqa'))),
+ ap_wrapper=audioproc_wrapper.AudioProcWrapper(
+ audioproc_wrapper.AudioProcWrapper.DEFAULT_APM_SIMULATOR_BIN_PATH),
+ evaluator=evaluation.ApmModuleEvaluator())
+
+ # What to simulate.
+ config_files = ['apm_configs/default.json']
+ input_files = [os.path.join(self._tmp_path, 'pure_tone-440_1000.wav')]
+ eval_scores = ['thd']
+
+ # Should work.
+ simulator.Run(
+ config_filepaths=config_files,
+ capture_input_filepaths=input_files,
+ test_data_generator_names=['identity'],
+ eval_score_names=eval_scores,
+ output_dir=self._output_path)
+ self.assertFalse(logging.warning.called)
+
+ # Warning expected.
+ simulator.Run(
+ config_filepaths=config_files,
+ capture_input_filepaths=input_files,
+ test_data_generator_names=['white_noise'], # Not allowed with THD.
+ eval_score_names=eval_scores,
+ output_dir=self._output_path)
+ logging.warning.assert_called_with('the evaluation failed: %s', (
+ 'The THD score cannot be used with any test data generator other than '
+ '"identity"'))
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
index 3d54da5fc2a..bd0efb75128 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
@@ -147,11 +147,12 @@ class TestDataGenerator(object):
raise exceptions.InputSignalCreatorException(
'Cannot parse input signal file name')
- signal = input_signal_creator.InputSignalCreator.Create(
+ signal, metadata = input_signal_creator.InputSignalCreator.Create(
filename_parts[0], filename_parts[1].split('_'))
signal_processing.SignalProcessingUtils.SaveWav(
input_signal_filepath, signal)
+ data_access.Metadata.SaveFileMetadata(input_signal_filepath, metadata)
def _Generate(
self, input_signal_filepath, test_data_cache_path, base_output_path):
@@ -257,14 +258,10 @@ class WhiteNoiseTestDataGenerator(TestDataGenerator):
# Load the input signal.
input_signal = signal_processing.SignalProcessingUtils.LoadWav(
input_signal_filepath)
- input_signal = signal_processing.SignalProcessingUtils.Normalize(
- input_signal)
# Create the noise track.
noise_signal = signal_processing.SignalProcessingUtils.GenerateWhiteNoise(
input_signal)
- noise_signal = signal_processing.SignalProcessingUtils.Normalize(
- noise_signal)
# Create the noisy mixes (once for each unique SNR value).
noisy_mix_filepaths = {}
@@ -316,26 +313,20 @@ class NarrowBandNoiseTestDataGenerator(TestDataGenerator):
@TestDataGenerator.RegisterClass
-class EnvironmentalNoiseTestDataGenerator(TestDataGenerator):
- """Generator that adds environmental noise.
+class AdditiveNoiseTestDataGenerator(TestDataGenerator):
+ """Generator that adds noise loops.
- TODO(alessiob): Make the class more generic e.g.,
- MixNoiseTrackTestDataGenerator.
+ This generator uses all the wav files in a given path (default: noise_tracks/)
+ and mixes them to the clean speech with different target SNRs (hard-coded).
"""
- NAME = 'environmental_noise'
+ NAME = 'additive_noise'
_NOISY_SIGNAL_FILENAME_TEMPLATE = '{0}_{1:d}_SNR.wav'
- # TODO(alessiob): allow the user to store the noise tracks in a custom path.
- _NOISE_TRACKS_PATH = os.path.join(
+ DEFAULT_NOISE_TRACKS_PATH = os.path.join(
os.path.dirname(__file__), os.pardir, 'noise_tracks')
- # TODO(alessiob): Allow the user to have custom noise tracks.
- # TODO(alessiob): Exploit TestDataGeneratorFactory.GetInstance().
- _NOISE_TRACKS = [
- 'city.wav'
- ]
-
+ # TODO(alessiob): Make the list of SNR pairs customizable.
# Each pair indicates the clean vs. noisy and reference vs. noisy SNRs.
# The reference (second value of each pair) always has a lower amount of noise
# - i.e., the SNR is 10 dB higher.
@@ -346,8 +337,15 @@ class EnvironmentalNoiseTestDataGenerator(TestDataGenerator):
[0, 10], # Largest noise.
]
- def __init__(self, output_directory_prefix):
+ def __init__(self, output_directory_prefix, noise_tracks_path):
TestDataGenerator.__init__(self, output_directory_prefix)
+ self._noise_tracks_path = noise_tracks_path
+ self._noise_tracks_file_names = [n for n in os.listdir(
+ self._noise_tracks_path) if n.lower().endswith('.wav')]
+ if len(self._noise_tracks_file_names) == 0:
+ raise exceptions.InitializationException(
+ 'No wav files found in the noise tracks path %s' % (
+ self._noise_tracks_path))
def _Generate(
self, input_signal_filepath, test_data_cache_path, base_output_path):
@@ -364,23 +362,19 @@ class EnvironmentalNoiseTestDataGenerator(TestDataGenerator):
# Load the input signal.
input_signal = signal_processing.SignalProcessingUtils.LoadWav(
input_signal_filepath)
- input_signal = signal_processing.SignalProcessingUtils.Normalize(
- input_signal)
noisy_mix_filepaths = {}
- for noise_track_filename in self._NOISE_TRACKS:
+ for noise_track_filename in self._noise_tracks_file_names:
# Load the noise track.
noise_track_name, _ = os.path.splitext(noise_track_filename)
noise_track_filepath = os.path.join(
- self._NOISE_TRACKS_PATH, noise_track_filename)
+ self._noise_tracks_path, noise_track_filename)
if not os.path.exists(noise_track_filepath):
logging.error('cannot find the <%s> noise track', noise_track_filename)
raise exceptions.FileNotFoundError()
noise_signal = signal_processing.SignalProcessingUtils.LoadWav(
noise_track_filepath)
- noise_signal = signal_processing.SignalProcessingUtils.Normalize(
- noise_signal)
# Create the noisy mixes (once for each unique SNR value).
noisy_mix_filepaths[noise_track_name] = {}
@@ -393,7 +387,8 @@ class EnvironmentalNoiseTestDataGenerator(TestDataGenerator):
if not os.path.exists(noisy_signal_filepath):
# Create noisy signal.
noisy_signal = signal_processing.SignalProcessingUtils.MixSignals(
- input_signal, noise_signal, snr)
+ input_signal, noise_signal, snr,
+ pad_noise=signal_processing.SignalProcessingUtils.MixPadding.LOOP)
# Save.
signal_processing.SignalProcessingUtils.SaveWav(
@@ -488,7 +483,7 @@ class ReverberationTestDataGenerator(TestDataGenerator):
if not os.path.exists(noisy_signal_filepath):
# Create noisy signal.
noisy_signal = signal_processing.SignalProcessingUtils.MixSignals(
- input_signal, noise_signal, snr, bln_pad_shortest=True)
+ input_signal, noise_signal, snr)
# Save.
signal_processing.SignalProcessingUtils.SaveWav(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_factory.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_factory.py
index b42d3af273a..fd7f3f7c0ca 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_factory.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_factory.py
@@ -11,6 +11,7 @@
import logging
+from . import exceptions
from . import test_data_generation
@@ -21,9 +22,13 @@ class TestDataGeneratorFactory(object):
generators will be produced.
"""
- def __init__(self, output_directory_prefix, aechen_ir_database_path):
- self._output_directory_prefix = output_directory_prefix
+ def __init__(self, aechen_ir_database_path, noise_tracks_path):
+ self._output_directory_prefix = None
self._aechen_ir_database_path = aechen_ir_database_path
+ self._noise_tracks_path = noise_tracks_path
+
+ def SetOutputDirectoryPrefix(self, prefix):
+ self._output_directory_prefix = prefix
def GetInstance(self, test_data_generators_class):
"""Creates an TestDataGenerator instance given a class object.
@@ -35,10 +40,18 @@ class TestDataGeneratorFactory(object):
Returns:
TestDataGenerator instance.
"""
+ if self._output_directory_prefix is None:
+ raise exceptions.InitializationException(
+ 'The output directory prefix for test data generators is not set')
logging.debug('factory producing %s', test_data_generators_class)
+
if test_data_generators_class == (
test_data_generation.ReverberationTestDataGenerator):
return test_data_generation.ReverberationTestDataGenerator(
self._output_directory_prefix, self._aechen_ir_database_path)
+ elif test_data_generators_class == (
+ test_data_generation.AdditiveNoiseTestDataGenerator):
+ return test_data_generation.AdditiveNoiseTestDataGenerator(
+ self._output_directory_prefix, self._noise_tracks_path)
else:
return test_data_generators_class(self._output_directory_prefix)
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
index 6239d516b0f..73ea45d2a26 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
@@ -83,10 +83,12 @@ class TestTestDataGenerators(unittest.TestCase):
self.assertGreater(len(registered_classes), 0)
# Instance generators factory.
- generators_factory = (
- test_data_generation_factory.TestDataGeneratorFactory(
- output_directory_prefix='datagen-',
- aechen_ir_database_path=self._fake_air_db_path))
+ generators_factory = test_data_generation_factory.TestDataGeneratorFactory(
+ aechen_ir_database_path=self._fake_air_db_path,
+ noise_tracks_path=test_data_generation. \
+ AdditiveNoiseTestDataGenerator. \
+ DEFAULT_NOISE_TRACKS_PATH)
+ generators_factory.SetOutputDirectoryPrefix('datagen-')
# Use a sample input file as clean input signal.
input_signal_filepath = os.path.join(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.cc b/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.cc
index cecee71ac4d..90c6d5ea724 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/simulator_buffers.h"
+#include "modules/audio_processing/test/simulator_buffers.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.h b/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.h
index 5e6689751ad..36dcf301a20 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/simulator_buffers.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/random.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/random.h"
namespace webrtc {
namespace test {
@@ -63,4 +63,4 @@ struct SimulatorBuffers {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.cc b/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.cc
index 7c354d03487..42ba7ebb5af 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.cc
@@ -10,8 +10,8 @@
#include <utility>
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.h b/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.h
index e6c7259c477..57dc7b37972 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/test_utils.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
+#define MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#include <math.h>
#include <iterator>
@@ -18,11 +18,11 @@
#include <string>
#include <vector>
-#include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/wav_file.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "common_audio/channel_buffer.h"
+#include "common_audio/wav_file.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -155,4 +155,4 @@ std::vector<Point> ParseArrayGeometry(const std::string& mic_positions);
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/unpack.cc b/chromium/third_party/webrtc/modules/audio_processing/test/unpack.cc
index 4c6c18dc473..8e277065604 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/unpack.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/unpack.cc
@@ -17,15 +17,15 @@
#include <memory>
-#include "gflags/gflags.h"
-#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/format_macros.h"
-#include "webrtc/rtc_base/ignore_wundef.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/test/protobuf_utils.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/flags.h"
+#include "rtc_base/format_macros.h"
+#include "rtc_base/ignore_wundef.h"
+#include "typedefs.h" // NOLINT(build/include)
RTC_PUSH_IGNORING_WUNDEF()
-#include "webrtc/modules/audio_processing/debug.pb.h"
+#include "modules/audio_processing/debug.pb.h"
RTC_POP_IGNORING_WUNDEF()
// TODO(andrew): unpack more of the data.
@@ -45,6 +45,7 @@ DEFINE_bool(raw, false, "Write raw data instead of a WAV file.");
DEFINE_bool(text,
false,
"Write non-audio files as text files instead of binary files.");
+DEFINE_bool(help, false, "Print this message.");
#define PRINT_CONFIG(field_name) \
if (msg.has_##field_name()) { \
@@ -70,11 +71,14 @@ int do_main(int argc, char* argv[]) {
std::string program_name = argv[0];
std::string usage = "Commandline tool to unpack audioproc debug files.\n"
"Example usage:\n" + program_name + " debug_dump.pb\n";
- google::SetUsageMessage(usage);
- google::ParseCommandLineFlags(&argc, &argv, true);
- if (argc < 2) {
- printf("%s", google::ProgramUsage());
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
+ FLAG_help || argc < 2) {
+ printf("%s", usage.c_str());
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
return 1;
}
@@ -95,7 +99,7 @@ int do_main(int argc, char* argv[]) {
std::unique_ptr<RawFile> input_raw_file;
std::unique_ptr<RawFile> output_raw_file;
- FILE* settings_file = OpenFile(FLAGS_settings_file, "wb");
+ FILE* settings_file = OpenFile(FLAG_settings_file, "wb");
while (ReadMessageFromFile(debug_file, &event_msg)) {
if (event_msg.type() == Event::REVERSE_STREAM) {
@@ -106,8 +110,9 @@ int do_main(int argc, char* argv[]) {
const ReverseStream msg = event_msg.reverse_stream();
if (msg.has_data()) {
- if (FLAGS_raw && !reverse_raw_file) {
- reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".pcm"));
+ if (FLAG_raw && !reverse_raw_file) {
+ reverse_raw_file.reset(new RawFile(std::string(FLAG_reverse_file) +
+ ".pcm"));
}
// TODO(aluebs): Replace "num_reverse_channels *
// reverse_samples_per_channel" with "msg.data().size() /
@@ -118,8 +123,9 @@ int do_main(int argc, char* argv[]) {
reverse_wav_file.get(),
reverse_raw_file.get());
} else if (msg.channel_size() > 0) {
- if (FLAGS_raw && !reverse_raw_file) {
- reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".float"));
+ if (FLAG_raw && !reverse_raw_file) {
+ reverse_raw_file.reset(new RawFile(std::string(FLAG_reverse_file) +
+ ".float"));
}
std::unique_ptr<const float* []> data(
new const float* [num_reverse_channels]);
@@ -141,16 +147,18 @@ int do_main(int argc, char* argv[]) {
const Stream msg = event_msg.stream();
if (msg.has_input_data()) {
- if (FLAGS_raw && !input_raw_file) {
- input_raw_file.reset(new RawFile(FLAGS_input_file + ".pcm"));
+ if (FLAG_raw && !input_raw_file) {
+ input_raw_file.reset(new RawFile(std::string(FLAG_input_file) +
+ ".pcm"));
}
WriteIntData(reinterpret_cast<const int16_t*>(msg.input_data().data()),
num_input_channels * input_samples_per_channel,
input_wav_file.get(),
input_raw_file.get());
} else if (msg.input_channel_size() > 0) {
- if (FLAGS_raw && !input_raw_file) {
- input_raw_file.reset(new RawFile(FLAGS_input_file + ".float"));
+ if (FLAG_raw && !input_raw_file) {
+ input_raw_file.reset(new RawFile(std::string(FLAG_input_file) +
+ ".float"));
}
std::unique_ptr<const float* []> data(
new const float* [num_input_channels]);
@@ -165,16 +173,18 @@ int do_main(int argc, char* argv[]) {
}
if (msg.has_output_data()) {
- if (FLAGS_raw && !output_raw_file) {
- output_raw_file.reset(new RawFile(FLAGS_output_file + ".pcm"));
+ if (FLAG_raw && !output_raw_file) {
+ output_raw_file.reset(new RawFile(std::string(FLAG_output_file) +
+ ".pcm"));
}
WriteIntData(reinterpret_cast<const int16_t*>(msg.output_data().data()),
num_output_channels * output_samples_per_channel,
output_wav_file.get(),
output_raw_file.get());
} else if (msg.output_channel_size() > 0) {
- if (FLAGS_raw && !output_raw_file) {
- output_raw_file.reset(new RawFile(FLAGS_output_file + ".float"));
+ if (FLAG_raw && !output_raw_file) {
+ output_raw_file.reset(new RawFile(std::string(FLAG_output_file) +
+ ".float"));
}
std::unique_ptr<const float* []> data(
new const float* [num_output_channels]);
@@ -189,45 +199,45 @@ int do_main(int argc, char* argv[]) {
output_raw_file.get());
}
- if (FLAGS_full) {
+ if (FLAG_full) {
if (msg.has_delay()) {
- static FILE* delay_file = OpenFile(FLAGS_delay_file, "wb");
+ static FILE* delay_file = OpenFile(FLAG_delay_file, "wb");
int32_t delay = msg.delay();
- if (FLAGS_text) {
+ if (FLAG_text) {
fprintf(delay_file, "%d\n", delay);
} else {
- WriteData(&delay, sizeof(delay), delay_file, FLAGS_delay_file);
+ WriteData(&delay, sizeof(delay), delay_file, FLAG_delay_file);
}
}
if (msg.has_drift()) {
- static FILE* drift_file = OpenFile(FLAGS_drift_file, "wb");
+ static FILE* drift_file = OpenFile(FLAG_drift_file, "wb");
int32_t drift = msg.drift();
- if (FLAGS_text) {
+ if (FLAG_text) {
fprintf(drift_file, "%d\n", drift);
} else {
- WriteData(&drift, sizeof(drift), drift_file, FLAGS_drift_file);
+ WriteData(&drift, sizeof(drift), drift_file, FLAG_drift_file);
}
}
if (msg.has_level()) {
- static FILE* level_file = OpenFile(FLAGS_level_file, "wb");
+ static FILE* level_file = OpenFile(FLAG_level_file, "wb");
int32_t level = msg.level();
- if (FLAGS_text) {
+ if (FLAG_text) {
fprintf(level_file, "%d\n", level);
} else {
- WriteData(&level, sizeof(level), level_file, FLAGS_level_file);
+ WriteData(&level, sizeof(level), level_file, FLAG_level_file);
}
}
if (msg.has_keypress()) {
- static FILE* keypress_file = OpenFile(FLAGS_keypress_file, "wb");
+ static FILE* keypress_file = OpenFile(FLAG_keypress_file, "wb");
bool keypress = msg.keypress();
- if (FLAGS_text) {
+ if (FLAG_text) {
fprintf(keypress_file, "%d\n", keypress);
} else {
WriteData(&keypress, sizeof(keypress), keypress_file,
- FLAGS_keypress_file);
+ FLAG_keypress_file);
}
}
}
@@ -304,21 +314,21 @@ int do_main(int argc, char* argv[]) {
output_samples_per_channel =
static_cast<size_t>(output_sample_rate / 100);
- if (!FLAGS_raw) {
+ if (!FLAG_raw) {
// The WAV files need to be reset every time, because they cant change
// their sample rate or number of channels.
std::stringstream reverse_name;
- reverse_name << FLAGS_reverse_file << frame_count << ".wav";
+ reverse_name << FLAG_reverse_file << frame_count << ".wav";
reverse_wav_file.reset(new WavWriter(reverse_name.str(),
reverse_sample_rate,
num_reverse_channels));
std::stringstream input_name;
- input_name << FLAGS_input_file << frame_count << ".wav";
+ input_name << FLAG_input_file << frame_count << ".wav";
input_wav_file.reset(new WavWriter(input_name.str(),
input_sample_rate,
num_input_channels));
std::stringstream output_name;
- output_name << FLAGS_output_file << frame_count << ".wav";
+ output_name << FLAG_output_file << frame_count << ".wav";
output_wav_file.reset(new WavWriter(output_name.str(),
output_sample_rate,
num_output_channels));
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.cc b/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.cc
index 40253964b10..f53d1e5d8d9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.cc
@@ -8,14 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/wav_based_simulator.h"
+#include "modules/audio_processing/test/wav_based_simulator.h"
#include <stdio.h>
#include <iostream>
-#include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/test/testsupport/trace_to_stderr.h"
+#include "modules/audio_processing/test/test_utils.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
@@ -79,10 +78,6 @@ void WavBasedSimulator::PrepareProcessStreamCall() {
ap_->echo_cancellation()->set_stream_drift_samples(
settings_.stream_drift_samples ? *settings_.stream_drift_samples : 0);
-
- RTC_CHECK_EQ(AudioProcessing::kNoError,
- ap_->gain_control()->set_stream_analog_level(
- last_specified_microphone_level_));
}
void WavBasedSimulator::PrepareReverseProcessStreamCall() {
@@ -92,11 +87,6 @@ void WavBasedSimulator::PrepareReverseProcessStreamCall() {
}
void WavBasedSimulator::Process() {
- std::unique_ptr<test::TraceToStderr> trace_to_stderr;
- if (settings_.use_verbose_logging) {
- trace_to_stderr.reset(new test::TraceToStderr(true));
- }
-
if (settings_.custom_call_order_filename) {
call_chain_ = WavBasedSimulator::GetCustomEventChain(
*settings_.custom_call_order_filename);
@@ -110,8 +100,6 @@ void WavBasedSimulator::Process() {
bool samples_left_to_process = true;
int call_chain_index = 0;
int num_forward_chunks_processed = 0;
- const int kOneBykChunksPerSecond =
- 1.f / AudioProcessingSimulator::kChunksPerSecond;
while (samples_left_to_process) {
switch (call_chain_[call_chain_index]) {
case SimulationEventType::kProcessStream:
@@ -128,11 +116,6 @@ void WavBasedSimulator::Process() {
}
call_chain_index = (call_chain_index + 1) % call_chain_.size();
-
- if (trace_to_stderr) {
- trace_to_stderr->SetTimeSeconds(num_forward_chunks_processed *
- kOneBykChunksPerSecond);
- }
}
DestroyAudioProcessor();
@@ -143,10 +126,6 @@ bool WavBasedSimulator::HandleProcessStreamCall() {
if (samples_left_to_process) {
PrepareProcessStreamCall();
ProcessStream(settings_.fixed_interface);
- // Call stream analog level to ensure that any side-effects are triggered.
- (void)ap_->gain_control()->stream_analog_level();
- last_specified_microphone_level_ =
- ap_->gain_control()->stream_analog_level();
}
return samples_left_to_process;
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.h b/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.h
index 245367e237c..febcffb62c2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/test/wav_based_simulator.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
+#define MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
#include <vector>
-#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h"
+#include "modules/audio_processing/test/audio_processing_simulator.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace test {
@@ -45,7 +45,6 @@ class WavBasedSimulator final : public AudioProcessingSimulator {
const std::string& filename);
std::vector<SimulationEventType> call_chain_;
- int last_specified_microphone_level_ = 100;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WavBasedSimulator);
};
@@ -53,4 +52,4 @@ class WavBasedSimulator final : public AudioProcessingSimulator {
} // namespace test
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.cc b/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.cc
index 4c62e7ec83a..f5a319bc542 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.cc
@@ -33,11 +33,11 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
-#include "webrtc/modules/audio_processing/three_band_filter_bank.h"
+#include "modules/audio_processing/three_band_filter_bank.h"
#include <cmath>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.h b/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.h
index 24e7831d730..ccbf2ddf973 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/three_band_filter_bank.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
+#ifndef MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
+#define MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
#include <cstring>
#include <memory>
#include <vector>
-#include "webrtc/common_audio/sparse_fir_filter.h"
+#include "common_audio/sparse_fir_filter.h"
namespace webrtc {
@@ -66,4 +66,4 @@ class ThreeBandFilterBank final {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
+#endif // MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/click_annotate.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/click_annotate.cc
index b03a714c287..a8b4a307e14 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/click_annotate.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/click_annotate.cc
@@ -14,9 +14,9 @@
#include <memory>
#include <vector>
-#include "webrtc/modules/audio_processing/transient/transient_detector.h"
-#include "webrtc/modules/audio_processing/transient/file_utils.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
+#include "modules/audio_processing/transient/transient_detector.h"
+#include "modules/audio_processing/transient/file_utils.h"
+#include "system_wrappers/include/file_wrapper.h"
using webrtc::FileWrapper;
using webrtc::TransientDetector;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/common.h b/chromium/third_party/webrtc/modules/audio_processing/transient/common.h
index 92194e97e65..69546fc57b0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/common.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
namespace webrtc {
namespace ts {
@@ -24,4 +24,4 @@ enum {
} // namespace ts
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h b/chromium/third_party/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h
index b1236ac7328..4de24e0fcbb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h
@@ -10,8 +10,8 @@
// This header file defines the coefficients of the FIR based approximation of
// the Meyer Wavelet
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
// Decomposition coefficients Daubechies 8.
@@ -60,4 +60,4 @@ const float kDaubechies8LowPassCoefficients[kDaubechies8CoefficientsLength] = {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator.h b/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator.h
index c1046f22939..104f95d3afe 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
#include <cstdlib>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
// Provides a set of static methods to perform dyadic decimations.
@@ -67,4 +67,4 @@ static size_t DyadicDecimate(const T* in,
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_DYADIC_DECIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator_unittest.cc
index 7f5bb03e719..c407f47ffb8 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/dyadic_decimator_unittest.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
+#include "modules/audio_processing/transient/dyadic_decimator.h"
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.cc
index e69bf793536..7bf2e084f80 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/file_utils.h"
+#include "modules/audio_processing/transient/file_utils.h"
#include <memory>
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/typedefs.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.h b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.h
index cc76953215e..3f05c1dd523 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
#include <string.h>
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/typedefs.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -115,4 +115,4 @@ size_t WriteDoubleBufferToFile(FileWrapper* file,
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
index 2909ac397a5..c5e03990b5f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/file_utils.h"
+#include "modules/audio_processing/transient/file_utils.h"
#include <string.h>
#include <string>
#include <memory>
#include <vector>
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/typedefs.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.cc
index bca987feb77..46b16b82bc4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/moving_moments.h"
+#include "modules/audio_processing/transient/moving_moments.h"
#include <math.h>
#include <string.h>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.h b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.h
index 9e22a92fe08..f1b3e38cc0a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
#include <stddef.h>
@@ -49,4 +49,4 @@ class MovingMoments {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_MOVING_MOMENTS_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
index eb645eecfad..057bc454e07 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/moving_moments.h"
+#include "modules/audio_processing/transient/moving_moments.h"
#include <memory>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.cc
index 65fdc738eb5..1bb6f9f10a3 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/transient_detector.h"
+#include "modules/audio_processing/transient/transient_detector.h"
#include <float.h>
#include <math.h>
@@ -16,11 +16,11 @@
#include <algorithm>
-#include "webrtc/modules/audio_processing/transient/common.h"
-#include "webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
-#include "webrtc/modules/audio_processing/transient/moving_moments.h"
-#include "webrtc/modules/audio_processing/transient/wpd_tree.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/transient/common.h"
+#include "modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
+#include "modules/audio_processing/transient/moving_moments.h"
+#include "modules/audio_processing/transient/wpd_tree.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.h b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.h
index dbd2ba5d68f..3267b3a6cdc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
#include <deque>
#include <memory>
-#include "webrtc/modules/audio_processing/transient/moving_moments.h"
-#include "webrtc/modules/audio_processing/transient/wpd_tree.h"
+#include "modules/audio_processing/transient/moving_moments.h"
+#include "modules/audio_processing/transient/wpd_tree.h"
namespace webrtc {
@@ -84,4 +84,4 @@ class TransientDetector {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
index 7f9b74e4d79..96af179c428 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
@@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/transient_detector.h"
+#include "modules/audio_processing/transient/transient_detector.h"
#include <memory>
#include <sstream>
#include <string>
-#include "webrtc/modules/audio_processing/transient/common.h"
-#include "webrtc/modules/audio_processing/transient/file_utils.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/transient/common.h"
+#include "modules/audio_processing/transient/file_utils.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppression_test.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
index 2158a811589..3442ee0af6f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
@@ -8,21 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/transient_suppressor.h"
+#include "modules/audio_processing/transient/transient_suppressor.h"
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <memory>
#include <string>
-#include "gflags/gflags.h"
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/modules/audio_processing/agc/agc.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/include/audio_util.h"
+#include "modules/audio_processing/agc/agc.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/flags.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
+#include "typedefs.h" // NOLINT(build/include)
DEFINE_string(in_file_name, "", "PCM file that contains the signal.");
DEFINE_string(detection_file_name,
@@ -32,31 +33,20 @@ DEFINE_string(reference_file_name,
"",
"PCM file that contains the reference signal.");
-static bool ValidatePositiveInt(const char* flagname, int32_t value) {
- if (value <= 0) {
- printf("%s must be a positive integer.\n", flagname);
- return false;
- }
- return true;
-}
-DEFINE_int32(chunk_size_ms,
- 10,
- "Time between each chunk of samples in milliseconds.");
-static const bool chunk_size_ms_dummy =
- google::RegisterFlagValidator(&FLAGS_chunk_size_ms, &ValidatePositiveInt);
-
-DEFINE_int32(sample_rate_hz,
- 16000,
- "Sampling frequency of the signal in Hertz.");
-static const bool sample_rate_hz_dummy =
- google::RegisterFlagValidator(&FLAGS_sample_rate_hz, &ValidatePositiveInt);
-DEFINE_int32(detection_rate_hz,
- 0,
- "Sampling frequency of the detection signal in Hertz.");
-
-DEFINE_int32(num_channels, 1, "Number of channels.");
-static const bool num_channels_dummy =
- google::RegisterFlagValidator(&FLAGS_num_channels, &ValidatePositiveInt);
+DEFINE_int(chunk_size_ms,
+ 10,
+ "Time between each chunk of samples in milliseconds.");
+
+DEFINE_int(sample_rate_hz,
+ 16000,
+ "Sampling frequency of the signal in Hertz.");
+DEFINE_int(detection_rate_hz,
+ 0,
+ "Sampling frequency of the detection signal in Hertz.");
+
+DEFINE_int(num_channels, 1, "Number of channels.");
+
+DEFINE_bool(help, false, "Print this message.");
namespace webrtc {
@@ -146,19 +136,19 @@ static void WritePCM(FILE* f,
void void_main() {
// TODO(aluebs): Remove all FileWrappers.
// Prepare the input file.
- FILE* in_file = fopen(FLAGS_in_file_name.c_str(), "rb");
+ FILE* in_file = fopen(FLAG_in_file_name, "rb");
ASSERT_TRUE(in_file != NULL);
// Prepare the detection file.
FILE* detection_file = NULL;
- if (!FLAGS_detection_file_name.empty()) {
- detection_file = fopen(FLAGS_detection_file_name.c_str(), "rb");
+ if (strlen(FLAG_detection_file_name) > 0) {
+ detection_file = fopen(FLAG_detection_file_name, "rb");
}
// Prepare the reference file.
FILE* reference_file = NULL;
- if (!FLAGS_reference_file_name.empty()) {
- reference_file = fopen(FLAGS_reference_file_name.c_str(), "rb");
+ if (strlen(FLAG_reference_file_name) > 0) {
+ reference_file = fopen(FLAG_reference_file_name, "rb");
}
// Prepare the output file.
@@ -166,27 +156,27 @@ void void_main() {
FILE* out_file = fopen(out_file_name.c_str(), "wb");
ASSERT_TRUE(out_file != NULL);
- int detection_rate_hz = FLAGS_detection_rate_hz;
+ int detection_rate_hz = FLAG_detection_rate_hz;
if (detection_rate_hz == 0) {
- detection_rate_hz = FLAGS_sample_rate_hz;
+ detection_rate_hz = FLAG_sample_rate_hz;
}
Agc agc;
TransientSuppressor suppressor;
suppressor.Initialize(
- FLAGS_sample_rate_hz, detection_rate_hz, FLAGS_num_channels);
+ FLAG_sample_rate_hz, detection_rate_hz, FLAG_num_channels);
const size_t audio_buffer_size =
- FLAGS_chunk_size_ms * FLAGS_sample_rate_hz / 1000;
+ FLAG_chunk_size_ms * FLAG_sample_rate_hz / 1000;
const size_t detection_buffer_size =
- FLAGS_chunk_size_ms * detection_rate_hz / 1000;
+ FLAG_chunk_size_ms * detection_rate_hz / 1000;
// int16 and float variants of the same data.
std::unique_ptr<int16_t[]> audio_buffer_i(
- new int16_t[FLAGS_num_channels * audio_buffer_size]);
+ new int16_t[FLAG_num_channels * audio_buffer_size]);
std::unique_ptr<float[]> audio_buffer_f(
- new float[FLAGS_num_channels * audio_buffer_size]);
+ new float[FLAG_num_channels * audio_buffer_size]);
std::unique_ptr<float[]> detection_buffer, reference_buffer;
@@ -197,7 +187,7 @@ void void_main() {
while (ReadBuffers(in_file,
audio_buffer_size,
- FLAGS_num_channels,
+ FLAG_num_channels,
audio_buffer_i.get(),
detection_file,
detection_buffer_size,
@@ -207,17 +197,17 @@ void void_main() {
ASSERT_EQ(0,
agc.Process(audio_buffer_i.get(),
static_cast<int>(audio_buffer_size),
- FLAGS_sample_rate_hz))
+ FLAG_sample_rate_hz))
<< "The AGC could not process the frame";
- for (size_t i = 0; i < FLAGS_num_channels * audio_buffer_size; ++i) {
+ for (size_t i = 0; i < FLAG_num_channels * audio_buffer_size; ++i) {
audio_buffer_f[i] = audio_buffer_i[i];
}
ASSERT_EQ(0,
suppressor.Suppress(audio_buffer_f.get(),
audio_buffer_size,
- FLAGS_num_channels,
+ FLAG_num_channels,
detection_buffer.get(),
detection_buffer_size,
reference_buffer.get(),
@@ -228,7 +218,7 @@ void void_main() {
// Write result to out file.
WritePCM(
- out_file, audio_buffer_size, FLAGS_num_channels, audio_buffer_f.get());
+ out_file, audio_buffer_size, FLAG_num_channels, audio_buffer_f.get());
}
fclose(in_file);
@@ -244,8 +234,19 @@ void void_main() {
} // namespace webrtc
int main(int argc, char* argv[]) {
- google::SetUsageMessage(webrtc::kUsage);
- google::ParseCommandLineFlags(&argc, &argv, true);
+ if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
+ FLAG_help || argc != 1) {
+ printf("%s", webrtc::kUsage);
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
+ return 1;
+ }
+ RTC_CHECK_GT(FLAG_chunk_size_ms, 0);
+ RTC_CHECK_GT(FLAG_sample_rate_hz, 0);
+ RTC_CHECK_GT(FLAG_num_channels, 0);
+
webrtc::void_main();
return 0;
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.cc
index 1b05d265b66..3ac947a6dee 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/transient_suppressor.h"
+#include "modules/audio_processing/transient/transient_suppressor.h"
#include <math.h>
#include <string.h>
@@ -17,15 +17,15 @@
#include <deque>
#include <set>
-#include "webrtc/common_audio/fft4g.h"
-#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_processing/ns/windows_private.h"
-#include "webrtc/modules/audio_processing/transient/common.h"
-#include "webrtc/modules/audio_processing/transient/transient_detector.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/logging.h"
-#include "webrtc/typedefs.h"
+#include "common_audio/fft4g.h"
+#include "common_audio/include/audio_util.h"
+#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_processing/ns/windows_private.h"
+#include "modules/audio_processing/transient/common.h"
+#include "modules/audio_processing/transient/transient_detector.h"
+#include "rtc_base/checks.h"
+#include "rtc_base/logging.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.h b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.h
index 74decea7e2e..27b096c795c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor.h
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
#include <deque>
#include <memory>
#include <set>
-#include "webrtc/rtc_base/gtest_prod_util.h"
-#include "webrtc/typedefs.h"
+#include "rtc_base/gtest_prod_util.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -117,4 +117,4 @@ class TransientSuppressor {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor_unittest.cc
index ff0105512a7..32d9858c640 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/transient_suppressor_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/transient_suppressor.h"
+#include "modules/audio_processing/transient/transient_suppressor.h"
-#include "webrtc/modules/audio_processing/transient/common.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/transient/common.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.cc
index 88ad24d7405..630c9f3b8b4 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/wpd_node.h"
+#include "modules/audio_processing/transient/wpd_node.h"
#include <math.h>
#include <string.h>
-#include "webrtc/common_audio/fir_filter.h"
-#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
-#include "webrtc/rtc_base/checks.h"
+#include "common_audio/fir_filter.h"
+#include "modules/audio_processing/transient/dyadic_decimator.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.h b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.h
index 99521fd32e1..117a6338a02 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
#include <memory>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -44,4 +44,4 @@ class WPDNode {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
index 3a9cb759f21..19293610555 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/wpd_node.h"
+#include "modules/audio_processing/transient/wpd_node.h"
#include <string.h>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.cc
index 187a8cd0ff4..a01b816daf5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/wpd_tree.h"
+#include "modules/audio_processing/transient/wpd_tree.h"
#include <math.h>
#include <string.h>
-#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
-#include "webrtc/modules/audio_processing/transient/wpd_node.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/transient/dyadic_decimator.h"
+#include "modules/audio_processing/transient/wpd_node.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.h b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.h
index a64055e7dee..53fc06b294e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
+#ifndef MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
+#define MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
#include <memory>
-#include "webrtc/modules/audio_processing/transient/wpd_node.h"
+#include "modules/audio_processing/transient/wpd_node.h"
namespace webrtc {
@@ -89,4 +89,4 @@ class WPDTree {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
+#endif // MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
index 983d05dca19..a90af7766bd 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/transient/wpd_tree.h"
+#include "modules/audio_processing/transient/wpd_tree.h"
#include <memory>
#include <sstream>
#include <string>
-#include "webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
-#include "webrtc/modules/audio_processing/transient/file_utils.h"
-#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
+#include "modules/audio_processing/transient/file_utils.h"
+#include "system_wrappers/include/file_wrapper.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc b/chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc
index 5f5ce0abafd..6e18124aadf 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/typing_detection.h"
+#include "modules/audio_processing/typing_detection.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/typing_detection.h b/chromium/third_party/webrtc/modules/audio_processing/typing_detection.h
index 40608f885d2..fe74a5956e5 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/typing_detection.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/typing_detection.h
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
+#ifndef MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
+#define MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/typedefs.h"
+#include "modules/include/module_common_types.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -90,4 +90,4 @@ class TypingDetection {
} // namespace webrtc
-#endif // #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
+#endif // #ifndef MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.cc
index 37919f028a0..3d766929c6a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.cc
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/block_mean_calculator.h"
+#include "modules/audio_processing/utility/block_mean_calculator.h"
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.h b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.h
index 3dd7d407af1..cfa7cfbeba9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
#include <stddef.h>
-#include "webrtc/rtc_base/constructormagic.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -49,4 +49,4 @@ class BlockMeanCalculator {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator_unittest.cc
index 22e8f4997f5..1f4ebf1b67e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/block_mean_calculator_unittest.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/block_mean_calculator.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/utility/block_mean_calculator.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.cc
index e01495ea695..871b5416513 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
+#include "modules/audio_processing/utility/delay_estimator.h"
#include <stdlib.h>
#include <string.h>
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
// Number of right shifts for scaling is linearly depending on number of bits in
// the far-end binary spectrum.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h
index 65c3f034ba0..cce6113a539 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h
@@ -11,10 +11,10 @@
// Performs delay estimation on binary converted spectra.
// The return value is 0 - OK and -1 - Error, unless otherwise stated.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
static const int32_t kMaxBitCountsQ9 = (32 << 9); // 32 matching bits in Q9.
@@ -248,4 +248,4 @@ void WebRtc_MeanEstimatorFix(int32_t new_value,
int factor,
int32_t* mean_value);
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_internal.h b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_internal.h
index fd11028fd6a..46eea3ec185 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_internal.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_internal.h
@@ -10,11 +10,11 @@
// Header file including the delay estimator handle used for testing.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
-#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/utility/delay_estimator.h"
+#include "typedefs.h" // NOLINT(build/include)
typedef union {
float float_;
@@ -45,4 +45,4 @@ typedef struct {
BinaryDelayEstimator* binary_handle;
} DelayEstimator;
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc
index f054b9c4298..36700e57066 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_internal.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/utility/delay_estimator.h"
+#include "modules/audio_processing/utility/delay_estimator_internal.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "test/gtest.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc
index afd07ac114d..f907c80a355 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
+#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
#include <stdlib.h>
#include <string.h>
-#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
-#include "webrtc/modules/audio_processing/utility/delay_estimator_internal.h"
-#include "webrtc/rtc_base/checks.h"
+#include "modules/audio_processing/utility/delay_estimator.h"
+#include "modules/audio_processing/utility/delay_estimator_internal.h"
+#include "rtc_base/checks.h"
// Only bit |kBandFirst| through bit |kBandLast| are processed and
// |kBandFirst| - |kBandLast| must be < 32.
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h
index fdadebeb32e..6b6e51f82c6 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h
@@ -11,10 +11,10 @@
// Performs delay estimation on block by block basis.
// The return value is 0 - OK and -1 - Error, unless otherwise stated.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
// Releases the memory allocated by WebRtc_CreateDelayEstimatorFarend(...)
void WebRtc_FreeDelayEstimatorFarend(void* handle);
@@ -241,4 +241,4 @@ int WebRtc_last_delay(void* handle);
// - delay_quality : >= 0 - Estimation quality of last calculated delay.
float WebRtc_last_delay_quality(void* handle);
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc
index 30f203480dc..59631117a20 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc
@@ -21,13 +21,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing//utility/ooura_fft.h"
+#include "modules/audio_processing//utility/ooura_fft.h"
#include <math.h>
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h"
-#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
+#include "system_wrappers/include/cpu_features_wrapper.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.h b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.h
index a1b9f04f544..96d57dc908d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -57,4 +57,4 @@ class OouraFft {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_mips.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_mips.cc
index 3e9db6e7a16..569e1d7e820 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_mips.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_mips.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc
index 4ed043d518f..401387a643b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc
@@ -14,12 +14,12 @@
* Based on the sse2 version.
*/
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
#include <arm_neon.h>
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc
index 03f6b31f0ff..48a05c3bc2d 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing//utility/ooura_fft.h"
+#include "modules/audio_processing//utility/ooura_fft.h"
#include <emmintrin.h>
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h"
-#include "webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
+#include "modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h
index 548027cf220..47d076ea2a9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
namespace webrtc {
@@ -51,4 +51,4 @@ const float rdft_wk3ri_second[16] = {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
index 1ed646d6f64..1c44ae71973 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
+#ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
+#define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
-#include "webrtc/modules/audio_processing/utility/ooura_fft.h"
+#include "modules/audio_processing/utility/ooura_fft.h"
#ifdef _MSC_VER /* visual c++ */
#define ALIGN16_BEG __declspec(align(16))
@@ -91,4 +91,4 @@ ALIGN16_BEG const float ALIGN16_END cftmdl_wk1r[4] = {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
+#endif // MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/common.h b/chromium/third_party/webrtc/modules/audio_processing/vad/common.h
index 4b7fb50f981..b5a5fb385b1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/common.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/common.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
+#define MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
#include <stddef.h>
@@ -26,4 +26,4 @@ struct AudioFeatures {
bool silence;
};
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.cc
index 96519759133..266ca44cc99 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/gmm.h"
+#include "modules/audio_processing/vad/gmm.h"
#include <math.h>
#include <stdlib.h>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.h b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.h
index 9f3e578fef6..93eb675c46b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_GMM_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_GMM_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_GMM_H_
+#define MODULES_AUDIO_PROCESSING_VAD_GMM_H_
namespace webrtc {
@@ -42,4 +42,4 @@ struct GmmParameters {
double EvaluateGmm(const double* x, const GmmParameters& gmm_parameters);
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_GMM_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_GMM_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm_unittest.cc
index 46785af12fb..dfc8855a143 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/gmm_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/gmm_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/gmm.h"
+#include "modules/audio_processing/vad/gmm.h"
#include <math.h>
-#include "webrtc/modules/audio_processing/vad/noise_gmm_tables.h"
-#include "webrtc/modules/audio_processing/vad/voice_gmm_tables.h"
-#include "webrtc/test/gtest.h"
+#include "modules/audio_processing/vad/noise_gmm_tables.h"
+#include "modules/audio_processing/vad/voice_gmm_tables.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/noise_gmm_tables.h b/chromium/third_party/webrtc/modules/audio_processing/vad/noise_gmm_tables.h
index 293af57a2a6..c07dadebd52 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/noise_gmm_tables.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/noise_gmm_tables.h
@@ -10,8 +10,8 @@
// GMM tables for inactive segments. Generated by MakeGmmTables.m.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
+#define MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
static const int kNoiseGmmNumMixtures = 12;
static const int kNoiseGmmDim = 3;
@@ -82,4 +82,4 @@ static const double kNoiseGmmWeights[kNoiseGmmNumMixtures] = {
-1.41311785780639e+01,
-1.47171861448585e+01,
-1.35963362781839e+01};
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_NOISE_GMM_TABLES_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.cc
index 6ef1e3946dc..bca2552c356 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pitch_based_vad.h"
+#include "modules/audio_processing/vad/pitch_based_vad.h"
#include <math.h>
#include <string.h>
-#include "webrtc/modules/audio_processing/vad/vad_circular_buffer.h"
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/modules/audio_processing/vad/noise_gmm_tables.h"
-#include "webrtc/modules/audio_processing/vad/voice_gmm_tables.h"
-#include "webrtc/modules/include/module_common_types.h"
+#include "modules/audio_processing/vad/vad_circular_buffer.h"
+#include "modules/audio_processing/vad/common.h"
+#include "modules/audio_processing/vad/noise_gmm_tables.h"
+#include "modules/audio_processing/vad/voice_gmm_tables.h"
+#include "modules/include/module_common_types.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.h b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.h
index 4fb0c55d624..584dcc73ce7 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
+#define MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
#include <memory>
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/modules/audio_processing/vad/gmm.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/vad/common.h"
+#include "modules/audio_processing/vad/gmm.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -55,4 +55,4 @@ class PitchBasedVad {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_PITCH_BASED_VAD_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad_unittest.cc
index 5d820951351..fb6daa523eb 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_based_vad_unittest.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pitch_based_vad.h"
+#include "modules/audio_processing/vad/pitch_based_vad.h"
#include <math.h>
#include <stdio.h>
#include <string>
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.cc
index 309b45acf53..7e6bd3e6163 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pitch_internal.h"
+#include "modules/audio_processing/vad/pitch_internal.h"
#include <cmath>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.h b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.h
index b25b1a82a24..67e05223285 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
+#define MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
// TODO(turajs): Write a description of this function. Also be consistent with
// usage of |sampling_rate_hz| vs |kSamplingFreqHz|.
@@ -23,4 +23,4 @@ void GetSubframesPitchParameters(int sampling_rate_hz,
double* log_pitch_gain,
double* pitch_lag_hz);
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_PITCH_INTERNAL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal_unittest.cc
index 70124f85acd..c1fde100088 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pitch_internal_unittest.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pitch_internal.h"
+#include "modules/audio_processing/vad/pitch_internal.h"
#include <math.h>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
TEST(PitchInternalTest, test) {
const int kSamplingRateHz = 8000;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.cc
index 9769515c57d..fa56a3c15e9 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pole_zero_filter.h"
+#include "modules/audio_processing/vad/pole_zero_filter.h"
#include <stdlib.h>
#include <string.h>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.h b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.h
index bd13050a5c4..283deecde30 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
+#define MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
#include <cstddef>
-#include "webrtc/typedefs.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -49,4 +49,4 @@ class PoleZeroFilter {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_POLE_ZERO_FILTER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter_unittest.cc
index 71e72134346..aef07a6e448 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/pole_zero_filter_unittest.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/pole_zero_filter.h"
+#include "modules/audio_processing/vad/pole_zero_filter.h"
#include <math.h>
#include <stdio.h>
#include <memory>
-#include "webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_processing/vad/vad_audio_proc_internal.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.cc
index 7848134215b..004cefebb8c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/standalone_vad.h"
+#include "modules/audio_processing/vad/standalone_vad.h"
-#include "webrtc/audio/utility/audio_frame_operations.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/rtc_base/checks.h"
-#include "webrtc/typedefs.h"
+#include "audio/utility/audio_frame_operations.h"
+#include "modules/include/module_common_types.h"
+#include "rtc_base/checks.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.h b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.h
index 3cf1a42122e..b85de0a75ab 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad.h
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
+#ifndef MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
+#define MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/common_audio/vad/include/webrtc_vad.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/vad/common.h"
+#include "common_audio/vad/include/webrtc_vad.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -66,4 +66,4 @@ class StandaloneVad {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
+#endif // MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
index 5ed39b8299d..28d1349396e 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
@@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/standalone_vad.h"
+#include "modules/audio_processing/vad/standalone_vad.h"
#include <string.h>
#include <memory>
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/include/module_common_types.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.cc
index d5f6b3bcd77..b1841d0b213 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.cc
@@ -8,23 +8,23 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/vad_audio_proc.h"
+#include "modules/audio_processing/vad/vad_audio_proc.h"
#include <math.h>
#include <stdio.h>
-#include "webrtc/common_audio/fft4g.h"
-#include "webrtc/modules/audio_processing/vad/pitch_internal.h"
-#include "webrtc/modules/audio_processing/vad/pole_zero_filter.h"
-#include "webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h"
-#include "webrtc/rtc_base/checks.h"
+#include "common_audio/fft4g.h"
+#include "modules/audio_processing/vad/pitch_internal.h"
+#include "modules/audio_processing/vad/pole_zero_filter.h"
+#include "modules/audio_processing/vad/vad_audio_proc_internal.h"
+#include "rtc_base/checks.h"
extern "C" {
-#include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h"
-#include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h"
-#include "webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h"
-#include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h"
+#include "modules/audio_coding/codecs/isac/main/source/codec.h"
+#include "modules/audio_coding/codecs/isac/main/source/lpc_analysis.h"
+#include "modules/audio_coding/codecs/isac/main/source/pitch_estimator.h"
+#include "modules/audio_coding/codecs/isac/main/source/structs.h"
}
-#include "webrtc/modules/include/module_common_types.h"
+#include "modules/include/module_common_types.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.h b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.h
index 1f27b294e55..b1441a08c0c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc.h
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
+#define MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
#include <memory>
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/typedefs.h"
+#include "modules/audio_processing/vad/common.h"
+#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {
@@ -90,4 +90,4 @@ class VadAudioProc {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h
index 45586b9be68..ab1e63651f1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
+#define MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
namespace webrtc {
@@ -91,4 +91,4 @@ static_assert(kFilterOrder + 1 ==
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROCESSING_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROCESSING_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_unittest.cc
index 65b516a7c53..c520257f8e2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_audio_proc_unittest.cc
@@ -12,17 +12,17 @@
// routines. However, interpolation of pitch-gain and lags is in a separate
// class and has its own unit-test.
-#include "webrtc/modules/audio_processing/vad/vad_audio_proc.h"
+#include "modules/audio_processing/vad/vad_audio_proc.h"
#include <math.h>
#include <stdio.h>
#include <string>
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/modules/include/module_common_types.h"
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "modules/audio_processing/vad/common.h"
+#include "modules/include/module_common_types.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc
index 22d5deadb2a..3c4d5ad0e07 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/vad_circular_buffer.h"
+#include "modules/audio_processing/vad/vad_circular_buffer.h"
#include <stdlib.h>
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.h b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.h
index cfa6977a760..46b03d49bf0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
+#define MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
#include <memory>
@@ -66,4 +66,4 @@ class VadCircularBuffer {
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_VAD_CIRCULAR_BUFFER_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer_unittest.cc
index 5291ff8d8bb..efbd70d9d9b 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/vad_circular_buffer_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/vad_circular_buffer.h"
+#include "modules/audio_processing/vad/vad_circular_buffer.h"
#include <stdio.h>
#include <memory>
-#include "webrtc/test/gtest.h"
+#include "test/gtest.h"
namespace webrtc {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
index 8942a03c3cc..dfba73bce8c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"
+#include "modules/audio_processing/vad/voice_activity_detector.h"
#include <algorithm>
-#include "webrtc/rtc_base/checks.h"
+#include "rtc_base/checks.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.h b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.h
index 5fb5e597944..c937bbb5ffc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector.h
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
+#define MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
#include <memory>
#include <vector>
-#include "webrtc/common_audio/resampler/include/resampler.h"
-#include "webrtc/modules/audio_processing/vad/vad_audio_proc.h"
-#include "webrtc/modules/audio_processing/vad/common.h"
-#include "webrtc/modules/audio_processing/vad/pitch_based_vad.h"
-#include "webrtc/modules/audio_processing/vad/standalone_vad.h"
+#include "common_audio/resampler/include/resampler.h"
+#include "modules/audio_processing/vad/vad_audio_proc.h"
+#include "modules/audio_processing/vad/common.h"
+#include "modules/audio_processing/vad/pitch_based_vad.h"
+#include "modules/audio_processing/vad/standalone_vad.h"
namespace webrtc {
@@ -68,4 +68,4 @@ class VoiceActivityDetector {
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector_unittest.cc
index d43b1352d78..62eda2bd3d2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_activity_detector_unittest.cc
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"
+#include "modules/audio_processing/vad/voice_activity_detector.h"
#include <algorithm>
#include <vector>
-#include "webrtc/test/gtest.h"
-#include "webrtc/test/testsupport/fileutils.h"
+#include "test/gtest.h"
+#include "test/testsupport/fileutils.h"
namespace webrtc {
namespace {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_gmm_tables.h b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_gmm_tables.h
index 2f247c37980..29cc7d6cb23 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/vad/voice_gmm_tables.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/vad/voice_gmm_tables.h
@@ -10,8 +10,8 @@
// GMM tables for active segments. Generated by MakeGmmTables.m.
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
+#ifndef MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
+#define MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
static const int kVoiceGmmNumMixtures = 12;
static const int kVoiceGmmDim = 3;
@@ -82,4 +82,4 @@ static const double kVoiceGmmWeights[kVoiceGmmNumMixtures] = {
-1.83207938586818e+01,
-1.31186044948288e+01,
-9.52479998673554e+00};
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
+#endif // MODULES_AUDIO_PROCESSING_VAD_VOICE_GMM_TABLES_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc
index 9c9e0916d1e..5ee0c7b9c24 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/voice_detection_impl.h"
+#include "modules/audio_processing/voice_detection_impl.h"
-#include "webrtc/common_audio/vad/include/webrtc_vad.h"
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/rtc_base/constructormagic.h"
+#include "common_audio/vad/include/webrtc_vad.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "rtc_base/constructormagic.h"
namespace webrtc {
class VoiceDetectionImpl::Vad {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h
index 3f515ce0596..4b724bdd256 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
+#ifndef MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
+#define MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
#include <memory>
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/criticalsection.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "rtc_base/constructormagic.h"
+#include "rtc_base/criticalsection.h"
namespace webrtc {
@@ -43,16 +43,16 @@ class VoiceDetectionImpl : public VoiceDetection {
private:
class Vad;
rtc::CriticalSection* const crit_;
- bool enabled_ GUARDED_BY(crit_) = false;
- bool stream_has_voice_ GUARDED_BY(crit_) = false;
- bool using_external_vad_ GUARDED_BY(crit_) = false;
- Likelihood likelihood_ GUARDED_BY(crit_) = kLowLikelihood;
- int frame_size_ms_ GUARDED_BY(crit_) = 10;
- size_t frame_size_samples_ GUARDED_BY(crit_) = 0;
- int sample_rate_hz_ GUARDED_BY(crit_) = 0;
- std::unique_ptr<Vad> vad_ GUARDED_BY(crit_);
+ bool enabled_ RTC_GUARDED_BY(crit_) = false;
+ bool stream_has_voice_ RTC_GUARDED_BY(crit_) = false;
+ bool using_external_vad_ RTC_GUARDED_BY(crit_) = false;
+ Likelihood likelihood_ RTC_GUARDED_BY(crit_) = kLowLikelihood;
+ int frame_size_ms_ RTC_GUARDED_BY(crit_) = 10;
+ size_t frame_size_samples_ RTC_GUARDED_BY(crit_) = 0;
+ int sample_rate_hz_ RTC_GUARDED_BY(crit_) = 0;
+ std::unique_ptr<Vad> vad_ RTC_GUARDED_BY(crit_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(VoiceDetectionImpl);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
+#endif // MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
diff --git a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_unittest.cc b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_unittest.cc
index 32a4da50378..663913b638a 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/voice_detection_unittest.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/voice_detection_unittest.cc
@@ -9,12 +9,12 @@
*/
#include <vector>
-#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
-#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/modules/audio_processing/voice_detection_impl.h"
-#include "webrtc/rtc_base/array_view.h"
-#include "webrtc/test/gtest.h"
+#include "api/array_view.h"
+#include "modules/audio_processing/audio_buffer.h"
+#include "modules/audio_processing/test/audio_buffer_tools.h"
+#include "modules/audio_processing/test/bitexactness_tools.h"
+#include "modules/audio_processing/voice_detection_impl.h"
+#include "test/gtest.h"
namespace webrtc {
namespace {