Reason for revert:
Breaks down-stream dependencies.
Original issue's description:
> APM: Change 3 UMA metrics to fewer but linearly distributed buckets
>
> In this change WebRTC.Audio.ApmCaptureInputLevel{Average,Peak} are
> changed to 64 buckets, while WebRTC.Audio.AgcLevel is changed to 50
> buckets. All three are changed to have linear spacing between buckets.
>
> Also, the metrics are renamed to avoid stats conflicts because of different bucket schemes:
> - WebRTC.Audio.AgcLevel -> WebRTC.Audio.AgcSetLevel
> - WebRTC.Audio.ApmCaptureInputLevelAverage -> WebRTC.Audio.ApmCaptureInputLevelAverageRms
> - WebRTC.Audio.ApmCaptureInputLevelPeakRms -> WebRTC.Audio.ApmCaptureInputLevelPeakRms
>
> BUG=webrtc:6622
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
>
> Committed: https://crrev.com/49715fe3be17d8579586d5bc954d626126d53415
> Cr-Commit-Position: refs/heads/master@{#15418}
TBR=peah@webrtc.org,rkaplow@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6622
Review-Url: https://codereview.webrtc.org/2548333002
Cr-Commit-Position: refs/heads/master@{#15420}
In this change WebRTC.Audio.ApmCaptureInputLevel{Average,Peak} are
changed to 64 buckets, while WebRTC.Audio.AgcLevel is changed to 50
buckets. All three are changed to have linear spacing between buckets.
Also, the metrics are renamed to avoid stats conflicts because of different bucket schemes:
- WebRTC.Audio.AgcLevel -> WebRTC.Audio.AgcSetLevel
- WebRTC.Audio.ApmCaptureInputLevelAverage -> WebRTC.Audio.ApmCaptureInputLevelAverageRms
- WebRTC.Audio.ApmCaptureInputLevelPeakRms -> WebRTC.Audio.ApmCaptureInputLevelPeakRms
BUG=webrtc:6622
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
Review-Url: https://codereview.webrtc.org/2547593002
Cr-Commit-Position: refs/heads/master@{#15418}
This CL adds WebRTC.Audio.ApmCaptureInputLevelAverage and
WebRTC.Audio.ApmCaptureInputLevelPeak. The metrics are updated once
every 10 seconds.
BUG=webrtc:6622
Review-Url: https://codereview.webrtc.org/2534473004
Cr-Commit-Position: refs/heads/master@{#15300}
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}
the APM parameters to the high-pass filter.
The introduction will be done in three steps:
1) This CL which introduces the new scheme and
changes the code in webrtcvoiceengine.cc to use it.
2) Introduce the scheme into upstream code.
3) Remove the HighPassFilter interface in APM.
BUG=webrtc::6220, webrtc::6296, webrtc::6297, webrtc::6181, webrtc::5298
Review-Url: https://codereview.webrtc.org/2415403002
Cr-Commit-Position: refs/heads/master@{#15197}
This adds two command-line flags to audioproc_f: -red and -red_graph, which can be used to enable/disable the RED, and to set the output path for the graph. The graph is generated as a python script that depends on matplotlib and numpy to display the graph.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2486763002
Cr-Commit-Position: refs/heads/master@{#15069}
In the new APM statistics interface, the default values did not match those previously used in AudioSendStream::Stats.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2469783002
Cr-Commit-Position: refs/heads/master@{#14896}
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}
Reason for revert:
This CL breaks internal dependencies.
Original issue's description:
> New statistics interface for APM
>
> This adds functions to enable and retrieve statistics from APM. These functions are not yet called, which will happen in a follow-up CL.
>
> BUG=webrtc:6525
>
> Committed: https://crrev.com/8b8d3e4c30e8ea3846b58dfd36d1fd35a7799df4
> Cr-Commit-Position: refs/heads/master@{#14810}
TBR=peah@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2456333002
Cr-Commit-Position: refs/heads/master@{#14814}
aecdump recordings in an efficient manner, it is
important to be able to use a standardized analysis
script. For this to be feasible, data log points should
be present.
This CL adds those logpoints as well as the framework
needed to for those to work.
BUG=webrtc:6564
Review-Url: https://codereview.webrtc.org/2457783003
Cr-Commit-Position: refs/heads/master@{#14812}
This adds functions to enable and retrieve statistics from APM. These functions are not yet called, which will happen in a follow-up CL.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2433153003
Cr-Commit-Position: refs/heads/master@{#14810}
Several subcomponents inside APM copy render audio from
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.
This CL moves the the AGC functionality for this into
APM.
BUG=webrtc:5298, webrtc:6540
Review-Url: https://codereview.webrtc.org/2444283002
Cr-Commit-Position: refs/heads/master@{#14770}
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.
This CL moves the the AECM functionality for this into
APM.
BUG=webrtc:5298, webrtc:6540
Review-Url: https://codereview.webrtc.org/2444793005
Cr-Commit-Position: refs/heads/master@{#14768}
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.
This CL moves the the AEC functionality for this into
APM.
BUG=webrtc:5298, webrtc:6540
Review-Url: https://codereview.webrtc.org/2427553003
Cr-Commit-Position: refs/heads/master@{#14726}
to the functionality in the audio processing module.
Therefore, it should be a pure interface.
This CL ensures that is the case.
BUG=webrtc:6515
Review-Url: https://codereview.webrtc.org/2406193002
Cr-Commit-Position: refs/heads/master@{#14608}
receive a signal level to use initially, instead of the
default initial signal level.
The initial form of the CL
(https://codereview.webrtc.org/2254973003/) was reverted
due to down-stream dependencies. These have been resolved,
but the CL needed to be revised according to the new scheme
for passing parameters to the audio processing module.
Therefore, please review this CL as if it is new.
TBR=aleloi@webrtc.org
BUG=webrtc:6386
Review-Url: https://codereview.webrtc.org/2337083002
Cr-Commit-Position: refs/heads/master@{#14579}
Before this CL, the IntelligibilityEnhancer introduced a processing delay to the lower band, without compensating for it in the higher bands. This CL corrects this.
BUG=b/30780909
R=henrik.lundin@webrtc.org, peah@webrtc.org
Review URL: https://codereview.webrtc.org/2320833002 .
Cr-Commit-Position: refs/heads/master@{#14311}
methods inside the audio processing module for the purpose of
increasing code readability.
BUG=
Review-Url: https://codereview.webrtc.org/2335633002
Cr-Commit-Position: refs/heads/master@{#14269}
This requires marking a bunch of compile-time constants "constexpr"
instead of just "const".
Review-Url: https://codereview.webrtc.org/2335483003
Cr-Commit-Position: refs/heads/master@{#14199}
behavior of the audio processing module is quite complex and hard to
implement in a threadsafe and efficient manner. Therefore a new
scheme for setting the parameters in the audio processing module is
introduced in this CL.
The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.
TBR=henrik.lundin@webrtc.org, solenberg@webrtc.org,
BUG=webrtc:5298
Review-Url: https://codereview.webrtc.org/2338493002
Cr-Commit-Position: refs/heads/master@{#14190}
Reason for revert:
Interface change in the mock breaks downstream code.
Original issue's description:
> The current scheme for setting parameters and specifying the behavior
> of the audio processing module is quite complex and hard to implement
> in a threadsafe and efficient manner. Therefore a new scheme for setting
> the parameters in the audio processing module is introduced in this CL.
>
> The idea is to roll this scheme out gradually and as a first functionality
> in the audio processing module where this is applied the level controller
> was chosen. This CL includes the replacement of the Config-based
> level controller scheme with the new scheme.
>
> BUG=webrtc:5298
>
> Committed: https://crrev.com/c8bbe3fe9aad9e9a1189a42dcaa8f5d6c261ecc8
> Cr-Commit-Position: refs/heads/master@{#14171}
TBR=solenberg@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org
BUG=webrtc:5298
NOTRY=True
Review-Url: https://codereview.webrtc.org/2334583002
Cr-Commit-Position: refs/heads/master@{#14177}
functionalities doing sample-rate conversions:
-The implicit resampling done in the AudioBuffer CopyTo,
CopyFrom, InterleaveTo and DeinterleaveFrom methods.
-The multi-band splitting scheme.
The selection of rates in these have been difficult and
complicated, partly due to that the APM API which allows
for activating the APM submodules without notifying
the APM.
This CL adds functionality that for each capture frame
polls all submodules for whether they are active or not
and compares this against a cached result.
Furthermore, new functionality is added that based on the
results of the comparison do a reinitialization of the APM.
This has several advantages
-The code deciding on whether to analysis and synthesis is
needed for the bandsplitting can be much simplified and
centralized.
-The selection of the processing rate can be done such as
to avoid the implicit resampling that was in some cases
unnecessarily done.
-The optimization for whether an output copy is needed
that was done to improve performance due to the implicit
resampling is no longer needed, which simplifies the
code and makes it less error-prone in the sense that
is no longer neccessary to keep track of whether any
module has changed the signal.
Finally, it should be noted that the polling of the state
for all the submodules was done previously as well, but in
a less obvious and distributed manner.
BUG=webrtc:6181, webrtc:6220, webrtc:5298, webrtc:6296, webrtc:6298, webrtc:6297
Review-Url: https://codereview.webrtc.org/2304123002
Cr-Commit-Position: refs/heads/master@{#14175}
of the audio processing module is quite complex and hard to implement
in a threadsafe and efficient manner. Therefore a new scheme for setting
the parameters in the audio processing module is introduced in this CL.
The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.
BUG=webrtc:5298
Review-Url: https://codereview.webrtc.org/2292863002
Cr-Commit-Position: refs/heads/master@{#14171}
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}
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}
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}
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}
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}
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}
The first approach landed here: https://codereview.webrtc.org/1773173002
But it was partially reverted, because it affected the AEC performance, here: https://codereview.webrtc.org/1867483003/
The main difference of this approach is that it doesn't use the 3-band splitting filter in the reverse stream, which seems to be the culprit of the AEC regression.
Also, the 2-band splitting filter has been used for the 32kHz case for a long time without any problem, and this is expanded in the CL to cover the 48kHz case as well.
BUG=webrtc:5725
TBR=tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1865633005
Cr-Commit-Position: refs/heads/master@{#12451}
are active in the module and its submodules.
BUG=webrtc:5778, webrtc:5777
Review URL: https://codereview.webrtc.org/1886233003
Cr-Commit-Position: refs/heads/master@{#12371}
Support for reading the newly added fields will be added in a another CL.
BUG=webrtc:5759, webrtc:5724
Review URL: https://codereview.webrtc.org/1878533002
Cr-Commit-Position: refs/heads/master@{#12316}
rate that is higher than the specified rate, and not
the closest native rate the need for a name change has been
raised. This CL addresses that.
BUG=webrtc:5298
Review URL: https://codereview.webrtc.org/1863023002
Cr-Commit-Position: refs/heads/master@{#12302}
that can be called from the render side without making APM
singlethreaded.
This CL is addressing the problems with high render-side
call duration that were triggered by the CL
https://codereview.webrtc.org/1844583003
BUG=webrtc:5736
Review URL: https://codereview.webrtc.org/1859243002
Cr-Commit-Position: refs/heads/master@{#12266}
were added in https://codereview.webrtc.org/1773173002.
The reason for the revert is that for some scenarios
that CL causes problems in the coherence estimate used
in the AEC, which in turn causes echo leakage.
The reason for not reverting the actual CL is that
it would cause subsequent CLs to be reverted as well.
Therefore the choice was made to in this CK
instead revert the effects of that CL.
With the changes in this CL, the behavior is bitexact
to what it was before the CL mentioned above.
TBR=aluebs@webrtc.org
BUG=webrtc:5725
Review URL: https://codereview.webrtc.org/1867483003
Cr-Commit-Position: refs/heads/master@{#12259}