Commit Graph

1373 Commits

Author SHA1 Message Date
cde46b7278 Resolve cyclic dependency between audio network adaptor and event log api
BUG=webrtc:7257

Review-Url: https://codereview.webrtc.org/2745473003
Cr-Commit-Position: refs/heads/master@{#17565}
2017-04-06 12:59:10 +00:00
28dc285f22 Adding cbr support for Opus
BUG=webrtc:7394

Review-Url: https://codereview.webrtc.org/2772773002
Cr-Commit-Position: refs/heads/master@{#17564}
2017-04-06 12:48:36 +00:00
388fe425c7 Make WARN_UNUSED_RESULT a no-op on gcc
Because on gcc, cast to void doesn't silence the warning. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Also add an RTC_ prefix to the macro instead of only defining it if it
wasn't already defined, to ensure that we always get our own version.

BUG=none

Review-Url: https://codereview.webrtc.org/2797983003
Cr-Commit-Position: refs/heads/master@{#17563}
2017-04-06 11:32:27 +00:00
24180017d5 ACM: Change test output files from PCM to WAV
This makes the test files easier to analyze.

BUG=none

Review-Url: https://codereview.webrtc.org/2752543007
Cr-Commit-Position: refs/heads/master@{#17559}
2017-04-06 09:40:37 +00:00
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
3153c6dce5 Fixing DTX unittest for AudioEncoderOpus.
BUG=None

Review-Url: https://codereview.webrtc.org/2785363002
Cr-Commit-Position: refs/heads/master@{#17520}
2017-04-04 06:34:39 +00:00
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
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
0ffdcc51bc Delete unneeded includes of deprecated system_wrappers include files.
Deletes left-over includes of trace.h and critical_section_wrapper.h.

BUG=webrtc:7035

Review-Url: https://codereview.webrtc.org/2784873002
Cr-Commit-Position: refs/heads/master@{#17460}
2017-03-30 07:31:15 +00:00
2d699acf64 Add documentation to the ThresholdCurve unit tests
BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2779953003
Cr-Commit-Position: refs/heads/master@{#17454}
2017-03-29 20:38:57 +00:00
326263a678 Avoid code duplication between PLR/RPLR-based FecController
BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2688613003
Cr-Commit-Position: refs/heads/master@{#17437}
2017-03-29 10:16:58 +00:00
3ac729a53b Fix compilation issue detected by internal tool.
Using decl NiceMock, Return, '_' is unused.

TBR=minyue@webrtc.org
BUG=None

Review-Url: https://codereview.webrtc.org/2782543002
Cr-Commit-Position: refs/heads/master@{#17429}
2017-03-28 17:35:48 +00:00
0e4a685542 Added licence boilerplate to our MATLAB files.
The command

tools/checklicenses/checklicenses.py --ignore-suppressions ./webrtc

previously produced this output:
'webrtc/modules/audio_processing/test/apmtest.m' has non-whitelisted license 'UNKNOWN'
'webrtc/modules/audio_processing/transient/test/readDetection.m' has non-whitelisted license 'UNKNOWN'
'webrtc/modules/audio_processing/transient/test/readPCM.m' has non-whitelisted license 'UNKNOWN'
...

This CL adds the WebRTC licence with appropriate year to all our
MATLAB files. All these files were contributed by WebRTC project
members hlundin@, pbos@, niklase@.

BUG=chromium:98592
NOTRY=True

Review-Url: https://codereview.webrtc.org/2781663005
Cr-Commit-Position: refs/heads/master@{#17428}
2017-03-28 17:18:58 +00:00
2877048afe Experiment-driven configuration of PLR/RPLR-based FecController
BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2684773002
Cr-Commit-Position: refs/heads/master@{#17419}
2017-03-28 12:03:55 +00:00
b1a897680d Disable AudioCodingModuleTest.TestPacketLossStereo for iOS.
It failed twice in succession after https://codereview.webrtc.org/2752233002.

TBR=ossu@webrtc.org
NOTRY=True
BUG=webrtc:7057

Review-Url: https://codereview.webrtc.org/2778983003
Cr-Commit-Position: refs/heads/master@{#17410}
2017-03-28 09:28:08 +00:00
1c07c70d88 Reland "WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType"
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2774833003
Cr-Commit-Position: refs/heads/master@{#17391}
2017-03-27 14:15:49 +00:00
f0e1f60b0c TWCC-PLR -based FecController doesn’t need smoothing
TWCC-PLR -based FecController doesn’t need smoothing; instead, use "null-smoothing", which just returns the last value (if any).
If we end up using TWCC-PLR, we'll just remove smoothing altogether. Until then, this is the least intrusive way to modify the code while still letting it work correctly for RTCP-PLR.

BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2687433004
Cr-Commit-Position: refs/heads/master@{#17375}
2017-03-24 13:06:30 +00:00
670a7f3611 Revert of WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (patchset #13 id:260001 of https://codereview.webrtc.org/2686043006/ )
Reason for revert:
Makes perf and Chromium FYI bots unhappy.

Original issue's description:
> WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType
>
> This removes one more place where we were unable to handle codecs not
> in the built-in set.
>
> BUG=webrtc:5805
>
> Review-Url: https://codereview.webrtc.org/2686043006
> Cr-Commit-Position: refs/heads/master@{#17370}
> Committed: 1724cfbdba

TBR=ossu@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:5805

Review-Url: https://codereview.webrtc.org/2772043002
Cr-Commit-Position: refs/heads/master@{#17374}
2017-03-24 12:56:21 +00:00
6d7900de66 Introduce FecControllerRplrBased
1. Rename FecController to FecControllerPlrBased.
2. Introduce FecControllerRplrBased - a version of FecController that makes its decision based on RPLR instead of PLR.

BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2672933003
Cr-Commit-Position: refs/heads/master@{#17373}
2017-03-24 11:12:56 +00:00
1724cfbdba WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType
This removes one more place where we were unable to handle codecs not
in the built-in set.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2686043006
Cr-Commit-Position: refs/heads/master@{#17370}
2017-03-24 10:16:04 +00:00
dadb4dc3c9 Allow ANA to receive RPLR (recoverable packet loss rate) indications
This is part of a series of CLs. Next CLs:
1. CL for RPLR-based FecController
2. CL for allowing experiment-driven configuration of the above (through both field-trials and protobuf)

BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2661043003
Cr-Commit-Position: refs/heads/master@{#17368}
2017-03-23 22:29:50 +00:00
14325edfe4 Don't expect factory to create iLBC decoder if it isn't supported
BUG=webrtc:7377

Review-Url: https://codereview.webrtc.org/2762153002
Cr-Commit-Position: refs/heads/master@{#17328}
2017-03-21 19:16:51 +00:00
ab980d0cb1 Remove last mentions of speex from webrtc/modules
BUG=webrtc:4844

Review-Url: https://codereview.webrtc.org/2763543002
Cr-Commit-Position: refs/heads/master@{#17309}
2017-03-20 12:56:22 +00:00
90474ccd12 GN: Make //webrtc/test:fileutils visible only to //webrtc/test.
BUG=webrtc:6727
NOTRY=True

Review-Url: https://codereview.webrtc.org/2754893002
Cr-Commit-Position: refs/heads/master@{#17283}
2017-03-17 10:47:24 +00:00
a613eb6bff Fixing a few tests for the upcoming Opus 1.2-alpha.
BUG=b/35415318

NOTRY=True

Review-Url: https://codereview.webrtc.org/2746763005
Cr-Commit-Position: refs/heads/master@{#17234}
2017-03-14 21:33:30 +00:00
e851a9a763 Fixed problems in neteq when RTP and decoder timestamps increment with
different sample rate frequency.

BUG=webrtc:7327

Problems before the fix:
1. NetEqImpl::timestamp_ is inconsistent. Initially it is set to
the original RTP timestamp, but later gets updated with the
scaled timestamp.
2. NetEqImpl::InsertPacketInternal::main_timestamp is set with
the original RTP timestamp, but later gets compared with the
NetEqImpl::timestamp_ which may or may not be with the same
sample rate frequency and this results in major problems.
3. IncreaseEndTimestamp(main_timestamp - timestamp_) will be
incorrect when SSRC is changed and not the first packet.
4. delay_manager_->Update() may not be always invoked, since
the (main_timestamp - timestamp_) >= 0 will not be true when
the previous scaled timestamp_ is bigger than the main_timestamp
(current RTP timestamp) even if the current RTP timestamp is
bigger than the previous RTP timestamp.
5. delay_manager_->Update() parameters are main_timestamp
which increments with the RTP sample rate frequency and the
fs_hz_ which is the decoder sample rate frequency. When these
two frequencies are different as is the case with g.722, the
DelayManager::Update() will misfire and calculate incorrect
packet_len_ms and inter-arrival time (IAT) as a result. This
in effect will cause neteq to enter kPreemptiveExpand operation
and will keep expanding the jitter buffer even if the RTP packets
arrive with no jitter at all.

The fix corrects all these problems by making sure the
main_timestamp and the timestamp_ are always set with the scaled
timestamp and increment with the decoder sample rate frequency.

Review-Url: https://codereview.webrtc.org/2743063005
Cr-Commit-Position: refs/heads/master@{#17232}
2017-03-14 17:00:27 +00:00
cfd88bbe80 Fix AudioEncoderOpus::RecreateEncoderInstance() referring to old config_
BUG=webrtc:7334

Review-Url: https://codereview.webrtc.org/2742383002
Cr-Commit-Position: refs/heads/master@{#17222}
2017-03-14 09:50:46 +00:00
a1896a649c iSAC fix entropy coder: Recently added DCHECK could in fact trigger
A DCHECK added in a recent bugfix, which asserted that a signed 64->32
bit cast did not overflow, has been found to not always pass. We fix
this by saturating.

BUG=chromium:693868

Review-Url: https://codereview.webrtc.org/2746903002
Cr-Commit-Position: refs/heads/master@{#17209}
2017-03-13 12:28:47 +00:00
a2b2f6fe96 Remove dead test code and fix usage print-out for other tests
BUG=none

Review-Url: https://codereview.webrtc.org/2744213002
Cr-Commit-Position: refs/heads/master@{#17204}
2017-03-13 11:39:33 +00:00
551e984851 Make error reporting more detailed
In an attempt to help Kenny locate the evil Dr. Deo.

BUG=webrtc:7307

Review-Url: https://codereview.webrtc.org/2732193006
Cr-Commit-Position: refs/heads/master@{#17135}
2017-03-09 10:08:28 +00:00
e7811f5d69 Fix segmentation fault in AudioEncoderOpusTest.EncodeAtMinBitrate.
BUG=webrtc:7105

Review-Url: https://codereview.webrtc.org/2733803002
Cr-Commit-Position: refs/heads/master@{#17069}
2017-03-06 14:49:27 +00:00
930ff23261 Fixing a unittest to allow new Opus version.
New Opus version starts to support 120ms frame lengths. AudioEncoderOpusTest had an unnecessary check on the available frame lengths.

It is removed in this CL.

BUG=b/35415318

Review-Url: https://codereview.webrtc.org/2731583003
Cr-Commit-Position: refs/heads/master@{#17011}
2017-03-03 15:34:52 +00:00
65cb70d939 Fix cyclic deps: rent_a_codec<->audio_coding and rent_a_codec<->neteq
In short, what I did was to

  * Remove acm_common_defs.h (the stuff in it was used only by
    acm_codec_database.cc).

  * Move audio_coding_module_typedefs.h to a new build target.

  * Move the NetEqDecoder enum (and the associated
    NetEqDecoderToSdpAudioFormat function) to a new file in a new
    build target.

BUG=webrtc:7243, webrtc:7244

Review-Url: https://codereview.webrtc.org/2723253005
Cr-Commit-Position: refs/heads/master@{#17005}
2017-03-03 14:16:28 +00:00
3a2c803dc3 Multiply in 64 bits to avoid overflow
A fuzzer run caused the operands of this multiplication to be 512 and
5000000, resulting in a product about 20% too large for int32_t. So
change this from a 16x32->32 to a 16x32->64 multiplication. Since we
right shift by 2 at the end, the end result will still fit in int32_t.

I also had to fix a few follow-on add/sub overflows found by the same
fuzzer input once the multiplication was fixed. I chose to saturate
these, since it wasn't just an intermediate value that overflowed.

BUG=chromium:693868

Review-Url: https://codereview.webrtc.org/2729573002
Cr-Commit-Position: refs/heads/master@{#17003}
2017-03-03 13:44:49 +00:00
d3edd770ad Introduce dchecked_cast, and start using it
It's the faster, less strict cousin of checked_cast.

BUG=none

Review-Url: https://codereview.webrtc.org/2714063002
Cr-Commit-Position: refs/heads/master@{#16958}
2017-03-02 02:52:48 +00:00
a67e5f5de9 Fixing an overflow issue in NetEq::BackgroundNoise
BUG=chromium:676941

Review-Url: https://codereview.webrtc.org/2722533002
Cr-Commit-Position: refs/heads/master@{#16938}
2017-03-01 11:06:50 +00:00
dc05017fc3 Disable AudioCoding tests on ios
BUG=webrtc:7057
TBR=minyue@webrtc.org
NOTRY=true

Review-Url: https://codereview.webrtc.org/2721323002
Cr-Commit-Position: refs/heads/master@{#16932}
2017-03-01 09:16:51 +00:00
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
e3e902eef9 Restructure protobuf targets to fit with downstream requirements.
The paths of the protobuf output files needs to match the actual tree path
in order for Bazel builds to work.

BUG=webrtc:6412
NOTRY=True

Review-Url: https://codereview.webrtc.org/2716413004
Cr-Commit-Position: refs/heads/master@{#16912}
2017-02-28 16:01:46 +00:00
b1629cf5d6 Avoid overflow in NetEq's TimeStretch::SpeechDetection
BUG=chromium:675193
R=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2718943004 .
Cr-Commit-Position: refs/heads/master@{#16902}
2017-02-28 13:58:30 +00:00
b7d24f6d8d Disable flaky tests on iOS
Tests disabled:
CurrentSpeakerMonitorTest.SpeakerChange
TargetDelayTest.OutOfRangeInput
TargetDelayTest.NoTargetDelayBufferSizeChanges
TargetDelayTest.WithTargetDelayBufferNotChanging
TargetDelayTest.RequiredDelayAtCorrectRange
TargetDelayTest.TargetDelayBufferMinMax

BUG=webrtc:7057
TBR=aleloi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2717993002
Cr-Commit-Position: refs/heads/master@{#16850}
2017-02-27 06:10:14 +00:00
7c85658556 Roll chromium_revision 33a7a547b9..0e44c5e141 (452838:453130)
Some code changes were needed due to webrtc:7236.
Disabling flaky test for iOS and ORTC (on memcheck).

Change log: 33a7a547b9..0e44c5e141
Full diff: 33a7a547b9..0e44c5e141

Changed dependencies:
* src/base: facaa65f73..07e8029830
* src/build: eefc9cc748..c7c2db69cd
* src/ios: f893f94115..75bb86f02a
* src/testing: b40837ba97..e31bd01824
* src/third_party: 55242080a2..285c08d0e2
* src/third_party/catapult: 794fff6c81..47b98570f6
* src/third_party/libyuv: b18fd21d3c..45b176d153
* src/tools: e4e78e0678..6b40c03f7b
DEPS diff: 33a7a547b9..0e44c5e141/DEPS

Clang version changed 289944:295793
Details: 33a7a547b9..0e44c5e141/tools/clang/scripts/update.py

TBR=henrik.lundin@webrtc.org
BUG=webrtc:7236, webrtc:7247, webrtc:7248
NOTRY=True

Review-Url: https://codereview.webrtc.org/2718953002
Cr-Commit-Position: refs/heads/master@{#16849}
2017-02-27 03:53:40 +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
5650a7d1c4 Improved readability and DCHECKing in AudioVector::[]
This is a follow-up to https://codereview.webrtc.org/2700633003, where
post-commit comments suggested these changes.

BUG=webrtc:7159

Review-Url: https://codereview.webrtc.org/2706263002
Cr-Commit-Position: refs/heads/master@{#16771}
2017-02-22 11:45:40 +00:00
5328b9eb32 added WebRTC-QuickPerfTest to RampUpTests and CallPerfTests
BUG=webrtc:7153

Review-Url: https://codereview.webrtc.org/2708723002
Cr-Commit-Position: refs/heads/master@{#16743}
2017-02-21 13:20:28 +00:00
751589899b Further optimization of AudioVector::operator[]
This is a follow-up to https://codereview.webrtc.org/2670643007/. That
CL provided significant improvement to Mac, Linux and ARM-based
platforms, but failed to improve the performance for Windows. The
problem is that the MSVC compiler did not produce branch-free code for
that fix. This new change produces the same result for non-Windows
platforms, as well as introduces branch-free code for Windows.

H/t to kwiberg@ for providing the solution.

BUG=webrtc:7159

Review-Url: https://codereview.webrtc.org/2700633003
Cr-Commit-Position: refs/heads/master@{#16649}
2017-02-16 15:56:28 +00:00
454c1d6a23 Fix neteq_speed_test.cc
After https://codereview.webrtc.org/2340773002,
the path from webrtc::test::ResourcePath in
webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc is wrong.

It is
/path/to/repos/resources/audio_coding/testfile32kHz.pcm

It should be
/path/to/repos/webrtc-temp/src/resources/audio_coding/testfile32kHz.pcm.

The middle part is missing.

The reason this target is affected is because
webrtc::test::SetExecutablePath(argv[0]);
was not called.

That call is necessary for us to know that the test is being run from src/
and not from out/Default (as is assumed, when that function is not called.)

BUG=chromium:497757
R=kjellander@webrtc.org, henrik.lundin@webrtc.org

Review-Url: https://codereview.webrtc.org/2698743002
Cr-Commit-Position: refs/heads/master@{#16641}
2017-02-16 11:54:49 +00:00
280eb224e2 Make AudioVector::operator[] inline and modify the index calculation to avoid the modulo operation.
BUG=webrtc:7159

Review-Url: https://codereview.webrtc.org/2670643007
Cr-Commit-Position: refs/heads/master@{#16627}
2017-02-15 10:53:05 +00:00
08b19dfc67 Remove VoEVideoSync interface.
The removed tests are covered by cases in call_perf_tests.

BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/2672583002
Cr-Commit-Position: refs/heads/master@{#16621}
2017-02-15 08:42:31 +00:00