Commit Graph

185 Commits

Author SHA1 Message Date
470c0887b3 Fix modules_unittests on iOS.
Some of the module tests were failing on iOS, causing them to be ignored
on the trybots. Specifically this CL:
- Skips some tests that should not run on the simulator
- Fixes iOS file system test helpers
- Fixes failing nalu parser unittest

BUG=webrtc:4752
R=henrika@webrtc.org, peah@webrtc.org, sprang@webrtc.org
TBR=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14472}
2016-10-03 11:13:33 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
2dc4cdeea7 Correcting the enabling of the level controller in the audio processing simulator
BUG=

Review-Url: https://codereview.webrtc.org/2337133005
Cr-Commit-Position: refs/heads/master@{#14247}
2016-09-16 07:01:39 +00:00
88ac853e14 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.

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}
2016-09-12 23:47:32 +00:00
10f606d8de Revert of Introduced new scheme for controlling the functionality inside the audio processing module (patchset #12 id:260001 of https://codereview.webrtc.org/2292863002/ )
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}
2016-09-12 06:04:37 +00:00
c8bbe3fe9a 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

Review-Url: https://codereview.webrtc.org/2292863002
Cr-Commit-Position: refs/heads/master@{#14171}
2016-09-09 21:17:07 +00:00
88499ecaca Moving/renaming webrtc/common.h.
This file defines webrtc::Config which was mostly used by modules/audio_processing. The files webrtc/common.h, webrtc/common.cc and webrtc/test/common_unittests.cc are moved to modules/audio_processing and the few remaining uses of webrtc::Config are replaced with simpler code.

- For NetEq and pacing configuration, a VoEBase::ChannelConfig is passed to VoEBase::CreateChannel().
- Removes the need for VoiceEngine::Create(const Config& config). No need to store the webrtc::Config in VoE shared state.

BUG=webrtc:5879

Review-Url: https://codereview.webrtc.org/2307533004
Cr-Commit-Position: refs/heads/master@{#14109}
2016-09-07 14:34:45 +00:00
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
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
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
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
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
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
60a189f1bf This CL updates and extends the audioproc_f command line
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}
2016-05-25 03:54:46 +00:00
58530ed246 Updating APM unittests on the echo metrics.
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}
2016-05-24 12:50:29 +00:00
c9b0c26e0c Surface the IntelligibilityEnhancer on MediaConstraints
R=henrika@webrtc.org, peah@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12763}
2016-05-16 22:32:45 +00:00
d28db7fd65 Delete all use of tick_util.h.
Depends on Chrome cl https://codereview.chromium.org/1888003002/, which was landed some time ago.

