webrtc_m130/webrtc/modules/audio_processing/audio_processing.gypi

314 lines
10 KiB
Plaintext
Raw Normal View History

# Copyright (c) 2012 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.
{
'variables': {
'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
This CL introduces a new data logging functionality to use for the APM. It allows simple and rapid additions of exploratory data logpoints to use during bug investigations and module performance analysis. The new data logging functionality is also in this CL used to replace the existing data logging functionality present in the AEC. Additional information: As there was an issue with that the build flag for activating this feature was not present in all compilation units that included the feature additional changes were needed. A summary of the changes are -The build files were modified to ensure that the logging build flag always is set to either 0 or 1 for compilation units that include the feature. -Build-time checks in the appropriate places were added to ensure that the above is fulfilled. -The build object was added dynamically to the AEC state as a pointer to ensure that the size of that state is not dependent on whether the logging build flag is set or not. -The constructor of the AEC class needed to be modified in order to construct the logging object. For this a destructor was also needed. -An unused method without any declaration was removed in order to avoid any issues with the logging flag being set to 0 or 1. This CL will be immediately followed with an upcoming CL that replaces the logging in echo_cancellation.cc with the new functionality which will ensure that the logging flag is only used in one place within WebRTC, which in turn will fully ensure that all compilation units that uses the feature also have the flag properly set. BUG=webrtc:5201, webrtc:5298 Review-Url: https://codereview.webrtc.org/1877713002 Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 07:01:18 -07:00
# Outputs some low-level debug files.
'aec_debug_dump%': 0,
},
'targets': [
{
'target_name': 'audio_processing',
'type': 'static_library',
'variables': {
# Outputs some low-level debug files.
'agc_debug_dump%': 0,
Add an extended filter mode to AEC. Re-land: http://review.webrtc.org/2151007/ TBR=bjornv@webrtc.org Original change description: This mode extends the filter length from the current 48 ms to 128 ms. It is runtime selectable which allows it to be enabled through experiment. We reuse the DelayCorrection infrastructure to avoid having to replumb everything up to libjingle. Increases AEC complexity by ~50% on modern x86 CPUs. Measurements (in percent of usage on one core): Machine/CPU Normal Extended MacBook Retina (Early 2013), Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9% MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7% Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0% Samsung ARM Chromebook, Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6% The relative value is large of course but the absolute should be acceptable in order to have a working AEC on some platforms. Detailed changes to the algorithm: - The filter length is changed from 48 to 128 ms. This comes with tuning of several parameters: i) filter adaptation stepsize and error threshold; ii) non-linear processing smoothing and overdrive. - Option to ignore the reported delays on platforms which we deem sufficiently unreliable. Currently this will be enabled in Chromium for Mac. - Faster startup times by removing the excessive "startup phase" processing of reported delays. - Much more conservative adjustments to the far-end read pointer. We smooth the delay difference more heavily, and back off from the difference more. Adjustments force a readaptation of the filter, so they should be avoided except when really necessary. Corresponds to these changes: https://chromereviews.googleplex.com/9412014 https://chromereviews.googleplex.com/9514013 https://chromereviews.googleplex.com/9960013 BUG=454,827,1261 Review URL: https://webrtc-codereview.appspot.com/2295006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 23:17:38 +00:00
# Disables the usual mode where we trust the reported system delay
# values the AEC receives. The corresponding define is set appropriately
# in the code, but it can be force-enabled here for testing.
'aec_untrusted_delay_for_testing%': 0,
},
'dependencies': [
'<(webrtc_root)/base/base.gyp:rtc_base_approved',
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(webrtc_root)/modules/modules.gyp:isac',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
'aec/aec_core.cc',
'aec/aec_core.h',
'aec/aec_core_optimized_methods.h',
'aec/aec_rdft.cc',
'aec/aec_rdft.h',
'aec/aec_resampler.cc',
'aec/aec_resampler.h',
'aec/echo_cancellation.cc',
'aec/echo_cancellation.h',
'aecm/aecm_core.cc',
'aecm/aecm_core.h',
'aecm/echo_control_mobile.cc',
'aecm/echo_control_mobile.h',
'agc/agc.cc',
'agc/agc.h',
'agc/agc_manager_direct.cc',
'agc/agc_manager_direct.h',
'agc/gain_map_internal.h',
'agc/loudness_histogram.cc',
'agc/loudness_histogram.h',
'agc/legacy/analog_agc.c',
'agc/legacy/analog_agc.h',
'agc/legacy/digital_agc.c',
'agc/legacy/digital_agc.h',
'agc/legacy/gain_control.h',
'agc/utility.cc',
'agc/utility.h',
'audio_buffer.cc',
'audio_buffer.h',
'audio_processing_impl.cc',
'audio_processing_impl.h',
'beamformer/array_util.cc',
'beamformer/array_util.h',
'beamformer/complex_matrix.h',
'beamformer/covariance_matrix_generator.cc',
'beamformer/covariance_matrix_generator.h',
'beamformer/matrix.h',
'beamformer/nonlinear_beamformer.cc',
'beamformer/nonlinear_beamformer.h',
'common.h',
'echo_cancellation_impl.cc',
'echo_cancellation_impl.h',
'echo_control_mobile_impl.cc',
'echo_control_mobile_impl.h',
'gain_control_for_experimental_agc.cc',
'gain_control_for_experimental_agc.h',
'gain_control_impl.cc',
'gain_control_impl.h',
'high_pass_filter_impl.cc',
'high_pass_filter_impl.h',
'include/audio_processing.h',
'intelligibility/intelligibility_enhancer.cc',
'intelligibility/intelligibility_enhancer.h',
'intelligibility/intelligibility_utils.cc',
'intelligibility/intelligibility_utils.h',
'level_controller/biquad_filter.cc',
'level_controller/biquad_filter.h',
'level_controller/down_sampler.cc',
'level_controller/down_sampler.h',
'level_controller/gain_applier.cc',
'level_controller/gain_applier.h',
'level_controller/gain_selector.cc',
'level_controller/gain_selector.h',
'level_controller/lc_constants.h',
'level_controller/level_controller.cc',
'level_controller/level_controller.h',
'level_controller/noise_spectrum_estimator.cc',
'level_controller/noise_spectrum_estimator.h',
'level_controller/noise_level_estimator.cc',
'level_controller/noise_level_estimator.h',
'level_controller/peak_level_estimator.cc',
'level_controller/peak_level_estimator.h',
'level_controller/saturating_gain_estimator.cc',
'level_controller/saturating_gain_estimator.h',
'level_controller/signal_classifier.cc',
'level_controller/signal_classifier.h',
'level_estimator_impl.cc',
'level_estimator_impl.h',
This CL introduces a new data logging functionality to use for the APM. It allows simple and rapid additions of exploratory data logpoints to use during bug investigations and module performance analysis. The new data logging functionality is also in this CL used to replace the existing data logging functionality present in the AEC. Additional information: As there was an issue with that the build flag for activating this feature was not present in all compilation units that included the feature additional changes were needed. A summary of the changes are -The build files were modified to ensure that the logging build flag always is set to either 0 or 1 for compilation units that include the feature. -Build-time checks in the appropriate places were added to ensure that the above is fulfilled. -The build object was added dynamically to the AEC state as a pointer to ensure that the size of that state is not dependent on whether the logging build flag is set or not. -The constructor of the AEC class needed to be modified in order to construct the logging object. For this a destructor was also needed. -An unused method without any declaration was removed in order to avoid any issues with the logging flag being set to 0 or 1. This CL will be immediately followed with an upcoming CL that replaces the logging in echo_cancellation.cc with the new functionality which will ensure that the logging flag is only used in one place within WebRTC, which in turn will fully ensure that all compilation units that uses the feature also have the flag properly set. BUG=webrtc:5201, webrtc:5298 Review-Url: https://codereview.webrtc.org/1877713002 Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 07:01:18 -07:00
'logging/apm_data_dumper.cc',
'logging/apm_data_dumper.h',
'noise_suppression_impl.cc',
'noise_suppression_impl.h',
'render_queue_item_verifier.h',
2014-05-05 18:22:21 +00:00
'rms_level.cc',
'rms_level.h',
'splitting_filter.cc',
'splitting_filter.h',
'three_band_filter_bank.cc',
'three_band_filter_bank.h',
'transient/common.h',
'transient/daubechies_8_wavelet_coeffs.h',
'transient/dyadic_decimator.h',
'transient/moving_moments.cc',
'transient/moving_moments.h',
'transient/transient_detector.cc',
'transient/transient_detector.h',
'transient/transient_suppressor.cc',
'transient/transient_suppressor.h',
'transient/wpd_node.cc',
'transient/wpd_node.h',
'transient/wpd_tree.cc',
'transient/wpd_tree.h',
'typing_detection.cc',
'typing_detection.h',
'utility/block_mean_calculator.cc',
'utility/block_mean_calculator.h',
'utility/delay_estimator.cc',
'utility/delay_estimator.h',
'utility/delay_estimator_internal.h',
'utility/delay_estimator_wrapper.cc',
'utility/delay_estimator_wrapper.h',
'vad/common.h',
'vad/gmm.cc',
'vad/gmm.h',
'vad/noise_gmm_tables.h',
'vad/pitch_based_vad.cc',
'vad/pitch_based_vad.h',
'vad/pitch_internal.cc',
'vad/pitch_internal.h',
'vad/pole_zero_filter.cc',
'vad/pole_zero_filter.h',
'vad/standalone_vad.cc',
'vad/standalone_vad.h',
'vad/vad_audio_proc.cc',
'vad/vad_audio_proc.h',
'vad/vad_audio_proc_internal.h',
'vad/vad_circular_buffer.cc',
'vad/vad_circular_buffer.h',
'vad/voice_activity_detector.cc',
'vad/voice_activity_detector.h',
'vad/voice_gmm_tables.h',
'voice_detection_impl.cc',
'voice_detection_impl.h',
],
'conditions': [
['aec_debug_dump==1', {
This CL introduces a new data logging functionality to use for the APM. It allows simple and rapid additions of exploratory data logpoints to use during bug investigations and module performance analysis. The new data logging functionality is also in this CL used to replace the existing data logging functionality present in the AEC. Additional information: As there was an issue with that the build flag for activating this feature was not present in all compilation units that included the feature additional changes were needed. A summary of the changes are -The build files were modified to ensure that the logging build flag always is set to either 0 or 1 for compilation units that include the feature. -Build-time checks in the appropriate places were added to ensure that the above is fulfilled. -The build object was added dynamically to the AEC state as a pointer to ensure that the size of that state is not dependent on whether the logging build flag is set or not. -The constructor of the AEC class needed to be modified in order to construct the logging object. For this a destructor was also needed. -An unused method without any declaration was removed in order to avoid any issues with the logging flag being set to 0 or 1. This CL will be immediately followed with an upcoming CL that replaces the logging in echo_cancellation.cc with the new functionality which will ensure that the logging flag is only used in one place within WebRTC, which in turn will fully ensure that all compilation units that uses the feature also have the flag properly set. BUG=webrtc:5201, webrtc:5298 Review-Url: https://codereview.webrtc.org/1877713002 Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 07:01:18 -07:00
'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
}, {
'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
}],
Add an extended filter mode to AEC. Re-land: http://review.webrtc.org/2151007/ TBR=bjornv@webrtc.org Original change description: This mode extends the filter length from the current 48 ms to 128 ms. It is runtime selectable which allows it to be enabled through experiment. We reuse the DelayCorrection infrastructure to avoid having to replumb everything up to libjingle. Increases AEC complexity by ~50% on modern x86 CPUs. Measurements (in percent of usage on one core): Machine/CPU Normal Extended MacBook Retina (Early 2013), Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9% MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7% Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0% Samsung ARM Chromebook, Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6% The relative value is large of course but the absolute should be acceptable in order to have a working AEC on some platforms. Detailed changes to the algorithm: - The filter length is changed from 48 to 128 ms. This comes with tuning of several parameters: i) filter adaptation stepsize and error threshold; ii) non-linear processing smoothing and overdrive. - Option to ignore the reported delays on platforms which we deem sufficiently unreliable. Currently this will be enabled in Chromium for Mac. - Faster startup times by removing the excessive "startup phase" processing of reported delays. - Much more conservative adjustments to the far-end read pointer. We smooth the delay difference more heavily, and back off from the difference more. Adjustments force a readaptation of the filter, so they should be avoided except when really necessary. Corresponds to these changes: https://chromereviews.googleplex.com/9412014 https://chromereviews.googleplex.com/9514013 https://chromereviews.googleplex.com/9960013 BUG=454,827,1261 Review URL: https://webrtc-codereview.appspot.com/2295006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 23:17:38 +00:00
['aec_untrusted_delay_for_testing==1', {
'defines': ['WEBRTC_UNTRUSTED_DELAY',],
}],
['agc_debug_dump==1', {
'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
}],
['enable_protobuf==1', {
'dependencies': ['audioproc_debug_proto'],
'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
}],
['prefer_fixed_point==1', {
'defines': ['WEBRTC_NS_FIXED'],
'sources': [
'ns/noise_suppression_x.h',
'ns/noise_suppression_x.c',
'ns/nsx_core.c',
'ns/nsx_core.h',
'ns/nsx_defines.h',
],
'conditions': [
['target_arch=="mipsel" and mips_arch_variant!="r6"', {
'sources': [
'ns/nsx_core_mips.c',
],
}, {
'sources': [
'ns/nsx_core_c.c',
],
}],
],
}, {
'defines': ['WEBRTC_NS_FLOAT'],
'sources': [
'ns/defines.h',
'ns/noise_suppression.h',
'ns/noise_suppression.c',
'ns/ns_core.c',
'ns/ns_core.h',
'ns/windows_private.h',
],
}],
['target_arch=="ia32" or target_arch=="x64"', {
'dependencies': ['audio_processing_sse2',],
}],
['build_with_neon==1', {
'dependencies': ['audio_processing_neon',],
}],
['target_arch=="mipsel" and mips_arch_variant!="r6"', {
'sources': [
'aecm/aecm_core_mips.cc',
],
'conditions': [
['mips_float_abi=="hard"', {
'sources': [
'aec/aec_core_mips.cc',
'aec/aec_rdft_mips.cc',
],
}],
],
}, {
'sources': [
'aecm/aecm_core_c.cc',
],
}],
],
# TODO(jschuh): Bug 1348: fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
],
'conditions': [
['enable_protobuf==1', {
'targets': [
{
'target_name': 'audioproc_debug_proto',
'type': 'static_library',
'sources': ['debug.proto',],
'variables': {
'proto_in_dir': '.',
# Workaround to protect against gyp's pathname relativization when
# this file is included by modules.gyp.
'proto_out_protected': 'webrtc/modules/audio_processing',
'proto_out_dir': '<(proto_out_protected)',
},
'includes': ['../../build/protoc.gypi',],
},
],
}],
['target_arch=="ia32" or target_arch=="x64"', {
'targets': [
{
'target_name': 'audio_processing_sse2',
'type': 'static_library',
'sources': [
'aec/aec_core_sse2.cc',
'aec/aec_rdft_sse2.cc',
],
'conditions': [
This CL introduces a new data logging functionality to use for the APM. It allows simple and rapid additions of exploratory data logpoints to use during bug investigations and module performance analysis. The new data logging functionality is also in this CL used to replace the existing data logging functionality present in the AEC. Additional information: As there was an issue with that the build flag for activating this feature was not present in all compilation units that included the feature additional changes were needed. A summary of the changes are -The build files were modified to ensure that the logging build flag always is set to either 0 or 1 for compilation units that include the feature. -Build-time checks in the appropriate places were added to ensure that the above is fulfilled. -The build object was added dynamically to the AEC state as a pointer to ensure that the size of that state is not dependent on whether the logging build flag is set or not. -The constructor of the AEC class needed to be modified in order to construct the logging object. For this a destructor was also needed. -An unused method without any declaration was removed in order to avoid any issues with the logging flag being set to 0 or 1. This CL will be immediately followed with an upcoming CL that replaces the logging in echo_cancellation.cc with the new functionality which will ensure that the logging flag is only used in one place within WebRTC, which in turn will fully ensure that all compilation units that uses the feature also have the flag properly set. BUG=webrtc:5201, webrtc:5298 Review-Url: https://codereview.webrtc.org/1877713002 Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 07:01:18 -07:00
['aec_debug_dump==1', {
'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
}, {
'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
}],
['os_posix==1', {
'cflags': [ '-msse2', ],
'xcode_settings': {
'OTHER_CFLAGS': [ '-msse2', ],
},
}],
],
},
],
}],
['build_with_neon==1', {
'targets': [{
'target_name': 'audio_processing_neon',
'type': 'static_library',
'includes': ['../../build/arm_neon.gypi',],
'dependencies': [
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
],
'sources': [
'aec/aec_core_neon.cc',
'aec/aec_rdft_neon.cc',
'aecm/aecm_core_neon.cc',
'ns/nsx_core_neon.c',
],
This CL introduces a new data logging functionality to use for the APM. It allows simple and rapid additions of exploratory data logpoints to use during bug investigations and module performance analysis. The new data logging functionality is also in this CL used to replace the existing data logging functionality present in the AEC. Additional information: As there was an issue with that the build flag for activating this feature was not present in all compilation units that included the feature additional changes were needed. A summary of the changes are -The build files were modified to ensure that the logging build flag always is set to either 0 or 1 for compilation units that include the feature. -Build-time checks in the appropriate places were added to ensure that the above is fulfilled. -The build object was added dynamically to the AEC state as a pointer to ensure that the size of that state is not dependent on whether the logging build flag is set or not. -The constructor of the AEC class needed to be modified in order to construct the logging object. For this a destructor was also needed. -An unused method without any declaration was removed in order to avoid any issues with the logging flag being set to 0 or 1. This CL will be immediately followed with an upcoming CL that replaces the logging in echo_cancellation.cc with the new functionality which will ensure that the logging flag is only used in one place within WebRTC, which in turn will fully ensure that all compilation units that uses the feature also have the flag properly set. BUG=webrtc:5201, webrtc:5298 Review-Url: https://codereview.webrtc.org/1877713002 Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 07:01:18 -07:00
'conditions': [
['aec_debug_dump==1', {
'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
}],
['aec_debug_dump==0', {
'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
}],
],
}],
}],
],
}