210 Commits

Author SHA1 Message Date
Alex Loiko
dc5fc82c62 Remove older AEC-dump interface.
This CL completely removes the methods
AudioProcessing::{Start,Stop}DebugDumpRecording. These methods have
been replaced with AudioProcessing::{Attach,Detach}AecDump. Their
implementation was removed in the parent CL
https://chromium-review.googlesource.com/c/589147

Bug: webrtc:7404
Change-Id: Ia3d5314985af9c74f79c94c514ded1f8afc78fb5
Reviewed-on: https://chromium-review.googlesource.com/589152
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19334}
2017-08-14 10:35:40 +00:00
Alex Loiko
7731bc829c Remove older AEC-dump implementation.
AudioProcessingModule has a feature to make a recording of its
configuration, inputs and outputs over a period of time. In the past
CLs, this feature has been rewritten to move file IO away from
real-time audio threads. The interface has changed from
{Start,Stop}DebugDumpRecording to {Attach,Detach}AecDump.

This CL removes the previous implementation of the old interface
StartDebugRecording. The public interface is left to not cause
problems to downstream projects. It will be removed in the dependent
CL https://chromium-review.googlesource.com/c/589152/

With this CL, usage of WEBRTC_AUDIOPROC_DEBUG_DUMP and ~300 LOC of
logging code is removed from AudioProcessingImpl.

Bug: webrtc:7404
Change-Id: I16e7b557774e4bc997e1f5de4f97ed2c31d63879
Reviewed-on: https://chromium-review.googlesource.com/589147
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19332}
2017-08-14 08:46:30 +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
peah
697a590314 Added the ability to adjust the AEC3 performance for large rooms
This CL exposes the parameter for adjusting the AEC3 performance
for large rooms.

Bug: webrtc:7519
Review-Url: https://codereview.webrtc.org/2967603002
Cr-Commit-Position: refs/heads/master@{#18862}
2017-06-30 14:06:10 +00:00
Per Åhgren
9aed31c24e Temporarily removed the analog gain change detection in AEC3
Due to the implementation of the analog AGC in the audio
processing module, the detection for the analog gain done in AEC3
fails on some platforms where there is no analog gain to control.

This CL removes that functionality until the AGC behavior has
been corrected.


Bug: webrtc:7910, chromium:738322
Change-Id: Ibdbe1e02252387dfd94b36ba7471f5c56ae27f48
Reviewed-on: https://chromium-review.googlesource.com/556040
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18850}
2017-06-30 10:27:56 +00:00
peah
a9cc40b7d2 Allow an external audio processing module to be used in WebRTC
[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]

Allow an external audio processing module to be used in WebRTC

This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.

As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.

BUG=webrtc:7775

Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
2017-06-29 15:32:09 +00:00
Per Åhgren
4bdced5d93 Corrected the initialization of the AEC3
This CL corrects the initialization of the AEC3, as well 
as for the other submodules in the whole audio processing module
in the sense that it properly update the submodule states also
for the case when reinitialization is trigger from the render
side of the audio processing module.

Bug: chromium:736889,webrtc:7879
Change-Id: I423e963835d0c3227caa8e186b29031bcb912515
Reviewed-on: https://chromium-review.googlesource.com/549315
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18784}
2017-06-27 14:43:03 +00:00
yujo
36b1a5fcec Add mute state field to AudioFrame and switch some callers to use it. Also make AudioFrame::data_ private and instead provide:
const int16_t* data() const;
int16_t* mutable_data();

- data() returns a zeroed static buffer on muted frames (to avoid unnecessary zeroing of the member buffer) and directly returns AudioFrame::data_ on unmuted frames.
- mutable_data(), lazily zeroes AudioFrame::data_ if the frame is currently muted, sets muted=false, and returns AudioFrame::data_.

These accessors serve to "force" callers to be aware of the mute state field, i.e. lazy zeroing is not the primary motivation.

