Commit Graph

160 Commits

Author SHA1 Message Date
deaf6fb071 Opus: Let the decoder interpret 2-byte payloads as DTX/CNG packets
This CL matches the work done in
https://codereview.webrtc.org/2693453003.

BUG=webrtc:7272
TBR=minyue@webrtc.org

Review-Url: https://codereview.webrtc.org/2723893004
Cr-Commit-Position: refs/heads/master@{#16930}
2017-03-01 08:49:18 +00:00
c1b57a15bf Test field trial group with startswith rather than equals.
BUG=webrtc:7266

Review-Url: https://codereview.webrtc.org/2717973005
Cr-Commit-Position: refs/heads/master@{#16915}
2017-02-28 16:50:47 +00:00
6f08d7d68d Change frame length on very low bandwidth.
BUG=webrtc:7199

Review-Url: https://codereview.webrtc.org/2703353002
Cr-Commit-Position: refs/heads/master@{#16777}
2017-02-22 15:35:05 +00:00
9238245d9b Fix nr of bytes sent to Opus decoder in DTX mode
BUG=webrtc:7144

Review-Url: https://codereview.webrtc.org/2693453003
Cr-Commit-Position: refs/heads/master@{#16542}
2017-02-10 21:50:38 +00:00
087bd34d23 Move AudioDecoder and related stuff to the api/ directory
BUG=webrtc:5805, webrtc:6725

Review-Url: https://codereview.webrtc.org/2668523004
Cr-Commit-Position: refs/heads/master@{#16534}
2017-02-10 16:15:44 +00:00
a55f021d43 Add 120ms frame ability to ANA
BUG=webrtc:7093

Review-Url: https://codereview.webrtc.org/2669733002
Cr-Commit-Position: refs/heads/master@{#16416}
2017-02-02 15:47:19 +00:00
2e03c66119 Adding build switch for Opus that supports 120ms ptime.
BUG=webrtc:7097

TEST=Set "ptime=120", try WebRTC calls over custom build Chromium with and without Opus 120ms. Try both Chromium w <-> Chromium w and Chromium w <-> Chromium w/o

Review-Url: https://codereview.webrtc.org/2668633004
Cr-Commit-Position: refs/heads/master@{#16408}
2017-02-02 01:31:11 +00:00
54340d8e75 Change opus min bitrate.
BUG=webrtc:7087

Review-Url: https://codereview.webrtc.org/2668693003
Cr-Commit-Position: refs/heads/master@{#16383}
2017-01-31 17:06:53 +00:00
0fe1216c9c Move more calls to webrtc::field_trial::FindFullName into ctor, thereby minimizing the non-trivial cost of repeated string comparisons.
BUG=webrtc:7059

Review-Url: https://codereview.webrtc.org/2657863002
Cr-Commit-Position: refs/heads/master@{#16378}
2017-01-31 13:48:37 +00:00
bc5d921659 Rename base/analytics/ to base/numerics/
BUG=webrtc:6832

Review-Url: https://codereview.webrtc.org/2626203002
Cr-Commit-Position: refs/heads/master@{#16060}
2017-01-13 17:14:33 +00:00
bf279fc4b9 Pass event log to ANA.
BUG=webrtc:6845

Review-Url: https://codereview.webrtc.org/2553413002
Cr-Commit-Position: refs/heads/master@{#16052}
2017-01-13 14:02:29 +00:00
566d820e00 Update smoothed bitrate.
BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2546493002
Cr-Commit-Position: refs/heads/master@{#16036}
2017-01-12 18:17:38 +00:00
4716048ccd Fixing name of a unittest for AudioEncoderOpus.
BUG=webrtc:6936, webrtc:6303

Review-Url: https://codereview.webrtc.org/2606743002
Cr-Commit-Position: refs/heads/master@{#15811}
2016-12-27 21:08:49 +00:00
584c35a334 Make a the decisions of ANA optional for the opus encoder.
BUG=webrtc:6936, webrtc:6303

Review-Url: https://codereview.webrtc.org/2592253004
Cr-Commit-Position: refs/heads/master@{#15807}
2016-12-27 16:21:29 +00:00
59dbfe6d32 Add a unit test for Opus complexity adaptation
The test verifies that the hysteresis window in the configuration works
as intended.

BUG=webrtc:6708

Review-Url: https://codereview.webrtc.org/2594563002
Cr-Commit-Position: refs/heads/master@{#15700}
2016-12-20 09:17:55 +00:00
8c1dd8d32f Re-enable Opus complexity tests on Android
This effectively reverts commit c3e1cabc696240e4b5a128653264785292878205
(https://codereview.webrtc.org/2589703002/).

The reason the test was failing before was missing resource
dependencies in the GN file. This is now fixed.

Furthermore, the test did not trigger the complexity adaptation that
it was supposed to test, since the hysteresis window of the bitrate
was not taken into account. This is also fixed.

Finally, a percent label was added to a printout, to match the same
printout in the other test.

BUG=webrtc:6708

Review-Url: https://codereview.webrtc.org/2580383002
Cr-Commit-Position: refs/heads/master@{#15679}
2016-12-19 14:18:35 +00:00
c3e1cabc69 Revert of Re-enable Opus complexity tests on Android (patchset #1 id:1 of https://codereview.webrtc.org/2589673002/ )
Reason for revert:
This fails on perf bots.

See for instance https://uberchromegw.corp.google.com/i/client.webrtc.perf/builders/Android32%20Tests%20%28K%20Nexus5%29/builds/105/steps/webrtc_perf_tests/logs/stdio:

I  643.319s run_tests_on_device(03832b22f0e944a0)  Note: Google Test filter = AudioEncoderOpusComplexityAdaptationTest.AdaptationOff
I  643.319s run_tests_on_device(03832b22f0e944a0)  [==========] Running 1 test from 1 test case.
I  643.319s run_tests_on_device(03832b22f0e944a0)  [----------] Global test environment set-up.
I  643.319s run_tests_on_device(03832b22f0e944a0)  [----------] 1 test from AudioEncoderOpusComplexityAdaptationTest
I  643.319s run_tests_on_device(03832b22f0e944a0)  [ RUN      ] AudioEncoderOpusComplexityAdaptationTest.AdaptationOff
I  643.319s run_tests_on_device(03832b22f0e944a0)  ../../webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc:36: Failure
I  643.319s run_tests_on_device(03832b22f0e944a0)  Value of: audio_loop.Init(kInputFileName, kMaxLoopLengthSamples, kInputBlockSizeSamples)
I  643.320s run_tests_on_device(03832b22f0e944a0)    Actual: false
I  643.320s run_tests_on_device(03832b22f0e944a0)  Expected: true
I  643.320s run_tests_on_device(03832b22f0e944a0)  [ CRASHED      ]
I  643.405s run_tests_on_device(0384888cf0e945d1)  >>ScopedMainEntryLogger
I  643.405s run_tests_on_device(0384888cf0e945d1)  Note: Google Test filter = AudioEncoderOpusComplexityAdaptationTest.AdaptationOn
I  643.405s run_tests_on_device(0384888cf0e945d1)  [==========] Running 1 test from 1 test case.
I  643.405s run_tests_on_device(0384888cf0e945d1)  [----------] Global test environment set-up.
I  643.405s run_tests_on_device(0384888cf0e945d1)  [----------] 1 test from AudioEncoderOpusComplexityAdaptationTest
I  643.405s run_tests_on_device(0384888cf0e945d1)  [ RUN      ] AudioEncoderOpusComplexityAdaptationTest.AdaptationOn
I  643.405s run_tests_on_device(0384888cf0e945d1)  ../../webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc:36: Failure
I  643.405s run_tests_on_device(0384888cf0e945d1)  Value of: audio_loop.Init(kInputFileName, kMaxLoopLengthSamples, kInputBlockSizeSamples)
I  643.405s run_tests_on_device(0384888cf0e945d1)    Actual: false
I  643.405s run_tests_on_device(0384888cf0e945d1)  Expected: true
I  643.405s run_tests_on_device(0384888cf0e945d1)  [ CRASHED      ]

Original issue's description:
> Re-enable Opus complexity tests on Android
>
> BUG=webrtc:6708
> TBR=minyue@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2589673002
> Cr-Commit-Position: refs/heads/master@{#15667}
> Committed: 14479ddfd4

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6708

Review-Url: https://codereview.webrtc.org/2589703002
Cr-Commit-Position: refs/heads/master@{#15668}
2016-12-19 10:03:33 +00:00
14479ddfd4 Re-enable Opus complexity tests on Android
BUG=webrtc:6708
TBR=minyue@webrtc.org

Review-Url: https://codereview.webrtc.org/2589673002
Cr-Commit-Position: refs/heads/master@{#15667}
2016-12-19 09:36:34 +00:00
eca373f3ba Adding OnReceivedOverhead to AudioEncoder.
BUG=webrtc:6762

Review-Url: https://codereview.webrtc.org/2528933002
Cr-Commit-Position: refs/heads/master@{#15457}
2016-12-07 09:40:42 +00:00
4b9a2cb0d8 Reland "Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate."
The earlier attempt of this was in
https://codereview.webrtc.org/2411613002/

It was reverted due to failures on internal bots, showing that we cannot deprecate one method.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2538493006
Cr-Commit-Position: refs/heads/master@{#15333}
2016-11-30 14:50:08 +00:00
e69b46863a Revert of Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. (patchset #5 id:240001 of https://codereview.webrtc.org/2411613002/ )
Reason for revert:
internal bot failure

Original issue's description:
> Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate.
>
> BUG=webrtc:6303
>
> Committed: https://crrev.com/84e56d576806635c966093d5421c5d04c9b90746
> Cr-Commit-Position: refs/heads/master@{#15310}

TBR=kwiberg@webrtc.org,henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2537243004
Cr-Commit-Position: refs/heads/master@{#15312}
2016-11-30 09:19:06 +00:00
84e56d5768 Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2411613002
Cr-Commit-Position: refs/heads/master@{#15310}
2016-11-30 08:28:07 +00:00
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
69b627d89d Move smoothing filter to common audio and exp_filter to base/analytics.
An earlier attempt of this work can be found here https://codereview.webrtc.org/2520003005/#ps100001, but was reverted.

PS4 in that CL was not valid since separation of BUILD.gn can cause internal bot to fail.

This is a new attempt, which is the same as https://codereview.webrtc.org/2520003005/#ps100001 but PS4 reverted.

BUG=webrtc:6443
TBR=tommi@webrtc.org, solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2532523002
Cr-Commit-Position: refs/heads/master@{#15233}
2016-11-24 19:01:14 +00:00
3c3aef44de Revert of Reland "Move smoothing filter to common audio". (patchset #5 id:100001 of https://codereview.webrtc.org/2520003005/ )
Reason for revert:
Internal bots failed.

Original issue's description:
> Reland "Move smoothing filter to common audio".
>
> The original CL was this https://codereview.webrtc.org/2484153002/
>
> Due to failure with internal trial servers, it was reverted. This CL tries to reland it.
>
> BUG=webrtc:6443
>
> Committed: https://crrev.com/223641f1b903e41e77d88f03199b4cdb65255ec8
> Cr-Commit-Position: refs/heads/master@{#15227}

TBR=tommi@webrtc.org,solenberg@webrtc.org,terelius@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2529943002
Cr-Commit-Position: refs/heads/master@{#15228}
2016-11-24 15:13:24 +00:00
223641f1b9 Reland "Move smoothing filter to common audio".
The original CL was this https://codereview.webrtc.org/2484153002/

Due to failure with internal trial servers, it was reverted. This CL tries to reland it.

BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2520003005
Cr-Commit-Position: refs/heads/master@{#15227}
2016-11-24 14:08:09 +00:00
c1dd1a5916 Really disable Opus complexity tests on Android
This is a follow-up to https://codereview.webrtc.org/2525603002/,
which was incomplete.

BUG=webrtc:6708
TBR=philipel@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2524813002
Cr-Commit-Position: refs/heads/master@{#15202}
2016-11-22 19:19:21 +00:00
58f90a76cc Disable Opus complexity tests on Android
Reason: breaks perf bots

BUG=webrtc:6708
TBR=philipel@webrtc.org

Review-Url: https://codereview.webrtc.org/2525603002
Cr-Commit-Position: refs/heads/master@{#15188}
2016-11-22 12:13:08 +00:00
875862ca86 Let Opus increase complexity for low bitrates
This change adds code that lets Opus increase the complexity setting
at low bitrates (only relevant for mobile where the default complexity
is not already maximum). The feature is default off.

Also adding a performance test to make sure the complexity adaptation
has desired effect.

BUG=webrtc:6708

Review-Url: https://codereview.webrtc.org/2503443002
Cr-Commit-Position: refs/heads/master@{#15182}
2016-11-22 10:08:01 +00:00
b4af3d673a Remove all references to GYP
Remove all .gyp and .gypi files.
Remove entries from OWNERS files for *.isolate, *.gyp, *.gypi
Remove unused scripts in webrtc/build.

BUG=webrtc:6323
R=henrika@webrtc.org, phoglund@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#15107}
2016-11-16 19:11:38 +00:00
a6f495c7c2 Simplifying audio network adaptor by moving receiver frame length range to ctor.
It turns out that that audio network adaptor can always be created with knowledge of receiver frame length range. There is no need to keep some infrastructure that is used for runtime setting of receiver frame length ranges.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2429503002
Cr-Commit-Position: refs/heads/master@{#14748}
2016-10-24 16:19:22 +00:00
7e30432b36 Hooking up audio network adaptor to VoE.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2390883004
Cr-Commit-Position: refs/heads/master@{#14611}
2016-10-12 12:01:01 +00:00
41b9c801c2 Adding audio network adaptor to AudioEncoderOpus.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2362703002
Cr-Commit-Position: refs/heads/master@{#14555}
2016-10-06 14:13:59 +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
c8299f9f87 Posting Opus's set-force-channels functionality to WebRTC.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2352713005
Cr-Commit-Position: refs/heads/master@{#14394}
2016-09-27 09:08:54 +00:00
a70695a3e1 Moved Opus-specific payload splitting into AudioDecoderOpus.
The biggest change to NetEq is the move from a primary flag, to a
Priority with two separate levels: one set by RED splitting and one
set by the codec itself. This allows us to unambigously prioritize
"fallback" packets from these two sources. I've chosen what I believe
is the sensible ordering: packets that the codec prioritizes are
chosen first, regardless of if they are secondary RED packets or
not. So if we were to use Opus w/ FEC in RED, we'd only do Opus FEC
decoding if there was no RED packet that could cover the time slot.

With this change, PayloadSplitter now only deals with RED
packets. Maybe it should be renamed RedPayloadSplitter?

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2342443005
Cr-Commit-Position: refs/heads/master@{#14347}
2016-09-22 09:07:03 +00:00
17f008bf33 GYP: Remove targets inside include_tests==1 that are converted to GN.
Remove a large number of targets that are no longer built, to reduce maintenance.
Only targets that have a GN version were removed.

BUG=webrtc:6323
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2340773003
Cr-Commit-Position: refs/heads/master@{#14231}
2016-09-15 11:57:39 +00:00
4805231613 Moved format_macros.h from rtc_base to rtc_base_approved.
BUG=webrtc:3806
NOTRY=True

Review-Url: https://codereview.webrtc.org/2272003002
Cr-Commit-Position: refs/heads/master@{#13921}
2016-08-25 11:43:52 +00:00
2c670dbf13 Added GN target for webrtc_opus_fec_test.
BUG=webrtc:6191
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2268213002
Cr-Commit-Position: refs/heads/master@{#13893}
2016-08-24 13:11:27 +00:00
2e486462e0 RTC_CHECK and RTC_DCHECK macros for C
So that we don't have to use assert(). Includes one sample call site.

NOTRY=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2262173002
Cr-Commit-Position: refs/heads/master@{#13862}
2016-08-23 12:54:31 +00:00
64a7eab891 Update tests and DTX check for Opus 1.1.3.
DTX is now indicated by packets that may have a size of up to 2 bytes.
Ref: https://git.xiph.org/?p=opus.git;a=commit;h=1c311423c86b89eba27a494e17c79fefd7d75ab0

BUG=

Review-Url: https://codereview.webrtc.org/2158293003
Cr-Commit-Position: refs/heads/master@{#13736}
2016-08-12 11:36:14 +00:00
85228d6af6 Regression test for issue where Opus DTX status was being forgotten.
BUG=webrtc:6020

Review-Url: https://codereview.webrtc.org/2177263002
Cr-Commit-Position: refs/heads/master@{#13539}
2016-07-27 11:53:52 +00:00
6c2eab34f8 AudioDecoder: New method SampleRateHz, + implementations for our codecs
This will let NetEq (and the factory, and every layer in between) keep
track of just the decoder, instead of decoder and sample rate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2024633002
Cr-Commit-Position: refs/heads/master@{#12968}
2016-05-31 09:46:28 +00:00
2036135620 AudioEncoderOpus: Default to 32 kbit/s for mono, 64 kbit/s for stereo
When this class was created, we inadvertently set the default to 64
kbit/s for both cases, failing to preserve the previous behavior. This
patch restores the old behavior.

From what I've been able to dig up, this problem did not affect Opus
encoders created internally in the Audio Coding Module. Those have
always used the bitrate from the supplied CodecInst.

Review-Url: https://codereview.webrtc.org/1942193002
Cr-Commit-Position: refs/heads/master@{#12827}
2016-05-20 11:57:08 +00:00
8bce67b745 Added UMA logging for audio codec usage. A histogram statistic named "WebRTC.Audio.Encoder.CodecType" has been created.
Review-Url: https://codereview.webrtc.org/1967503002
Cr-Commit-Position: refs/heads/master@{#12760}
2016-05-16 14:34:31 +00:00
ef8b61e110 Enable -Winconsistent-missing-override flag.
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
2016-04-29 13:09:23 +00:00
4485ffb58d #include "webrtc/base/constructormagic.h" where appropriate
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.

Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12509}
2016-04-26 15:14:48 +00:00
264087f45a A few small cleanups of stuff caught by lint
Review URL: https://codereview.webrtc.org/1871003002

Cr-Commit-Position: refs/heads/master@{#12412}
2016-04-18 15:07:33 +00:00
2903ba5ff3 Reland Remove the deprecated EncodeInternal interface from AudioEncoder
Remove the deprecated EncodeInternal interface from AudioEncoder

Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.

BUG=webrtc:5591

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

Cr-Commit-Position: refs/heads/master@{#12409}
2016-04-18 13:14:42 +00:00