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}
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}
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}
Also added IntelligibilityEnhancer setting to aecdump simulator in audioproc_f
Review-Url: https://codereview.webrtc.org/2075093003
Cr-Commit-Position: refs/heads/master@{#13220}
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}
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}
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}
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}
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}
This makes the GN configurations easier to read.
BUG=webrtc:5949
NOTRY=True
Review-Url: https://codereview.webrtc.org/2020343003
Cr-Commit-Position: refs/heads/master@{#13006}
tool to support all the functionality needed for simulating
and analyzing the audio processing module behavior during
calls.
BUG=
Review-Url: https://codereview.webrtc.org/1907223003
Cr-Commit-Position: refs/heads/master@{#12882}
There were a series of changes in the calculation of echo metrics. There changes made the existing unittests lose, e.g., EXPECT_EQ become EXPECT_NEAR. It is good time to protect the echo calculation more strictly.
The change is not simply generating a new reference file and change EXPECT_NEAR to EXPECT_EQ. It strengthens the test as well. Main changes are
1. the old test only sample a metric at the end of processing, while the new test takes metrics during the call with a certain time interval. This gives a much stronger protection.
2. added protection of a newly added metric, called divergent_filter_fraction.
3. as said, use EXPECT_EQ (actually ASSERT_EQ) instead of EXPECT_NEAR as much as possible, even for float point values. This may be too restrictive. But it can be good to be restrictive at the beginning.
BUG=
Review-Url: https://codereview.webrtc.org/1969403003
Cr-Commit-Position: refs/heads/master@{#12871}
This change adds a UMA log that will be written to when a non-zero delay
correction is done in the AEC. The number of elements moved (positive or
negative) will be logged to
"WebRTC.Audio.AecDelayAdjustmentAgnosticValue" or
"WebRTC.Audio.AecDelayAdjustmentSystemValue", depending on whether
delay-agnostic AEC is used or not, respectively.
BUG=webrtc:5903
Review-Url: https://codereview.webrtc.org/1991723002
Cr-Commit-Position: refs/heads/master@{#12795}
Chrome does not detect NEON instruction set at runtime in WebRTC code starting
with M50, which is now in Stable. Remove support for runtime detection for
simplicity.
The only remaining piece of Chrome that will continue to depend on runtime
detection is /net, where devices with _broken_ neon support are also detected,
and it is not configurable via GYP/GN.
BUG=522035
NOPRESUBMIT=true
Review-Url: https://codereview.webrtc.org/1955413003
Cr-Commit-Position: refs/heads/master@{#12778}
This CL will be followed with other CLs that break apart
the application of the comfort noise from the comfort
noise generation.
The changes in the CL are very close to bitexaxt. The
bitinexactness is caused by differences in numerical
behavior when bundling the spectral band power and the
noise scaling based on the NLP gain.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1958933002
Cr-Commit-Position: refs/heads/master@{#12713}
a separate method.
This CL will be followed by other CLs that simplify this method and break out the state specific to this computation
into a separate substate.
The changes are bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1963493003
Cr-Commit-Position: refs/heads/master@{#12712}
Added conditional updating of the statistics and the delay estimate so that
updates are only done when the farend is non-stationary.
The reason for this is that all the values that go into the updating of the
statistics, and that in turn are also used to update the delay, are frozen
when the farend signal is non-stationary. Therefore, when the farend signal
is silent (stationary), the last estimates present before the silent (stationary)
period began are used to continue to update the statistics. This is a problem as
the updating is done in a manner that assumes that the estimates continue
to be updated.
This CL conditions the updating based on stationarity instead of silence
as both are treated in the same manner in the delay agnostic AEC.
This makes sense theoretically as the delay agnostic AEC operates on
analyzing power deviations (in bands) from a slowly updated average power and
therefore for a stationary signal will have no such deviations to base its analysis
on.
BUG=webrtc:5875, chromium:576624
NOTRY=True
Review-Url: https://codereview.webrtc.org/1967033002
Cr-Commit-Position: refs/heads/master@{#12700}
files.
The purpose of this CL is to simplify upcoming AEC algorithm
changes.
The changes should be bitexact.
The presubmit was bypassed due to a presubmit complaint
about usage of short instead of int16_t which will be
addressed in upcoming CLs.
BUG=webrtc:5298, webrtc:5201
NOPRESUBMIT=true
Review-Url: https://codereview.webrtc.org/1949803004
Cr-Commit-Position: refs/heads/master@{#12662}
method in the AEC into two methods.
This CL is step towards simplifying the AEC code, making it
more modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1943753002
Cr-Commit-Position: refs/heads/master@{#12656}
method in the AEC.
This CL is step towards simplifying the AEC code, making it
more modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1943193002
Cr-Commit-Position: refs/heads/master@{#12655}
This CL is step towards simplifying the AEC code, making it more
modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1936203002
Cr-Commit-Position: refs/heads/master@{#12654}
theAEC. The reason for this is that this optimized method hinders any
refactoring of the code. In particular, it is not possible to separate
the application of the echo suppressor gain from the gain computation
and the comfort noise generation as all of these are partly included
in this method.
This CL is step towards simplifying the AEC code, making it more
modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1942853002
Cr-Commit-Position: refs/heads/master@{#12653}
This CL is step towards simplifying the AEC code, making it more modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1936173002
Cr-Commit-Position: refs/heads/master@{#12652}
the file content to echo_cancellation.h.
The purpose of this CL is to simplify upcoming AEC algorithm
changes.
The changes should be bitexact.
BUG=webrtc:5298, webrtc:5201
Review-Url: https://codereview.webrtc.org/1947743004
Cr-Commit-Position: refs/heads/master@{#12638}
state as an input to OverdriveAndSuppress in the AEC.
This CL is step towards simplifying the AEC code, making it more
modifiable and modular.
The changes should be bitexact.
BUG=webrtc:5201, webrtc:5298
Review-Url: https://codereview.webrtc.org/1939723002
Cr-Commit-Position: refs/heads/master@{#12616}
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}
Although the algorithm should generate the optimal gains, these limits are in place so that it doesn't go bananas in extreme noise situations or if there are some errors on the noise estimate. The limits were chosen as the extreme values from recordings with -3dB SNR, which is the minimum where the POLQA metric increases when processed.
Review-Url: https://codereview.webrtc.org/1925933002
Cr-Commit-Position: refs/heads/master@{#12550}
The render signal that reaches the IE is already normalized and compressed by an AGC on the far-end capture processing. Because the noise estimation is done before the AGC compression, we need to compensate for this gain in the IE to be able to compare these 2 powers.
Review-Url: https://codereview.webrtc.org/1913603002
Cr-Commit-Position: refs/heads/master@{#12549}