This change only optimizes handling of muted frames where it is somewhat trivial to do so. Other improvements requiring more significant structural changes will come later.

BUG=webrtc:7343
TBR=henrika

Review-Url: https://codereview.webrtc.org/2750783004
Cr-Commit-Position: refs/heads/master@{#18543}
2017-06-12 19:45:32 +00:00
Per Åhgren
46537a3879 Avoiding cascaded software echo cancellers
This CL ensures that it is not possible to run several echo canceller
solutions in cascade inside the audio processing module.

Bug: webrtc:7776
Change-Id: I1777f97aeacb8cdf5c6c3be4bf13eefcde7d69fb
Reviewed-on: https://chromium-review.googlesource.com/527053
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18505}
2017-06-08 22:39:03 +00:00
aleloi
868f32f423 AudioProcessingModule has a feature to make a recording of its
configuration, inputs and outputs over a period of time. It is
activated by AudioProcessing::StartRecording. The data is stored in
binary protobuf format in a specified file. The file IO is, as of
this CL, done from the real-time audio thread.

This CL contains an interface for AecDump, a new APM submodule that
will handle the recordings. Calls to the new interface from the
AudioProcessingModule are added. These calls have no effect, and for a
short while, audio_processing_impl.cc will contain two copies of
recording calls.

The original calls are guarded by the WEBRTC_AUDIOPROC_DEBUG_DUMP
preprocessor define. They still have an effect, while the new ones do
not. In the following CLs, the old recording calls will be removed,
and an implementation of AecDump added.

The reasons for the refactoring is to move file IO operations from the
real-time audio thread, to add a top-level low-priority task queue for
logging tasks like this, to simplify and modularize audio_processing_impl.cc
and remove some of the preprocessor directives. These goals will be
archived by the upcoming CLs. The implementation is in
https://codereview.webrtc.org/2865113002.

BUG=webrtc:7404

