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}
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}
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}
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}
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}
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}
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}
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}
There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.
It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.
NOPRESUBMIT=true
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
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}
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}
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}
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}