BUG=webrtc:5740
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12674}
2016-05-10 14:31:58 +00:00
c7a6569713 Revert of Disable failing modules_unittests for UBSan. (patchset #1 id:40001 of https://codereview.webrtc.org/1915813002/ )
Reason for revert:
Fix upstream should've landed in our repository.

Original issue's description:
> Disable failing modules_unittests for UBSan.
>
> BUG=webrtc:5820
> TBR=pbos@webrtc.org
>
> Committed: https://crrev.com/c23bf2e54d922486254cdd7657aafceaa958ce25
> Cr-Commit-Position: refs/heads/master@{#12482}

TBR=kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5820

Review-Url: https://codereview.webrtc.org/1937153002
Cr-Commit-Position: refs/heads/master@{#12647}
2016-05-06 19:50:08 +00:00
84be511ac0 Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
(This is a re-land of https://codereview.webrtc.org/1921233002, which
got reverted for breaking Chromium.)

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12522}
2016-04-27 08:20:08 +00:00
52d4e6bf5e Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (patchset #1 id:40001 of https://codereview.webrtc.org/1921233002/ )
Reason for revert:
Fails on Chromium FYI bots.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/5392/

Original issue's description:
> Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
>
> BUG=webrtc:5520
>
> Committed: https://crrev.com/2c27a062ee46258abe9facc2cceee74f09bf6a99
> Cr-Commit-Position: refs/heads/master@{#12511}

TBR=tommi@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:5520

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

Cr-Commit-Position: refs/heads/master@{#12513}
2016-04-26 16:32:09 +00:00
2c27a062ee Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12511}
2016-04-26 15:38:03 +00:00
c23bf2e54d Disable failing modules_unittests for UBSan.
BUG=webrtc:5820
TBR=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12482}
2016-04-25 04:43:20 +00:00
0332c2db39 Added support in the AEC for refined filter adaptation.
The following algorithmic functionality was added:
-Add support for an exact regressor power to be computed
 which avoids the issue with the updating of the filter
 sometimes being unstable.
-Lowered the fixed step size of the adaptive filter to 0.05
 which significantly reduces the sensitivity of the
 adaptive filter to near-end noise, nonlinearities,
 doubletalk and the unmodelled echo path tail. It also
 reduces the tracking speed of the adaptive filter but the
 chosen value proved to give a sufficient tradeoff for the
 requirements on the adaptive filter.

To allow the new functionality to be selectively applied the following was done:
-A new Config was added for selectively activating the functionality.
-Functionality was added in the audioprocessing  and echocancellationimpl classes
 for passing the activation of the functionality down to the AEC algorithms.

To make the code for the introduction of the functionality clean,
the following refactoring was done:
-The selection of the step size was moved to a single place.
-The constant for the step size of the adaptive filter in extended filter mode was
 made local.
-The state variable storing the step-size was renamed to a more describing name.

When the new functionality is not activated, the changes
have been tested for bitexactness on Linux.

TBR=minyue@webrtc.org
BUG=webrtc:5778, webrtc:5777

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

Cr-Commit-Position: refs/heads/master@{#12384}
2016-04-15 18:23:36 +00:00
7789fe7ab1 Added a protobuf field for the audio processing module to store the status of temporary experimental features that
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}
2016-04-15 08:19:47 +00:00
3eeb2e89b3 Moved the audioprocessing unittest to the audio_processing folder
where the other audioprocessing unittests are located.

BUG=webrtc:5298

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

Cr-Commit-Position: refs/heads/master@{#12343}
2016-04-13 11:10:09 +00:00
0bf612b3ec This CL is partially reverting the effects that
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}
2016-04-06 09:47:52 +00:00
2a5609de14 Increase kHasVoiceCountNear by one in audio_processing_unittest
I added more test cases here: https://codereview.webrtc.org/1862553002/
But one of these cases failed on Android64 Tests.
I am increasing a tolerance by 1 to make this test pass.

TBRing this, since the bot is red and it is a small fix.

TBR=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12250}
2016-04-06 01:16:59 +00:00
40cbec5415 Fix the number of frames used when interleaving in AudioBuffer::InterleaveTo()
R=henrik.lundin@webrtc.org, peah@webrtc.org
TBR=tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12249}
2016-04-06 00:29:29 +00:00
9705bb81d6 Fixing an error in DebugDumpTest.
A recent change in DebugDumpTest introduced an error

https://codereview.webrtc.org/1810463002/

The file was not fully scanned.

This CL fixes it.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12236}
2016-04-05 11:39:20 +00:00
7ea928e8e2 Renamed the test::BitExactFrame method to test::VectorDifferenceBounded.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12162}
2016-03-30 15:14:02 +00:00
af2f3dd206 Reland: Add IntelligibilityEnhancer support to audioproc_float
Landed originally here: https://codereview.webrtc.org/1800413002/

TBR=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12150}
2016-03-29 21:54:44 +00:00
dd56fa8642 Revert "Add IntelligibilityEnhancer support to audioproc_float"
Revert reason: I unintentionally added a patch when rebasing that is breaking the bots.

This reverts commit 98c69a0ee785adeb9d95fffeb55cdb6cedbe82c6.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12148}
2016-03-29 20:05:46 +00:00
98c69a0ee7 Add IntelligibilityEnhancer support to audioproc_float
R=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12147}
2016-03-29 19:43:42 +00:00
19b7b665cc Added a bitexactness test for the level estimator in the audio
processing module.

BUG=webrtc:5338

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

