This CL paves the way to making FrameBufferController injectable.
LibvpxVp8Encoder can manage multiple streams. Prior to this CL,
each stream had its own frame buffer controller, all of them held
in a vector by LibvpxVp8Encoder. This complicated the code and
produced some code duplication (cf. SetupTemporalLayers).
This CL:
1. Replaces CreateVp8TemporalLayers() by a factory. (Later CLs
will make this factory injectable.)
2. Makes LibvpxVp8Encoder use a single controller. This single
controller will, in the case of multiple streams, delegate
its work to multiple controllers, but that fact is not visible
to LibvpxVp8Encoder.
This CL also squashes CL #126046 (Send notifications of RTT and
PLR changes to Vp8FrameBufferController) into it.
Bug: webrtc:10382
Change-Id: Id9b55734bebb457acc276f34a7a9e52cc19c8eb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126483
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27206}
To remove global task factory, rtc::TaskQueue need to loose it's convenient constructor
TaskQueueForTest can be used instead in tests and keep the convenient constructor.
Also cleanup the TaskQueueForTest a bit:
move the class to webrtc namespace
add default constructor
disallow copy using language construct instead of macro
cleanup build dependencies
rename build target (to match move out of the rtc namespace)
Bug: webrtc:10284
Change-Id: I17fddf3f8d4f363df7d495c28a5b0a28abda1ba7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127571
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27193}
It appesrs unused for a long time; an alias was deleted in
https://webrtc-review.googlesource.com/c/124488, but it was already
unused.
Bug: None
Change-Id: Idae6a72949968e22c784d512f9617240ef1169b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128569
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27187}
This is a partial fix for regression introduced in
https://webrtc-review.googlesource.com/c/src/+/125461
Currently, the OveruseFrameDetector::OnTargetFramerateUpdated is called
only then the encoder is reconfigured, with the default maxFramerate.
Changing it from default 5 to 60, or even 30 made the detector too
sensitive and it caused adaptation down due to CPU overuse even on
powerful machines.
Bug: webrtc:10310, chromium:940466
Change-Id: I7b0eabfc8f9b502e293af1a5b02fc5d4ab468c14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127280
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27094}
This prepares from removing the overload in a followup CL.
Bug: webrtc:10365
Change-Id: I80db16e7d37944e3dc7d2799bbf45ef8f439a22c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126860
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27091}
This is a reland after changes to the downstream project
VP9 screenshare is not used currently, and with these values according
to local testing with screenshare_loopback, we get performance not worse than current vp8 settings for similar uplink and downlink values.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126226
Bug: webrtc:10257
Change-Id: Ib21d7678bd839a3c47457515b0d768c0b979ea40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126524
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27040}
This reverts commit 12abf671fd.
Reason for revert: Breaks downstream project.
Original change's description:
> Reland "Tune vp9 screenshare bitrate and framerate of spatial layers"
>
> This is a reland without any changes as it seems problems with webrtc-in-chrome importer were flakes or
> caused by some issues within chrome codebase.
>
> Tune vp9 screenshare bitrate and framerate of spatial layers
>
> VP9 screenshare is not used currently, and with these values according
> to local testing with screenshare_loopback, we get performance not worse than current vp8 settings for similar uplink and downlink values.
>
> Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126226
>
> Bug: webrtc:10257
> Change-Id: Ie819d8bbab4f14877daac733d162e5ae7ebf2a8e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126460
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27036}
TBR=ilnik@webrtc.org,jeroendb@webrtc.org,kron@webrtc.org
Change-Id: I9ad9017b054213f931b3b39c641060d35565f17d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10257
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126523
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27037}
This is a reland without any changes as it seems problems with webrtc-in-chrome importer were flakes or
caused by some issues within chrome codebase.
Tune vp9 screenshare bitrate and framerate of spatial layers
VP9 screenshare is not used currently, and with these values according
to local testing with screenshare_loopback, we get performance not worse than current vp8 settings for similar uplink and downlink values.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126226
Bug: webrtc:10257
Change-Id: Ie819d8bbab4f14877daac733d162e5ae7ebf2a8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126460
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27036}
This reverts commit aaf3cb3adb.
Reason for revert: Chrome importer consitently failing after this change
Original change's description:
> Tune vp9 screenshare bitrate and framerate of spatial layers
>
> VP9 screenshare is not used currently, and with these values according
> to local testing with screenshare_loopback, we get performance not worse
> than current vp8 settings for similar uplink and downlink values.
>
> Bug: webrtc:10257
> Change-Id: Icabac04fbd3d616412bbae59291a1fc026d0a504
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126226
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27023}
TBR=ilnik@webrtc.org,kron@webrtc.org
Change-Id: I1ef1eeec8fe87a7662a354ef6362b7d463b2bb4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10257
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126340
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Commit-Queue: Jeroen de Borst <jeroendb@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27027}
VP9 screenshare is not used currently, and with these values according
to local testing with screenshare_loopback, we get performance not worse
than current vp8 settings for similar uplink and downlink values.
Bug: webrtc:10257
Change-Id: Icabac04fbd3d616412bbae59291a1fc026d0a504
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126226
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27023}
These are used by the test runner to pick up perf values
to be shown in the perf dashboard.
Bug: webrtc:10349
Change-Id: Ib3b2479f7a20b66192751bee8237d757f5870bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126220
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27020}
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.
After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.
Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
Vp8FrameBufferController is currently just a renamed Vp8TemporalLayers,
but subsequent CLs will modify Vp8FrameBufferController in ways that are
not relevant for Vp8TemporalLayers. Namely:
1. Loss notifications will be added.
2. Packet-loss rate will be tracked.
3. RTT will be tracked.
4. Vp8FrameBufferController will be made injectable.
Vp8TemporalLayers is retained in order to:
1. Avoid needlessly changing api/.
2. Place for code shared between DefaultTemporalLayers and ScreenshareLayers.
We can remove it in the future (with a proper public announcement).
Bug: webrtc:10382
Change-Id: I49ad1b9bc1954d51bb0b5e60361985f1eb12ae9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126045
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27009}
If minQP is reached and encoder undershoot consistently, we consider the
quality good enough and throttle encode frame rate.
Bug: webrtc:10310
Change-Id: Ifd07280040dd67ef6e544efdd4619d47bff951e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125461
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27003}
If minQP is reached and encoder undershoot consistently, we consider the
quality good enough and throttle encode frame rate.
This CL also adds perf tests for high fps vp9 screenshare.
Bug: webrtc:10310
Change-Id: I49fc7d31f9f596a9ecb5f85fe9e0c7861d4915f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125761
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26997}
In this CL:
- Updated Vp8TemporalLayers::OnEncodeDone to take a CodecSpecificInfo
instead of a CodecSpecificInfoVP8, so that both the VP8 specific and
generic information can be populated.
- Added structs to represent the GFD template structure.
- Added code to generate templates for video/screensharing.
Bug: webrtc:10342
Change-Id: I978f9d708597a6f86bbdc494e62acf7a7b400db3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123422
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26987}
For a single layer vp9, the target bitrate was not set correctly. This
may cause a problem for screenshare case, since target bitrate is
respected in that case. If it were less than a min bitrate, the only
spatial layer was permanently disabled.
Bug: webrtc:10257
Change-Id: I0980349adfc2970f810acc51a3e2a31ecbb2bbd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125681
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26970}
there's no easy way to inject the Clock in ScreenshareLayers under
normal use. To allow faking the clock, rtc::TimeMillis is used instead.
Bug: webrtc:10365
Change-Id: I46c7f76514672190a0f0f5816a2c858bc6c76fa4
Reviewed-on: https://webrtc-review.googlesource.com/c/125189
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26946}
CodecSpecificInfo has a default constructor, so initializing by memset is not necessary and is in the way of adding non-trivial members.
Related chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1495533
Bug: webrtc:10342
Change-Id: I36046f919f5fc34ea51de7288ff5c9cc0f2950b8
Reviewed-on: https://webrtc-review.googlesource.com/c/125093
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26924}
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).
The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.
Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.
[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}