811 Commits

Author SHA1 Message Date
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
solenberg
f383c5754f - Remove unused unit test webrtc/modules/audio_processing/agc/agc_unittest.cc
- Remove webrtc/tools/agc/test_utils.cc/.h - only used from the above test.
- Remove webrtc/tools/agc/agc_harness.cc - not used anymore.

BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/2299023004
Cr-Commit-Position: refs/heads/master@{#14039}
2016-09-02 09:39:40 +00:00
peah
f28a389446 Moved the place for the aec_debug_dump build flag and changed the name to apm_debug_dump
Currently, the aec_debug_dump buildflag can and is used to store data in the whole of
the audio processing module. Therefore a more appropriate name is apm_debug_dump which
also matches the names of the data dumping functionality. This CL makes that name change.

The CL also changes the WEBRTC_AEC_DEBUG_DUMP define to
WEBRTC_APM_DEBUG_DUMP == 1

Furthermore, this CL moves the buildflag to a more appropriate place.

BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2300813004
Cr-Commit-Position: refs/heads/master@{#14026}
2016-09-01 15:58:27 +00:00
peah
f8f754a1a6 Fixed the clang warning for ApmDataDumper
BUG=

Review-Url: https://codereview.webrtc.org/2296693002
Cr-Commit-Position: refs/heads/master@{#13975}
2016-08-30 17:31:53 +00:00
peah
cc34fafcf9 Removed the global limitation of the native sample rates on ARM devices and replaced it with an APM-internal limitation
when building the code for ARM.

The intention is to follow up this CL with other CLs that
further addresses the internal resampling in APM

BUG=webrtc:6181

Review-Url: https://codereview.webrtc.org/2265473003
Cr-Commit-Position: refs/heads/master@{#13974}
2016-08-30 16:49:18 +00:00
kwiberg
3cc8774935 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2286283002
Cr-Commit-Position: refs/heads/master@{#13965}
2016-08-29 22:10:39 +00:00
kwiberg
83ffe453ec Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2288153002
Cr-Commit-Position: refs/heads/master@{#13964}
2016-08-29 21:46:14 +00:00
kwiberg
9e102114dc Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2288133002
Cr-Commit-Position: refs/heads/master@{#13962}
2016-08-29 20:43:07 +00:00
kwiberg
942c8515bc Fix Chromium clang plugin warnings
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2288593004
Cr-Commit-Position: refs/heads/master@{#13961}
2016-08-29 20:10:35 +00:00
kwiberg
8cf8898973 Fix Chromium clang plugin warnings
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2285713002
Cr-Commit-Position: refs/heads/master@{#13943}
2016-08-26 21:50:42 +00:00
peah
3026ee81d3 Added logging of the level controller metrics.
BUG=

Review-Url: https://codereview.webrtc.org/2278393002
Cr-Commit-Position: refs/heads/master@{#13939}
2016-08-26 18:15:52 +00:00
peah
1bcfce5ff2 Deactivated the intelligibility enhancement functionality by default
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2272423003
Cr-Commit-Position: refs/heads/master@{#13937}
2016-08-26 14:16:13 +00:00
peah
7d67e45104 Revert of Added functionality for specifying the initial signal level to use for the gain estimation in the l… (patchset #8 id:160001 of https://codereview.webrtc.org/2254973003/ )
Reason for revert:
This caused build breakage due to upstream dependencies.

These dependencies need to be resolved before landing the CL.

Original issue's description:
> This CL adds functionality in the level controller to
> receive a signal level to use initially, instead of the
> default initial signal level.
>
> BUG=
>
> Committed: https://crrev.com/57fec1d828113241186e78710ec5e851cc1a0e81
> Cr-Commit-Position: refs/heads/master@{#13931}

TBR=henrik.lundin@webrtc.org,aleloi@webrtc.org,solenberg@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2283793002
Cr-Commit-Position: refs/heads/master@{#13936}
2016-08-26 13:20:25 +00:00
peah
57fec1d828 This CL adds functionality in the level controller to
receive a signal level to use initially, instead of the
default initial signal level.

BUG=

Review-Url: https://codereview.webrtc.org/2254973003
Cr-Commit-Position: refs/heads/master@{#13931}
2016-08-26 11:58:21 +00:00
kwiberg
1e8ed4a801 Replace calls to assert() with RTC_DCHECK_*() in .c code
We have RTC_CHECK and RTC_DCHECK for C now, so we should use it. It's
one fewer difference between our C and C++ code.

NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2274083002
Cr-Commit-Position: refs/heads/master@{#13930}
2016-08-26 11:33:41 +00:00
maxmorin
3f746ea26a Fix error when accumulating floats in an int.
I saw this when browsing the code, I think the intended behavior is accumulating to a float.

BUG=none

Review-Url: https://codereview.webrtc.org/2268163004
Cr-Commit-Position: refs/heads/master@{#13918}
2016-08-25 11:00:27 +00:00
kwiberg
7a770e0a61 GN build rules for four audio processing test executables
click_annotate, intelligibility_proc, nonlinear_beamformer_test, and
transient_suppression_test.

This is a re-land of https://codereview.webrtc.org/2267403003

BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2273783004
Cr-Commit-Position: refs/heads/master@{#13913}
2016-08-25 09:33:36 +00:00
aleloi
5f09980bb5 Removed inline definitions and added destructors to fix chromium-style.
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2272563004
Cr-Commit-Position: refs/heads/master@{#13911}
2016-08-25 07:45:40 +00:00
sakal
98468bb456 Revert of GN build rules for four audio processing test executables (patchset #3 id:40001 of https://codereview.webrtc.org/2267403003/ )
Reason for revert:
Breaks most of chromium.webrtc.fyi bots.

Original issue's description:
> GN build rules for four audio processing test executables
>
> click_annotate, intelligibility_proc, nonlinear_beamformer_test, and
> transient_suppression_test.
>
> BUG=webrtc:5949
>
> Committed: https://crrev.com/538b5606a3fb6310aab7a7e747aee16eac885f02
> Cr-Commit-Position: refs/heads/master@{#13890}

TBR=kjellander@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2274813004
Cr-Commit-Position: refs/heads/master@{#13891}
2016-08-24 12:04:31 +00:00
kwiberg
538b5606a3 GN build rules for four audio processing test executables
click_annotate, intelligibility_proc, nonlinear_beamformer_test, and
transient_suppression_test.

BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2267403003
Cr-Commit-Position: refs/heads/master@{#13890}
2016-08-24 11:38:54 +00:00
ehmaldonado
bcba64a0fa GN: Add "//build/config/sanitizers:deps" as a dependency to executable targets.
When the sanitizer bots are switched to GN, this needs to be included as a dependency so that the executables can be compiled.

BUG=webrtc:6215
NOTRY=True

Review-Url: https://codereview.webrtc.org/2250893003
Cr-Commit-Position: refs/heads/master@{#13829}
2016-08-19 09:11:15 +00:00
peah
b5b30908dc Corrected the testvectors for the level controller
bitexactness test. The activation of the test will
be done in another CL.

BUG=

Review-Url: https://codereview.webrtc.org/2257733002
Cr-Commit-Position: refs/heads/master@{#13822}
2016-08-18 16:47:52 +00:00
peah
644fa96886 Added recording of the configuration for the AudioFrame API call
BUG=webrtc:6227

Review-Url: https://codereview.webrtc.org/2252043003
Cr-Commit-Position: refs/heads/master@{#13819}
2016-08-18 13:48:38 +00:00
peah
c3ec1fd23c Adding GN targets for audioproc, audioproc_f and unpack_aecdump
BUG=webrtc:6171
NOTRY=True

Review-Url: https://codereview.webrtc.org/2222643002
Cr-Commit-Position: refs/heads/master@{#13667}
2016-08-08 06:19:35 +00:00
ehmaldonado
529f83c521 Add webrtc_perf_tests to BUILD.gn
Updated the sources in audio_processing:audioproc_test_utils to match the configuration on
"webrtc/modules/audio_processing/audio_processing_tests.gypi"

Removed audio_buffer_tools from modules_unittests to match the gyp file.

BUG=webrtc:6041

Review-Url: https://codereview.webrtc.org/2178963002
Cr-Commit-Position: refs/heads/master@{#13541}
2016-07-27 15:14:42 +00:00
aluebs
95663fe746 Remove unused NonlinearBeamformer interface
Review-Url: https://codereview.webrtc.org/2129663002
Cr-Commit-Position: refs/heads/master@{#13451}
2016-07-12 19:43:09 +00:00
deadbeef
bb01781982 Adding back removed methods to MockNonlinearBeamformer.
This is temporary, until downstream dependencies are updated.

TBR=aluebs@webrtc.org

Review-Url: https://codereview.webrtc.org/2121553002
Cr-Commit-Position: refs/heads/master@{#13374}
2016-07-02 20:34:56 +00:00
Alejandro Luebs
f4022ffa1a Pull out the PostFilter to its own NonlinearBeamformer API
This is done to avoid having a nonlinear component in the AEC path.
Now the linear delay and sum is run before the AEC and the postfilter after it.

This change landed originally at: https://codereview.webrtc.org/1982183002/

R=peah@webrtc.org
TBR=henrik.lundin@webrtc.org

Review URL: https://codereview.webrtc.org/2110593003 .

Cr-Commit-Position: refs/heads/master@{#13371}
2016-07-02 00:19:32 +00:00
Alejandro Luebs
1aa821980d Add logging to Intelligibility Enhancer
It logs when the IE is activated and deactivated.

R=ivoc@webrtc.org, turaj@webrtc.org

Review URL: https://codereview.webrtc.org/2104273002 .

Cr-Commit-Position: refs/heads/master@{#13370}
2016-07-02 00:16:13 +00:00
Alejandro Luebs
5041110b94 Compensate for the LevelController gain in the IntelligibilityEnhancer
R=peah@webrtc.org

Review URL: https://codereview.webrtc.org/2112553003 .

Cr-Commit-Position: refs/heads/master@{#13353}
2016-06-30 22:35:46 +00:00
Alejandro Luebs
a181c9ad17 Keep track of the user-facing number of channels in a ChannelBuffer
Before this change the ChannelBuffer had a fixed number of channels. This meant for example that when the Beamformer would reduce the number of channels to one, the merging filter bank was still merging all the channels, which was unnecessary since they were not processed and just discarded later. This change doesn't change the signal at all. It just reflects the number of channels in the ChannelBuffer, reducing the complexity.

R=henrik.lundin@webrtc.org, peah@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/2053773002 .

Cr-Commit-Position: refs/heads/master@{#13352}
2016-06-30 22:33:47 +00:00
peah
b59ff8952f This CL provides improved parameter tuning for the level controller as well as some further minor changes.
It does:
-Handle saturations in a better manner by adding different gain change
step sizes for upwards and downwards changes, as well as when there
is saturation.
-Handle conditions with initial noise-only regions in a better way by
setting a high initial peak level estimate which is gradually reduced until
certainty about the peak level is achieved.
-Limit the maximum gain to limit noise amplification, and to reflect that it
initially is intended to be used in cascade with the fixed digital AGC mode.
-Lower the maximum allowed stationary noise floor to reduce the risk of
excessive noise amplification.
-Lower the target gain to reduce the risk of causing the AEC on the other
end to fail due to high playout levels triggering nonlinearities.
This also reduces the risk for saturation.
-Handle the noise-only regions in a better manner.

NOTRY=true
TBR=aleloi
BUG=webrtc:5920

Review-Url: https://codereview.webrtc.org/2111553002
Cr-Commit-Position: refs/heads/master@{#13350}
2016-06-30 16:19:41 +00:00
peah
5f6547e89c Disabling the performance unittests on Android for the level controller.
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2108723004
Cr-Commit-Position: refs/heads/master@{#13346}
2016-06-30 12:13:46 +00:00
peah
ca4cac7e74 New module for the adaptive level controlling functionality in the audio processing module
NOTRY=true
TBR=aluebs@webrtc.org
BUG=webrtc:5920

Review-Url: https://codereview.webrtc.org/2090583002
Cr-Commit-Position: refs/heads/master@{#13333}
2016-06-29 22:26:19 +00:00
Alejandro Luebs
a3c51ea9f4 Revert "Pull out the PostFilter to its own NonlinearBeamformer API"
This reverts commit b983112bc7686ed4276def4c9215c498444c6bdd.

It was breaking dependencies.
TBR=aluebs@webrtc.org
BUG=

Review URL: https://codereview.webrtc.org/2110503002 .

Cr-Commit-Position: refs/heads/master@{#13316}
2016-06-28 17:38:41 +00:00
Alejandro Luebs
b983112bc7 Pull out the PostFilter to its own NonlinearBeamformer API
This is done to avoid having a nonlinear component in the AEC path.
Now the linear delay and sum is run before the AEC and the postfilter after it.

R=henrik.lundin@webrtc.org, peah@webrtc.org

Review URL: https://codereview.webrtc.org/1982183002 .

Cr-Commit-Position: refs/heads/master@{#13314}
2016-06-28 17:02:57 +00:00
minyuel
e01000b9a4 Fixing a comment on AEC divergence metric.
BUG=
R=henrik.lundin@webrtc.org

Review URL: https://codereview.webrtc.org/2102603002 .

Cr-Commit-Position: refs/heads/master@{#13297}
2016-06-27 15:06:22 +00:00
aluebs
7bd5f253bc Fine tune the IntelligibilityEnhancer
Label less chunks as speech, adapt slower and be more conservative with the maximum gain it can apply.

Review-Url: https://codereview.webrtc.org/2087623003
Cr-Commit-Position: refs/heads/master@{#13242}
2016-06-21 18:30:31 +00:00
peah
351da09467 Remove header files for the AEC and the APM test program that are no longer used.
BUG=

Review-Url: https://codereview.webrtc.org/2078313002
Cr-Commit-Position: refs/heads/master@{#13227}
2016-06-20 21:33:05 +00:00
aluebs
4b6c8b7bf7 Fix ProcessReverseStream usage in audioproc_f
Also added IntelligibilityEnhancer setting to aecdump simulator in audioproc_f

Review-Url: https://codereview.webrtc.org/2075093003
Cr-Commit-Position: refs/heads/master@{#13220}
2016-06-20 18:02:38 +00:00
aluebs
f03a8d4c4d Unpack different wav files after each INIT event of the aecdump
Some aecdumps have more than one INIT event. In those cases only the last wav file was unpacked, which sometimes is not the most interesting or desired one.
This CL creates a different wav file after each INIT event.

Review-Url: https://codereview.webrtc.org/2067423002
Cr-Commit-Position: refs/heads/master@{#13196}
2016-06-17 16:41:50 +00:00
minyue
fd634c43e9 Reland of Re-enable UBsan on AGC.
patchset #8 id:300001 of https://codereview.webrtc.org/2003623003/

This reverts commit 4867ca2689d6576a750180b8f8e6bd9a9e23056f.

BUG=webrtc:5530
TBR=peah@webrtc.org, kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2072033004
Cr-Commit-Position: refs/heads/master@{#13188}
2016-06-17 11:36:15 +00:00
pbos
4867ca2689 Revert of -enable UBsan on AGC. (patchset #1 id:1 of https://codereview.webrtc.org/2063643003/ )
Reason for revert:
Breaks downstream code import.

Original issue's description:
> Reland of Re-enable UBsan on AGC.
>
> patchset #8 id:300001 of https://codereview.webrtc.org/2003623003/
>
> This reverts commit 2b9423f7a18145255deb93f2505a4fd1c3fa9ad7.
>
> BUG=webrtc:5530
> TBR=peah@webrtc.org, kjellander@webrtc.org
>
> Committed: https://crrev.com/b1963b403f8e9258c35a02d2622da254cbb90c51
> Cr-Commit-Position: refs/heads/master@{#13132}

TBR=henrik.lundin@webrtc.org,minyue@webrtc.org
BUG=webrtc:5530
NOTRY=true

Review-Url: https://codereview.webrtc.org/2078433003
Cr-Commit-Position: refs/heads/master@{#13169}
2016-06-16 14:59:13 +00:00
tommi
a6219cc3ef FileWrapper[Impl] modifications and actually remove the "Impl" class.
This is a somewhat involved refactoring of this class. Here's an overview of the changes:

* FileWrapper can now be used as a regular class and instances allocated on the stack.
* The type now has support for move semantics and copy isn't allowed.
* New public ctor with FILE* that can be used instead of OpenFromFileHandle.
* New static Open() method.  The intent of this is to allow opening a file and getting back a FileWrapper instance.  Using this method instead of Create(), will allow us in the future to make the FILE* member pointer, to be const and simplify threading (get rid of the lock).
* Rename the Open() method to is_open() and make it inline.
* The FileWrapper interface is no longer a pure virtual interface.  There's only one implementation so there's no need to go through a vtable for everything.
* Functionality offered by the class, is now reduced.  No support for looping (not clear if that was actually useful to users of that flag), no need to implement the 'read_only_' functionality in the class, since file APIs implement that already, no support for *not* managing the file handle (this wasn't used).  OpenFromFileHandle always "manages" the file.
* Delete the unused WriteText() method and don't support opening files in text mode.  Text mode is only different on Windows and on Windows it translates \n to \r\n, which means that files such as log files, could have a slightly different format on Windows than other platforms.  Besides, tools on Windows can handle UNIX line endings.
* Remove FileName(), change Trace code to manage its own path.
* Rename id_ member variable to file_.
* Removed the open_ member variable since the same functionality can be gotten from just checking the file pointer.
* Don't call CloseFile inside of Write.  Write shouldn't be changing the state of the class beyond just attempting to write.
* Remove concept of looping from FileWrapper and never close inside of Read()
* Changed stream base classes to inherit from a common base class instead of both defining the Rewind method. Ultimately, Id' like to remove these interfaces and just have FileWrapper.
* Remove read_only param from OpenFromFileHandle
* Renamed size_in_bytes_ to position_, since it gets set to 0 when Rewind() is called (and the size actually does not change).
* Switch out rw lock for CriticalSection. The r/w lock was only used for reading when checking the open_ flag.

BUG=

Review-Url: https://codereview.webrtc.org/2054373002
Cr-Commit-Position: refs/heads/master@{#13155}
2016-06-15 17:30:18 +00:00
minyue
b1963b403f Reland of Re-enable UBsan on AGC.
patchset #8 id:300001 of https://codereview.webrtc.org/2003623003/

This reverts commit 2b9423f7a18145255deb93f2505a4fd1c3fa9ad7.

BUG=webrtc:5530
TBR=peah@webrtc.org, kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2063643003
Cr-Commit-Position: refs/heads/master@{#13132}
2016-06-14 14:18:17 +00:00
kjellander
fb11424551 GN: Add modules_unittests
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
  * webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
  * webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.

NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
2016-06-13 07:19:53 +00:00
Åsa Persson
2b9423f7a1 Revert of Re-enable UBsan on AGC. (patchset #8 id:300001 of https://codereview.webrtc.org/2003623003/ )
Reason for revert:
Breaks bot.

Original issue's description:
> Re-enable UBsan on AGC.
>
> BUG=webrtc:5530
>
> Committed: https://crrev.com/293c86d67384c15f46b8296096a62a14b4a58d33
> Cr-Commit-Position: refs/heads/master@{#13034}

R=kjellander@webrtc.org, peah@webrtc.org
TBR=kjellander@webrtc.org, minyue@webrtc.org, peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5530

Review URL: https://codereview.webrtc.org/2056683002 .

Cr-Commit-Position: refs/heads/master@{#13096}
2016-06-10 07:12:43 +00:00
aluebs
e8f8f6037c Only update Intelligibility Enhancer gains every 10 chunks
This reduces its complexity by a factor of 2.7x total.
The mean error introduced by this is in the 6 different noise scenarios and 6 different speech signals tested is below -52dB.

Review-Url: https://codereview.webrtc.org/2035213002
Cr-Commit-Position: refs/heads/master@{#13072}
2016-06-08 16:53:23 +00:00
peah
bbe423312d Change name of files and class in agc/histogram* in order to avoid issue file-name clash in build files
The changes are done in several patches in order to make
the review easier.

NOTRY=True
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2051443002
Cr-Commit-Position: refs/heads/master@{#13068}
2016-06-08 13:42:08 +00:00
minyue
293c86d673 Re-enable UBsan on AGC.
BUG=webrtc:5530

Review-Url: https://codereview.webrtc.org/2003623003
Cr-Commit-Position: refs/heads/master@{#13034}
2016-06-03 13:07:41 +00:00