Cr-Commit-Position: refs/heads/master@{#12064}
2016-03-20 15:36:36 +00:00
5585001e5d Added a bitexactness test for the noise suppressor.
This CL also extracts part of the functionality used
in the bitexactness test for the high-pass filter into
a separate file in order to be able to reuse that
functionality in bitexactness tests for the other
submodules in APM (including the bitexactness test for
the noise suppressor).

BUG=wertc:5336

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

Cr-Commit-Position: refs/heads/master@{#12061}
2016-03-20 01:01:17 +00:00
b031955770 Deprecate AudioProcessing::AnalyzeReverseStream(AudioFrame) API
Review URL: https://codereview.webrtc.org/1783693005

Cr-Commit-Position: refs/heads/master@{#12045}
2016-03-18 03:39:57 +00:00
0de1c1374c Adding DebugDumpReplayer.
It would be good to have a dedicated DebugDumpReplayer. There is one but it hides itself in DebugDumpTest.

This CL is to separate it out.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12029}
2016-03-17 09:39:37 +00:00
df6416aa50 Dont always downsample to 16kHz in the reverse stream in APM
TBR=tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12024}
2016-03-17 01:26:42 +00:00
776593b139 Reland: Drop the 16kHz sample rate restriction on AECM and zero out higher bands
Landed originally here: https://codereview.webrtc.org/1774553002/
Revertede here: https://codereview.webrtc.org/1781893002/

TBR=solenberg@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12005}
2016-03-15 21:05:05 +00:00
dfc2870380 Revert of Drop the 16kHz sample rate restriction on AECM and zero out higher bands (patchset #3 id:40001 of https://codereview.webrtc.org/1774553002/ )
Reason for revert:
Breaks Android it looks like.
See your own try jobs and
https://build.chromium.org/p/client.webrtc/builders/Android32%20Tests%20%28L%...

Original issue's description:
> Drop the 16kHz sample rate restriction on AECM and zero out higher bands
>
> The restriction has been removed completely and AECM now supports any
> number of higher bands. But this has been achieved by always zeroing out the
> higher bands, instead of applying a constant gain which is the average over half
> of the lower band (like it is done for the AEC), because that would be
> non-trivial to implement and we don't want to spend too much time on AECM, since
> we want to get rid of it in the long term anyway.
>
> R=peah@webrtc.org, solenberg@webrtc.org, tina.legrand@webrtc.org
>
> Committed: https://crrev.com/f687d53aabee0523ce6e9e0636163af8df120e41
> Cr-Commit-Position: refs/heads/master@{#11931}

TBR=peah@webrtc.org,turaj@webrtc.org,tina.legrand@webrtc.org,solenberg@webrtc.org,aluebs@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#11932}
2016-03-10 00:23:32 +00:00
f687d53aab Drop the 16kHz sample rate restriction on AECM and zero out higher bands
The restriction has been removed completely and AECM now supports any
number of higher bands. But this has been achieved by always zeroing out the
higher bands, instead of applying a constant gain which is the average over half
of the lower band (like it is done for the AEC), because that would be
non-trivial to implement and we don't want to spend too much time on AECM, since
we want to get rid of it in the long term anyway.

R=peah@webrtc.org, solenberg@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11931}
2016-03-09 15:38:09 +00:00
6ebc4d3f7d Changed name for the upcoming AEC from NextGenerationAec to AEC3.
BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11895}
2016-03-08 00:59:43 +00:00
0197363d18 A bitexactness test for the highpass filter in the
audio processing module.

The test also adds a new helper class called
VectorBasedAudioFrame that is intended to be
reused for the bitexactness tests for the other
submodules.

BUG=webrtc:1091

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

Cr-Commit-Position: refs/heads/master@{#11864}
2016-03-03 19:21:55 +00:00
7b19b08c18 Reland "Calculating ERLE in AEC more properly."
The original CL (https://codereview.webrtc.org/1644133002/) had an error in the unittest and did not get landed. This CL is to reland it,

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11844}
2016-03-02 14:56:56 +00:00
c9bbbe454f Revert "Calculating ERLE in AEC more properly."
This reverts commit 944744b25c76810e576516d2f676b1d9105e302f.

NOTRY=True
TBR=peah@webrtc.org,kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11817}
2016-02-29 14:20:54 +00:00
944744b25c Calculating ERLE in AEC more properly.
The audio level of the AEC's output level was calculated before overlapping add, and therefore, a compensation was needed. The compensation is multiplying the level by 2 since, before overlapping add, the level is roughly halved due to windowing.

This had to be that way because the level was calculated in frequency domain and the signal after overlapping add has only its time domain representation.

The level calculation has been updated to work on time domain signal and therefore the problem is not there any longer.

This CL is to put the calculation of the AEC output level after overlapping add and remove the compensation.

BUG=
R=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11810}
2016-02-29 12:09:07 +00:00
62eaacf5ee Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11653}
2016-02-17 14:39:13 +00:00
a332e2d3af Added boilerplate code for being able to test the upcoming
AEC functionality.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11647}
2016-02-17 09:11:24 +00:00
58cf5f14ec Changed order of events when synthesizing a call.
This is needed when synthesizing a call based on
48 kHz audio files as otherwise an error is
generated about the wrong sample rate is generated.
That error is in turned caused by the sample rate
being changed from the default 16 kHz
at the first Capture API call event.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11635}
2016-02-16 15:26:25 +00:00