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}
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}
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}
This CL continues the work began by CL #119958, extending it
to ScreenshareLayers.
Bug: webrtc:10249
Change-Id: I59d0c062a93b288007977e00aa3a2e0929509e0c
Reviewed-on: https://webrtc-review.googlesource.com/c/120042
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26526}
FrameConfig is not specific to temporal layers. Anything that
can control referenced/updated buffers could potentially use it.
Bug: webrtc:10259
Change-Id: I04ed177ee884693798c3b69e35fd4255ce1e9062
Reviewed-on: https://webrtc-review.googlesource.com/c/120355
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26448}
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.
Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
Also renaming it Vp8TemporalLayers to show that it is codec specific.
Bug: webrtc:9012
Change-Id: I18187538b8142cdd7538f1a4ed1bada09d040f1f
Reviewed-on: https://webrtc-review.googlesource.com/c/104643
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25137}
This refactoring merged PopulateCodecSpecific and FrameEncoded into a
single callback method. It also removes the FrameConfig parameter and
instead relies on the temporal layer to remember it internally.
Bug: webrtc:9012
Change-Id: I489b76821b534398ad452643f1322f411d3455b1
Reviewed-on: https://webrtc-review.googlesource.com/95681
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24957}
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default
It also refreshes all the dependencies on field_trial.h and metrics.h.
A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm
Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
This CL introduces a few changes to the default VP8 temporal layers:
* The pattern is now reset on keyframes
* The sync flag is inferred rather than hard-coded
* Support is added for buffer search order
Bug: webrtc:9012
Change-Id: Ice19d32413d20982368a01a7d2540d155e185ad4
Reviewed-on: https://webrtc-review.googlesource.com/91863
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24288}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
OnRatesUpdated() is called every time the bitrate estimate, or once per
second. However, since we don't want to reconfigure libvpx too often,
just in case it interferes with the rate controller, so
ScreenshareLayers contains a boolean |bitrate_update_| which indicate
if the configuration should be updated on a call to
UpdateConfiguration().
However, it two rate updates happened between two frames, the first of
which changes the rates and second one does not, |bitrate_update_| will
be reset to false and the encoder won't get the desired config.
This CL makes sure we update the configuration iff the rate has changed
at any time since the last call to UpdateConfiguration().
Bug: webrtc:9012
Change-Id: I62af36cffe20ecb7d3f403b3eb11f23a9692d719
Reviewed-on: https://webrtc-review.googlesource.com/69040
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22826}
It would be nice to also delete the fields from CodecSpecificInfo,
but those fields are used on the receive side.
Bug: webrtc:8830
Change-Id: I1a3f13ea2c024cbd73b33fd9dd58e531d3576a55
Reviewed-on: https://webrtc-review.googlesource.com/64780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22625}
This CL moves all temporal layer rate allocation from
DefaultTemporalLayers and ScreenshareLayers into SimulcastRateAllocator.
This means we don't need an extra call-out to the TemporalLayers
interface to get the last allocation, which simplifies the code path a
lot.
It also paves the wave for removing the TemporalLayersFactory interface
(in a separate cl), which will further simplify the ownership model.
Bug: webrtc:9012
Change-Id: I6540b1848efa1a136dce449f13902ad479d5ee37
Reviewed-on: https://webrtc-review.googlesource.com/62420
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22502}
This work is in preparation for refactoring the TemporalLayers api.
Bug: webrtc:9012
Change-Id: I01908ee034fb79996e687ff72d10178acf102321
Reviewed-on: https://webrtc-review.googlesource.com/61781
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22445}
This is in preparation for
https://webrtc-review.googlesource.com/c/src/+/36340
With these changes we can avoid some strange #ifdefs in the code
that uses temporal layers.
Bug: webrtc:7925
Change-Id: I472210738ccc9f73812b8863951befeabec56f15
Reviewed-on: https://webrtc-review.googlesource.com/41280
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21759}
Try to use frame timestamps first if they look reasonable, otherwise
use realtime clock.
Also, lower limit from 90% of target to 85%.
Bug: webrtc:4172, chromium:802290
Change-Id: Iad489be7c7cf637345be4795e5089936ab9fab07
Reviewed-on: https://webrtc-review.googlesource.com/41041
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21729}
This is a reland of https://webrtc-review.googlesource.com/34380
The main problem with that CL was that we used frame timestamps as basis
for frame dropping, but those might not be continuous or even populated
in some circumstances.
Additionally, I found that the bitrate was off since the encoder does
not not take the dropped frames into account, so if we drop every other
frame continiusoly, the bitrate sent will be around half of the target.
Patch set 1 is the original CL, subsequent patch sets cotains fixes.
Bug: webrtc:4172
Change-Id: I8ec8dddcebf4ce44f28dd9055cf9c46bbd68e4a6
Reviewed-on: https://webrtc-review.googlesource.com/39201
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21601}
This reverts commit 28a06b16cc.
Reason for revert: Causes some unexpected perf changes.
Original change's description:
> Smoother frame dropping when screenshare_layers limits fps
>
> Currently, when input fps is higher than the configured target fps in
> screenshare_layers, we drop frames with the help of a rate tracker using
> a one second sliding window. This is not optimal.
> For instance, given a 5fps limit and a 30fps capturer, the window will
> not be saturated until we have added the first 5 frames. Then we will
> drop all frames until the oldest one drops out, at which point we can
> immediately fill it's place. This results in quick 5 frame bursts every
> second.
>
> In addition to rate tracker, also set a limit on minimum interval
> required between input frames, based on target frame rate.
>
> Bug: webrtc:4172
> Change-Id: I49f0abf4d549673cc6b3fafe580b529ea3feaf57
> Reviewed-on: https://webrtc-review.googlesource.com/34380
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21325}
TBR=ilnik@webrtc.org,sprang@webrtc.org
Change-Id: I7ca5b0c847310dbb11dce28773082eac946c0ba4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:4172
Reviewed-on: https://webrtc-review.googlesource.com/34780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21354}
Currently, when input fps is higher than the configured target fps in
screenshare_layers, we drop frames with the help of a rate tracker using
a one second sliding window. This is not optimal.
For instance, given a 5fps limit and a 30fps capturer, the window will
not be saturated until we have added the first 5 frames. Then we will
drop all frames until the oldest one drops out, at which point we can
immediately fill it's place. This results in quick 5 frame bursts every
second.
In addition to rate tracker, also set a limit on minimum interval
required between input frames, based on target frame rate.
Bug: webrtc:4172
Change-Id: I49f0abf4d549673cc6b3fafe580b529ea3feaf57
Reviewed-on: https://webrtc-review.googlesource.com/34380
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21325}
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
Bug: None
Change-Id: Iedebf4dc56a973306e7d7e7649525879808dc72b
Reviewed-on: https://webrtc-review.googlesource.com/23578
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20878}
This is expected to result in a slight loss of overall quality, but
should offset by quicker switching between temporal layers with flaky
connections.
Bug: webrtc:7694
Change-Id: Ib605802bb59f12773652324ac66cdf4774ae6bb6
Reviewed-on: https://webrtc-review.googlesource.com/6881
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20160}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc (Browse further)