functionalities doing sample-rate conversions:
-The implicit resampling done in the AudioBuffer CopyTo,
CopyFrom, InterleaveTo and DeinterleaveFrom methods.
-The multi-band splitting scheme.
The selection of rates in these have been difficult and
complicated, partly due to that the APM API which allows
for activating the APM submodules without notifying
the APM.
This CL adds functionality that for each capture frame
polls all submodules for whether they are active or not
and compares this against a cached result.
Furthermore, new functionality is added that based on the
results of the comparison do a reinitialization of the APM.
This has several advantages
-The code deciding on whether to analysis and synthesis is
needed for the bandsplitting can be much simplified and
centralized.
-The selection of the processing rate can be done such as
to avoid the implicit resampling that was in some cases
unnecessarily done.
-The optimization for whether an output copy is needed
that was done to improve performance due to the implicit
resampling is no longer needed, which simplifies the
code and makes it less error-prone in the sense that
is no longer neccessary to keep track of whether any
module has changed the signal.
Finally, it should be noted that the polling of the state
for all the submodules was done previously as well, but in
a less obvious and distributed manner.
BUG=webrtc:6181, webrtc:6220, webrtc:5298, webrtc:6296, webrtc:6298, webrtc:6297
Review-Url: https://codereview.webrtc.org/2304123002
Cr-Commit-Position: refs/heads/master@{#14175}
It may happen in some legitimate scenarios.
For example a turn port may have had a refresh request timeout, so it won't create a new connection for a ping from an unknown address.
R=deadbeef@webrtc.org
Review URL: https://codereview.webrtc.org/2327233002 .
Cr-Commit-Position: refs/heads/master@{#14173}
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}
Calling VirtualSocketServer::SetSendingBlocked(true) will simulate the
network interface being blocked, and SetSendingBlocked(false) will
simulate it being unblocked, resulting in SignalReadyToSend if
appropriate.
I plan to use this to write tests for upper layers of code that deal
with EWOULDBLOCK/SignalReadyToSend.
Also doing some minor housekeeping in this CL (using RTC_DCHECK,
renaming variables, etc.).
R=pthatcher@webrtc.org, skvlad@webrtc.org
Review URL: https://codereview.webrtc.org/2284903002 .
Cr-Commit-Position: refs/heads/master@{#14170}
0 means "pause", so forcing it to the min bitrate means we'll never
allow pausing for internal source encoders.
BUG=
Review-Url: https://codereview.webrtc.org/2304603002
Cr-Commit-Position: refs/heads/master@{#14168}
This CL optimizes the Android capture NV12 -> I420 + scaling code. For
example, when the input is 1280x720 and we adapt to 640x360, this CL:
- Reduces conversion time from 3.37 ms to 1.46 ms.
- Reduces memory footprint by 1 MB.
BUG=webrtc:6319
Review-Url: https://codereview.webrtc.org/2317443003
Cr-Commit-Position: refs/heads/master@{#14167}
A left shift by 10 was assumed to never overflow, since "[s]imulation
of the 25 files shows that maximum value in the vector gain_lo_hiQ17[]
is 441344, which means that it is log2((2^31)/441344) = 12.2 shifting
bits from saturation." However, a fuzzer test succeeded in provoking
an overflow, which we ignore in this CL on the theory that only
"abnormal" inputs cause overflow.
Also had to replace a "foo << 1" with "foo * (1 << 1)" in
WEBRTC_SPL_MUL_16_32_RSFT15 because foo could be negative; this
problem showed up as soon as I'd asked UBSan to ignore the overflow
discussed above.
BUG=chromium:615819
Review-Url: https://codereview.webrtc.org/2314413002
Cr-Commit-Position: refs/heads/master@{#14162}
audio_coding should be in public_deps, in order to a define used by
voe_output_test.ccto be exported, as is done in GYP
NOTRY=True
BUG=webrtc:5949
Review-Url: https://codereview.webrtc.org/2321783003
Cr-Commit-Position: refs/heads/master@{#14161}
This changes added a simple measurement of levels "close to the audio hardware"
both for playout and for recording. These levels are logged once each 10 seconds.
It also adds WebRTC.Audio.RecordedOnlyZeros UMA stat and it is updated at
destuction. It will report true iff all reported recording leves are zero.
BUG=NONE
R=peah@webrtc.org
Review URL: https://codereview.webrtc.org/2328433003 .
Cr-Commit-Position: refs/heads/master@{#14160}
In order to be able to clear out any potentially stashed old frames from
the RtpFrameReferenceFinder we can now clear frames that contain packets
older than |seq_num|.
BUG=webrtc:5514
Review-Url: https://codereview.webrtc.org/2304723004
Cr-Commit-Position: refs/heads/master@{#14156}
The right thing to do would be to ensure that the multiplication can't
overflow, but that'd be a major change bordering on a rewrite, and
would take too much time. So instead, we just instruct UBSan to look
the other way.
BUG=chromium:634834
Review-Url: https://codereview.webrtc.org/2318083002
Cr-Commit-Position: refs/heads/master@{#14154}
The previous blacklist would filter out all headers under /webrtc/sdk
and all headers in objc dirs. This adds a filter for files that end in
objc, for example `video_capture_objc.h`.
BUG=
NOTRY=true
R=kjellander@webrtc.org
Review URL: https://codereview.webrtc.org/2317023002 .
Cr-Commit-Position: refs/heads/master@{#14153}
This will unblock planned work on libsrtp and reduce the exposed GYP surface.
BUG=webrtc:5949
NOTRY=True
Review-Url: https://codereview.webrtc.org/2314473002
Cr-Commit-Position: refs/heads/master@{#14152}
After the Android test framework in Chromium moved over to generated
scripts, these paths are no longer used, so let's clean them up.
BUG=webrtc:6323
NOTRY=True
Review-Url: https://codereview.webrtc.org/2327013002
Cr-Commit-Position: refs/heads/master@{#14151}
This is to avoid a naming conflict with webrtc::RTCStatsReport that is
surfaced if you try to include it in peerconnectioninterface.h.
Background: The current stats is very much non-spec-compliant. A new
stats collection API is underway that is meant to be spec-compliant.
Some classes in Chromium and webrtc/sdk/objc have spec-compliant names
but non-spec-compliant behavior. These are being renamed to "Legacy" so
that new spec-compliant classes can be added with the correct names.
BUG=chromium:627816
TBR=tkchin@webrtc.org
NOTRY=True
Review-Url: https://codereview.webrtc.org/2313943002
Cr-Commit-Position: refs/heads/master@{#14150}
Reason for revert:
Eh, I forgot to run the libfuzzer trybot :( broke in the main waterfall.
Original issue's description:
> Only expose gflags target in non-Chromium and non-fuzzer builds.
>
> Since gflags is not present in Chromium nor the libfuzzer infrastructure,
> we have to ensure we don't accidentally depend on it in WebRTC code
> that is used in such places.
>
> BUG=chromium:645069
> NOTRY=True
>
> Committed: https://crrev.com/9365338db2e0505d6e5f8ea62fa8fe2c45ea8f74
> Cr-Commit-Position: refs/heads/master@{#14145}
TBR=ehmaldonado@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=chromium:645069
Review-Url: https://codereview.webrtc.org/2320723007
Cr-Commit-Position: refs/heads/master@{#14149}
I have written a large part of the code in these files and I feel I
should be an OWNER of them.
NOTRY=True
Review-Url: https://codereview.webrtc.org/2322983002
Cr-Commit-Position: refs/heads/master@{#14148}
Integrate AvgCounter to be used for BWE stats in call.
Fixes for stats regression in:
WebRTC.Call.EstimatedSendBitrateInKbps
WebRTC.Call.PacerBitrateInKbps
Example:
BWE for a 15 seconds long call (with intervals of 1 sec):
|300|400|500|600|600|600|600| 0 | 0 | 0 | 0 | 0 |800|800|800| // 0 - network state down
Reported via OnNetworkChanged:
|300|400|500|600| x | x | x | 0 | x | x | x | x |800| x | x | // x - empty interval, 0 -> pauses stats
Stats:
|300|400|500|600|600|600|600| - | - | - | - | - |800|800|800| // x -> last value used (intervals during pause ignored)
AvgCounter uses the average of samples within an interval (interval length is 2 sec).
BUG=webrtc:6244
Review-Url: https://codereview.webrtc.org/2307913002
Cr-Commit-Position: refs/heads/master@{#14147}
Only has counts stats right now but enumeration stats can easily be added in the future if needed.
BUG=webrtc:6313
Review-Url: https://codereview.webrtc.org/2320473002
Cr-Commit-Position: refs/heads/master@{#14146}
Since gflags is not present in Chromium nor the libfuzzer infrastructure,
we have to ensure we don't accidentally depend on it in WebRTC code
that is used in such places.
BUG=chromium:645069
NOTRY=True
Review-Url: https://codereview.webrtc.org/2321963002
Cr-Commit-Position: refs/heads/master@{#14145}
Reason for revert:
Unfortunately this didn't help, so I'm reverting this to clean things up for now.
Original issue's description:
> Add a DEPS gclient hook to prune corrupt mockito remote.
>
> A third_party remote for third_party/mockito/src is corrupt. Run
> `git remote prune origin` in the checkout directory before syncing
> Chromium.
>
> Thanks to slan@ for providing this fix.
>
> TBR=kjellander@webrtc.org
> BUG=chromium:644722
> NOTRY=True
>
> Committed: https://crrev.com/3115b06957d5b8cba5d45cebc301795e94a926ec
> Cr-Commit-Position: refs/heads/master@{#14138}
TBR=ehmaldonado@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:644722
Review-Url: https://codereview.webrtc.org/2326473003
Cr-Commit-Position: refs/heads/master@{#14143}
Reason for revert:
Breaks webrtc_perf_tests on Windows, Mac and Linux (that test don't run on trybots):
https://build.chromium.org/p/client.webrtc/builders/Linux64%20Release%20%5Blarge%20tests%5D/builds/8841/steps/webrtc_perf_tests/logs/stdio
Example:
[ RUN ] FullStackTest.ForemanCifWithoutPacketLossVp9
# Fatal error in ../../webrtc/video/video_quality_test.cc, line 1056
# last system error: 34
# Check failed: !params_.audio.enabled
Original issue's description:
> Separating video settings in VideoQualityTest.
>
> This is a simple refactoring of VideoQualityTest. It will help in adding audio related settings to VideoQualityTest.
>
> BUG=
>
> Committed: https://crrev.com/f07fb0013164bdb031dcc88dc83365a27643b2d9
> Cr-Commit-Position: refs/heads/master@{#14139}
TBR=stefan@webrtc.org,minyue@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review-Url: https://codereview.webrtc.org/2325723002
Cr-Commit-Position: refs/heads/master@{#14142}
the AEC. This solves the following issues:
-Even though the buffering was previously done using ringbuffers, those
were inefficiently used which caused a lot of hidden memcopys.
-The ringbuffers wasted a lot of space in the AEC state as they were too
long.
-The lowest and two upper bands were decoupled in the buffering, which
required extra code to handle.
-On top of the ringbuffers there was a second linear buffer that was
stored in the state which caused even more data to be stored on the
state.
-The incoming nearend frames were passed to the functions in the form
of buffers on the state, which made the code harder to read as it was
not immediately clear where the nearend signal was used, and when it
was modified.
The CL addresses this by replacing all the buffers by two linear buffers:
-One buffer before the AEC processing for producing nearend
blocks of size 64 that can be processed by the AEC.
-One inside the AEC processing that buffers the current
nearend block until the next block is processed.
The changes have been tested to be bitexact.
This CL will be followed by several other CLs, that refactor the other
buffers in the AEC.
BUG=webrtc:5298, webrtc:6018
Review-Url: https://codereview.webrtc.org/2311833002
Cr-Commit-Position: refs/heads/master@{#14141}
This is a simple refactoring of VideoQualityTest. It will help in adding audio related settings to VideoQualityTest.
BUG=
Review-Url: https://codereview.webrtc.org/2312613003
Cr-Commit-Position: refs/heads/master@{#14139}
A third_party remote for third_party/mockito/src is corrupt. Run
`git remote prune origin` in the checkout directory before syncing
Chromium.
Thanks to slan@ for providing this fix.
TBR=kjellander@webrtc.org
BUG=chromium:644722
NOTRY=True
Review-Url: https://codereview.webrtc.org/2326523002
Cr-Commit-Position: refs/heads/master@{#14138}
Reason for revert:
Breaks Chromium FYI bots because of link issue
Original issue's description:
> Don't use VoE legacy APIs in force_mic_volume_max tool.
>
> BUG=webrtc:4690
>
> Committed: https://crrev.com/ae9f2bdcef7f3a338ece6f57744c8c8f74d15483
> Cr-Commit-Position: refs/heads/master@{#14135}
TBR=henrika@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2320113002
Cr-Commit-Position: refs/heads/master@{#14137}
Due to https://crbug.com/644722 I had to clean a couple of Android
bots manually. But since the third_part/mockito/src dir is now removed
on those hosts, it's missing until the next sync of Chromium.
Since we have a smartness that avoid syncing in place, we need to force
a new sync for these bots to become healthy again.
TBR=ehmaldonado@webrtc.org
Review URL: https://codereview.webrtc.org/2317373003 .
Cr-Commit-Position: refs/heads/master@{#14134}
Right now, RuntimeExceptions thrown in an invoke function will kill the handler thread. This CL propagates the exceptions to the calling thread instead, to give the caller a change to handle them.
BUG=webrtc:6327
Review-Url: https://codereview.webrtc.org/2316223002
Cr-Commit-Position: refs/heads/master@{#14132}
Reason for revert:
Broke all Chromium libFuzzer builds
https://bugs.chromium.org/p/chromium/issues/detail?id=645069
Original issue's description:
> Setting up an RTP input fuzzer for NetEq
>
> This CL introduces a new fuzzer target neteq_rtp_fuzzer that
> manipulates the RTP header fields before inserting the packets into
> NetEq. A few helper classes are also introduced.
>
> BUG=webrtc:5447
> NOTRY=True
>
> Committed: https://crrev.com/2d273f1e97cd5030ed1686f27ce1118291b66395
> Cr-Commit-Position: refs/heads/master@{#14103}
TBR=ivoc@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:5447
Review-Url: https://codereview.webrtc.org/2328483002
Cr-Commit-Position: refs/heads/master@{#14131}
I could not find a single place it was used, outside of the unittests
for the sync packet support itself.
Review-Url: https://codereview.webrtc.org/2309303002
Cr-Commit-Position: refs/heads/master@{#14130}
libjingle_peerconnection_so is not including common_config, which is
causing some differences is the defines.
We'd like to prevent that happening in the future.
NOTRY=True
BUG=webrtc:5949
Review-Url: https://codereview.webrtc.org/2325603002
Cr-Commit-Position: refs/heads/master@{#14127}