15 Commits

Author SHA1 Message Date
Alex Loiko
890988c9cb Run the ClangTidy analyser on the AudioProcessing submodule of WebRTC.
This CL contains automatically applied fixes suggested by the
ClangTidy analyzer (http://clang.llvm.org/extra/clang-tidy/). The
following kinds of fixes is present:

* renaming variables when the names in the method signature don't
  match the names in the method definition
  (ClangTidy:readability-inconsistent-declaration-parameter-name)

* ClangTidy:readability-container-size-empty,
  ClangTidy:misc-unused-using-decls,
  ClangTidy:performance-unnecessary-value-param,
  ClangTidy:readability-redundant-control-flow

This is a 'pilot' CL to check if automatic code analyzers can
feasibly be integrated into the WebRTC infrastructuve.

The renamings have been manually expected for consistency with 
surrounding code. In echo_cancellation.cc, I changed several names in
the function implementation to match the function declaration. The
tool suggested changing everything to match the function definitions
instead.

Bug: None
Change-Id: Id3b7ba18c51f15b025f26090c7bdcc642e48d8fd
Reviewed-on: https://chromium-review.googlesource.com/635766
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19630}
2017-08-31 12:53:44 +00:00
Edward Lemur
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
Henrik Kjellander
dca1e09db7 Revert "Update includes for webrtc/{base => rtc_base} rename (1/3)"
This reverts commit c8fa692ec44fd6ba4fa3d085ac3161a262fc18c5.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2964773002 .
Cr-Commit-Position: refs/heads/master@{#18872}
2017-07-01 14:42:25 +00:00
kjellander
c8fa692ec4 Update includes for webrtc/{base => rtc_base} rename (1/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
2017-06-30 21:02:00 +00:00
ivoc
1592c74d8a Add log message to help analyze why echo likelihood > 1.1
This CL adds a log message with the relevant part of the internal state of the echo detector to the text log when this unexpected scenario occurs.

BUG=b/38014838

Review-Url: https://codereview.webrtc.org/2883283002
Cr-Commit-Position: refs/heads/master@{#18185}
2017-05-17 16:53:02 +00:00
peah
94f6fa0526 Removed implicit divisions in the residual echo detector
This CL changes the updating of a loop index from using the modulus
operator to using a conditional, avoiding the divisions done in the
modulus operator which had a measurable impact on mpbile
platforms.

Additionally, there is a similar removal of another modulus operator, but the impact of that should be negligible.

BUG=webrtc:7666

Review-Url: https://codereview.webrtc.org/2882183004
Cr-Commit-Position: refs/heads/master@{#18168}
2017-05-16 14:25:06 +00:00
ivoc
860249ec62 Adds fuzzer for the residual echo detector.
This is a robustness test for the residual echo detector, that can help to detect numerical issues.

BUG=b/38014838

Review-Url: https://codereview.webrtc.org/2877803002
Cr-Commit-Position: refs/heads/master@{#18165}
2017-05-16 13:50:11 +00:00
peah
9e6a290c8d Moving the residual echo detector outside of band-scheme in APM
This CL moves the residual echo detector to reside outside of
the band-scheme in APM. The benefit of this is that the
residual echo detector will then no longer enforce the
band-splitting to be used when it is the only active component
inside APM.

This CL also introduces diagnostic dumping of data inside the
residual echo detector.

BUG=webrtc:6220, webrtc:6183

Review-Url: https://codereview.webrtc.org/2884593002
Cr-Commit-Position: refs/heads/master@{#18150}
2017-05-15 14:19:21 +00:00
ivoc
8f94cd3419 Prevent residual echo likelihood values greater than 1.0.
The residual echo likelihood should report a likelihood between 0.0 and 1.0. Currently it can happen that echo likelihoods > 1.0 are reported. As a temporary mitigation to stop this, this CL enforces a hard maximum of 1.0 for the echo likelihood while we investigate the issue further.

BUG=b/38014838

Review-Url: https://codereview.webrtc.org/2861123002
Cr-Commit-Position: refs/heads/master@{#18030}
2017-05-05 12:50:10 +00:00
ivoc
4e477a1d7b Added a new echo likelihood stat that reports the maximum value from a previous time period.
BUG=webrtc:6797

Review-Url: https://codereview.webrtc.org/2629563003
Cr-Commit-Position: refs/heads/master@{#16079}
2017-01-15 16:29:46 +00:00
kwiberg
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
ivoc
fbb374d8ed Add a reliability term to the echo detector.
This will ensure that the estimated likelihood starts at a low value and prevents initial spikes.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2503843004
Cr-Commit-Position: refs/heads/master@{#15131}
2016-11-17 14:19:54 +00:00
ivoc
ef6cbae756 Add UMA histogram for Echo likelihood.
The likelihood is logged as a percentage, with 100 bins in the histogram.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2487243002
Cr-Commit-Position: refs/heads/master@{#15025}
2016-11-10 16:21:47 +00:00
ivoc
af27ed01d7 Add algorithm for Residual Echo Detector.
This algorithm calculates an estimate of the Pearson product-moment correlation coefficient between the power of 10ms audio buffers taken from the render and capture sides, for various different delay values.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2419563003
Cr-Commit-Position: refs/heads/master@{#14824}
2016-10-28 14:04:08 +00:00
ivoc
9f4a4a096b Add empty residual echo detector.
This CL does not contain the actual algorithm, but only creates an empty processing component and connects the right signals to it. The algorithm will be added in a follow-up CL.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2405403003
Cr-Commit-Position: refs/heads/master@{#14820}
2016-10-28 12:39:23 +00:00