Review-Url: https://codereview.webrtc.org/2778783002
Cr-Commit-Position: refs/heads/master@{#18233}
2017-05-23 14:20:05 +00:00
peah
23ac8b49f4 Preserve level controller output when no other effects are active
This CL ensures that the output of the level controller is kept
when no other submodules in APM are active

BUG=webrtc:7697,

Review-Url: https://codereview.webrtc.org/2902723002
Cr-Commit-Position: refs/heads/master@{#18230}
2017-05-23 12:33:56 +00:00
alessiob
3ec96df907 This CL introduces a new APM sub-module named AGC2 that does not use the band
split domain and only implements floating point operations (to avoid spectral
leakage issues and unnecessary complexity).

The goal of this CL is adding the new sub-module into APM without providing an
implementation that could replace the existing gain control modules. The focus
is in fact on initialization, reset, and configuration of AGC2.

The module itself only applies a hard-coded gain value. This behavior will
change in the coming CLs.

BUG=webrtc:7494

Review-Url: https://codereview.webrtc.org/2848593002
Cr-Commit-Position: refs/heads/master@{#18222}
2017-05-22 13:57:06 +00:00
peah
ce4d91527a Avoid render resampling when there is no need for render signal analysis.
This CL adjusts the render processing rate such to avoid resampling of the
render signal when that is not needed.
Note that to avoid acquiring more locks than needed, this should be achieved
during initialization.

BUG=webrtc:7667

Review-Url: https://codereview.webrtc.org/2887693002
Cr-Commit-Position: refs/heads/master@{#18207}
2017-05-19 08:28:05 +00:00
peah
52775841f0 Ensures the residual echo detector does not requiring band-splitting
This CL removes the residual echo detector from the list of
modules in APM that requires band-splitting.

BUG=webrtc:6220, webrtc:6183

Review-Url: https://codereview.webrtc.org/2884913002
Cr-Commit-Position: refs/heads/master@{#18164}
2017-05-16 13:14:09 +00:00
peah
edddac54bc Corrected the number of channels used when AEC3 is run on stereo input.
BUG=chromium:722343, webrtc:7519

Review-Url: https://codereview.webrtc.org/2883933003
Cr-Commit-Position: refs/heads/master@{#18158}
2017-05-16 08:08:58 +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
peah
103ac7e7d9 AEC3 Tuning changes.
This CL adds tuning to AEC3 for the purpose of reducing the impact of
gain changes in the analog microphone gain.

BUG=chromium:710818, webrtc:6018

Review-Url: https://codereview.webrtc.org/2811283003
Cr-Commit-Position: refs/heads/master@{#17673}
2017-04-12 12:40:55 +00:00
peah
6799553a2c Add information about microphone gain changes to AEC3
Changes in the microphone gain are effecting the AEC in the sense
that each change in the microphone gain is a change in the echo
path seen by the AEC. This CL utilizes the ability of AEC3 to
leverage information about known changes in the analog microphone
gain.

BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2808073002
Cr-Commit-Position: refs/heads/master@{#17625}
2017-04-10 21:12:41 +00:00
peah
2ce640fada Fixing sample-rate dependent band-split filter issues in AEC3
This CL ensures that the number of bands
for the render side matches that for the capture side
when AEC3 is active. Without this, there was problems
when the render rate is different from the capture rate.

BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2800033003
Cr-Commit-Position: refs/heads/master@{#17586}
2017-04-07 10:57:48 +00:00
mbonadei
7c2c8438f1 Reland of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #1 id:1 of https://codereview.webrtc.org/2786363002/ )
Reason for revert:
Trying to re-land after solving some related issues.

There are no changes compared to the original CL.

Original issue's description:
> Revert of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #16 id:300001 of https://codereview.webrtc.org/2747863003/ )
>
> Reason for revert:
> I will try to reland next week because it is causing some problems.
>
> Original issue's description:
> > To accommodate some downstream WebRTC users we need to loosen
> > the coupling between our code and the //third_party/protobuf.
> >
> > This includes using typedefs to define strings instead of
> > assuming std::string.
> >
> > After this refactoring it will be possible to link with other
> > protobuf implementations than the current one.
> >
> > We moved the PRESUBMIT check to another CL [1]. The goal of this
> > presubmit is to avoid the direct usage of google::protobuf outside
> > of the webrtc/base/protobuf_utils.h header file.
> >
> > [1] - https://codereview.webrtc.org/2753823003/
> >
> > BUG=webrtc:7340
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2747863003
> > Cr-Commit-Position: refs/heads/master@{#17466}
> > Committed: 16ab93b952
>
> TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7340
>
> Review-Url: https://codereview.webrtc.org/2786363002
> Cr-Commit-Position: refs/heads/master@{#17483}
> Committed: d00aad5eb2

TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340
NOTRY=True

Review-Url: https://codereview.webrtc.org/2791963003
Cr-Commit-Position: refs/heads/master@{#17584}
2017-04-07 07:59:12 +00:00
peah
cf02cf13a7 Major AEC3 render pipeline changes
This CL adds major render pipeline changes to the AEC3 code. The reason
for these are that
1) It allows the echo removal unit to receive information about the content
in bands beyond band 0, thereby allowing removal of high-frequency
echoes
2) It allows more controlled handling of the render buffers, allowing proper
buffer behaviour during capture glitches and clock-drift.

Unfortunately, the render pipeline caused a lot of related changes in much
of the rest of the AEC3 files. Most of these are, however, caused by
a change of class name.

Another unfortunate effect of this CL, is that a number of unittest cease to
compile. I chose to temporarily solve that by removing them from the
build using #if/#endif. The reason for that is that those will anyway again
need to be changed in the next review, and doing like this avoids them
having to be reviewed twice.

BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2784023002
Cr-Commit-Position: refs/heads/master@{#17547}
2017-04-05 21:18:07 +00:00
nisse
368f5cf27e Replace use of system_wrappers/include/logging.h by base/logging.h.
BUG=webrtc:5118

Review-Url: https://codereview.webrtc.org/2781343002
Cr-Commit-Position: refs/heads/master@{#17539}
2017-04-05 12:00:33 +00:00
mbonadei
d00aad5eb2 Revert of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #16 id:300001 of https://codereview.webrtc.org/2747863003/ )
Reason for revert:
I will try to reland next week because it is causing some problems.

Original issue's description:
> To accommodate some downstream WebRTC users we need to loosen
> the coupling between our code and the //third_party/protobuf.
>
> This includes using typedefs to define strings instead of
> assuming std::string.
>
> After this refactoring it will be possible to link with other
> protobuf implementations than the current one.
>
> We moved the PRESUBMIT check to another CL [1]. The goal of this
> presubmit is to avoid the direct usage of google::protobuf outside
> of the webrtc/base/protobuf_utils.h header file.
>
> [1] - https://codereview.webrtc.org/2753823003/
>
> BUG=webrtc:7340
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2747863003
> Cr-Commit-Position: refs/heads/master@{#17466}
> Committed: 16ab93b952

TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340

Review-Url: https://codereview.webrtc.org/2786363002
Cr-Commit-Position: refs/heads/master@{#17483}
2017-03-31 10:08:07 +00:00
mbonadei
16ab93b952 To accommodate some downstream WebRTC users we need to loosen
the coupling between our code and the //third_party/protobuf.

This includes using typedefs to define strings instead of
assuming std::string.

After this refactoring it will be possible to link with other
protobuf implementations than the current one.

We moved the PRESUBMIT check to another CL [1]. The goal of this
presubmit is to avoid the direct usage of google::protobuf outside
of the webrtc/base/protobuf_utils.h header file.

[1] - https://codereview.webrtc.org/2753823003/

BUG=webrtc:7340
NOTRY=True

Review-Url: https://codereview.webrtc.org/2747863003
Cr-Commit-Position: refs/heads/master@{#17466}
2017-03-30 08:24:20 +00:00
ivoc
9c192b2b06 Added locking when getting echo likelihood stats.
Currently no lock is taken when returning echo likelihood stats, which causes a race condition between the thread getting the stats and the thread running the echo detector. This CL resolves the issue by adding locking.

BUG=webrtc:7346

Review-Url: https://codereview.webrtc.org/2749973003
Cr-Commit-Position: refs/heads/master@{#17270}
2017-03-16 11:22:14 +00:00
peah
522d71bf36 Finalization of the first version of EchoCanceller 3
This CL adds the remaining code for the first version of EchoCanceller3.

TBR=aleloi@webrtc.org
BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2678423005
Cr-Commit-Position: refs/heads/master@{#16801}
2017-02-23 13:16:26 +00:00
peah
61202ac2ea Ensure that AEC3 is not run in tandem with AEC2
AEC3 and AEC2 are separate submodules in APM. This CL ensures that AEC3
deactivates AEC2 if both are active at the same time.

BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2675863004
Cr-Commit-Position: refs/heads/master@{#16443}
2017-02-06 11:39:42 +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
peah
1b08dc33eb To verify the upcoming code changes it is required
that the level of the output in the audio processing
module is monitored. This CL adds that.

BUG=webrtc:6181, webrtc:6183, webrtc:6220

Review-Url: https://codereview.webrtc.org/2549143004
Cr-Commit-Position: refs/heads/master@{#15718}
2016-12-20 21:45:58 +00:00
peah
e0eae3cec6 This CL adds the basic framework for AEC3 in the audio processing module.
It will be followed by a number of other CLs that extends this framework.

BUG=webrtc:6018

Review-Url: https://codereview.webrtc.org/2567513003
Cr-Commit-Position: refs/heads/master@{#15593}
2016-12-14 09:16:28 +00:00
henrik.lundin
45bb5130b0 Reland of APM: Change 3 UMA metrics to fewer but linearly distributed buckets (patchset #1 id:1 of https://codereview.webrtc.org/2548333002/ )
Reason for revert:
The downstream problem is now fixed, and this should be good to land again.

Original issue's description:
> Revert of APM: Change 3 UMA metrics to fewer but linearly distributed buckets (patchset #2 id:20001 of https://codereview.webrtc.org/2547593002/ )
>
> 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
>
> Committed: https://crrev.com/63407a9b6ae6f3fc096e01d64e46c6d21d86b517
> Cr-Commit-Position: refs/heads/master@{#15420}

TBR=peah@webrtc.org,rkaplow@chromium.org
BUG=webrtc:6622
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.webrtc.org/2551863003
Cr-Commit-Position: refs/heads/master@{#15442}
2016-12-06 12:28:10 +00:00
henrik.lundin
bd681b9758 AGC: Route clipping parameter from webrtc::Config to AGC
This change enables experimentation with the clipping minimum level
parameter in the gain control.

BUG=webrtc:6622
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.webrtc.org/2543753006
Cr-Commit-Position: refs/heads/master@{#15426}
2016-12-05 17:08:46 +00:00
henrik.lundin
63407a9b6a Revert of APM: Change 3 UMA metrics to fewer but linearly distributed buckets (patchset #2 id:20001 of https://codereview.webrtc.org/2547593002/ )
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}
2016-12-05 13:11:36 +00:00
henrik.lundin
49715fe3be 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

Review-Url: https://codereview.webrtc.org/2547593002
Cr-Commit-Position: refs/heads/master@{#15418}
2016-12-05 12:13:05 +00:00
henrik.lundin
290d43aa14 Add a new UMA metric in APM to track incoming capture-side audio level
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}
2016-11-29 16:09:17 +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
peah
8271d04009 This CL introduces the new functionality for setting
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}
2016-11-22 15:24:59 +00:00
ivoc
20270be807 Make sure that multiband processing is active when the residual echo detector is active.
BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2481363008
Cr-Commit-Position: refs/heads/master@{#15081}
2016-11-15 13:24:41 +00:00
ivoc
87d1a78754 Add support to audioproc_f for running the residual echo detector and producing an echo likelihood graph.
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}
2016-11-14 15:55:09 +00:00
ivoc
d0a151c698 Update default values for APM stats to match old behavior.
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}
2016-11-02 16:14:42 +00:00
ivoc
3e9a537601 Original CL: https://codereview.webrtc.org/2433153003/, commit 8b8d3e4c30e8ea3846b58dfd36d1fd35a7799df4.
Revert CL: https://codereview.webrtc.org/2456333002/, commit 48dfab5c58119a4e65c52506ed55f8de79725bcf.

The new function on the APM interface is no longer pure virtual.

BUG=webrtc:6525
TBR=solenberg@webrtc.org,peah@webrtc.org

Review-Url: https://codereview.webrtc.org/2458993002
Cr-Commit-Position: refs/heads/master@{#14827}
2016-10-28 14:55:39 +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
ivoc
48dfab5c58 Revert of New statistics interface for APM (patchset #11 id:200001 of https://codereview.webrtc.org/2433153003/ )
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}
2016-10-28 10:29:37 +00:00
peah
135259ac8f In order to be able to analyze the AGC behavior on
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}
2016-10-28 10:12:15 +00:00
ivoc
8b8d3e4c30 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

Review-Url: https://codereview.webrtc.org/2433153003
Cr-Commit-Position: refs/heads/master@{#14810}
2016-10-28 08:32:24 +00:00
peah
701d628f5f Moved the AGC render sample queue into the audio processing module
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}
2016-10-25 12:42:25 +00:00
peah
a062460a68 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 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}
2016-10-25 11:45:32 +00:00
peah
764e364933 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 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}
2016-10-22 12:04:35 +00:00