1356 Commits

Author SHA1 Message Date
kwiberg
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
elad.alon
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
kwiberg
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
elad.alon
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
kwiberg
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
henrik.lundin
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
ehmaldonado
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
minyue
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
dkirovbroadsoft
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
elad.alon
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
kwiberg
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
henrik.lundin
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
kwiberg
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
michaelt
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
minyue
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
kwiberg
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
kwiberg
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
kwiberg
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
henrik.lundin
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
danilchap
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
henrik.lundin
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
sprang
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
kjellander
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
Henrik Lundin
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
kjellander
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
kjellander
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
michaelt
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
henrik.lundin
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
ilnik
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
henrik.lundin
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
ehmaldonado
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
henrik.lundin
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
solenberg
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
ossu
bcd88dbc01 WebRtcVoiceEngineTest: Changed a static_cast to a checked_cast.
Also two spelling fixes.
This is a follow-up to https://codereview.webrtc.org/2669583002/

TBR=kwiberg@webrtc.org
BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2697453004
Cr-Commit-Position: refs/heads/master@{#16586}
2017-02-13 15:04:05 +00:00
brandtr
6607d84b44 Move one CircularBuffer to webrtc::test namespace.
There are currently two webrtc::CircularBuffers defined:
- modules/audio_coding/test/utility.{h,cc}
- modules/audio_processing/echo_detector/circular_buffer.{h,cc}

This CL moves the former definition to the webrtc::test namespace,
to avoid link errors in a future build target.

BUG=None

Review-Url: https://codereview.webrtc.org/2667383008
Cr-Commit-Position: refs/heads/master@{#16553}
2017-02-11 08:24:10 +00:00
flim
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
kwiberg
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
ossu
9def800b70 Added a flag to AudioCodecSpec to indicate adaptive bitrate support.
It's currently only used to ensure transport-cc is enabled for the format in question. It might be used to toggle more things in future.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2669583002
Cr-Commit-Position: refs/heads/master@{#16514}
2017-02-09 13:14:32 +00:00
ehmaldonado
87b8e9f3a2 Add missing dependency to audio_decoder_unittests.
BUG=None
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2684573002
Cr-Commit-Position: refs/heads/master@{#16470}
2017-02-07 14:26:29 +00:00
minyue
a7111eb45a Fixing an error in ANA FrameLengthController unittest.
BUG=None
NOTRY=True
TBR=henrik.lundin@webrtc.org

Review-Url: https://codereview.webrtc.org/2675573007
Cr-Commit-Position: refs/heads/master@{#16438}
2017-02-06 10:20:00 +00:00
ehmaldonado
b55bd5fef0 Don't capture variables explicitly in lambda expression.
As it is, the test fails to compile on some downstream compilers with the following error:

webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:25: error: lambda capture 'kPayloadLength' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
      .WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
                        ^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:41: error: lambda capture 'kFirstSequenceNumber' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
      .WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
                                        ^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:63: error: lambda capture 'kFirstTimestamp' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
      .WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
                                                              ^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:317:25: error: lambda capture 'kFirstReceiveTime' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
                        kFirstReceiveTime](const SdpAudioFormat& format,

BUG=webrtc:7107

Review-Url: https://codereview.webrtc.org/2672823002
Cr-Commit-Position: refs/heads/master@{#16422}
2017-02-02 19:51:21 +00:00
ehmaldonado
1dffc62843 Remove all occurrences of "using std::string".
BUG=webrtc:7104
NOTRY=True

Review-Url: https://codereview.webrtc.org/2675723002
Cr-Commit-Position: refs/heads/master@{#16418}
2017-02-02 16:10:00 +00:00
michaelt
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
minyue
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
michaelt
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
elad.alon
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
kwiberg
c14b7ed479 iSAC float decoder: Don't read past end of initialized part of buffer
We read past the end of the initialized part of the buffer, seemingly
on purpose (no one knows the details of this code anymore). The right
thing to do is probably to zero that part of the buffer.

(The *right* right thing to would be to rewrite this so that it was
easier to see what data was supposed to be where when, but
priorities...)

BUG=chromium:683040

Review-Url: https://codereview.webrtc.org/2659383002
Cr-Commit-Position: refs/heads/master@{#16365}
2017-01-30 20:17:05 +00:00
minyue
a6a6d65278 Instantly pass network changes to controllers in audio network adaptor.
This allows controllers to do internal logic upon the network metric changes, e.g., filtering.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2643133003
Cr-Commit-Position: refs/heads/master@{#16363}
2017-01-30 18:50:00 +00:00
kwiberg
a6ca518dd5 iSAC: Untangle some cyclic dependencies
BUG=webrtc:6828, webrtc:7042

Review-Url: https://codereview.webrtc.org/2656823005
Cr-Commit-Position: refs/heads/master@{#16358}
2017-01-30 13:28:54 +00:00
ehmaldonado
9cbb0a16e5 Reland of GN: Refactor modules_unittests to eliminate package boundary violations. (patchset #1 id:1 of https://codereview.webrtc.org/2651023005/ )
Reason for revert:
Will change the name from bwe_simulator to bwe_simulator_test.

Original issue's description:
> Revert of GN: Refactor modules_unittests to eliminate package boundary violations. (patchset #4 id:130001 of https://codereview.webrtc.org/2649563002/ )
>
> Reason for revert:
> Did break the bots.
> https://build.chromium.org/p/client.webrtc/builders/iOS32%20Release/builds/9807
>
> Original issue's description:
> > GN: Refactor modules_unittests to eliminate package boundary violations.
> >
> > Also move bwe_simulator to webrtc/modules/remote_bitrate_estimator
> >
> > BUG=webrtc:6954
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2649563002
> > Cr-Commit-Position: refs/heads/master@{#16270}
> > Committed: 36cb55d715
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6954
>
> Review-Url: https://codereview.webrtc.org/2651023005
> Cr-Commit-Position: refs/heads/master@{#16271}
> Committed: 3373eaa577

R=kjellander@webrtc.org
NOTRY=true
BUG=webrtc:6954

Review-Url: https://codereview.webrtc.org/2653173003
Cr-Commit-Position: refs/heads/master@{#16356}
2017-01-30 11:07:03 +00:00