If e.g. CPU adaptation reduces input video size too much, video pipeline would
reduce the number of used simulcast streams/spatial layers. This may result in
disabled video if some streams are disabled by Rtp encoding parameters API.
Bug: webrtc:11319
Change-Id: Id7f157255599dcb6f494129b83477cda4bea982a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168480
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30498}
This change clarifies the semantics of this field:
unset: Depends on context.
== 0: Invalid.
== 1: No temporal layering.
>= 2: Temporal layering.
We should try to remove the wrapping optional later.
Bug: webrtc:11297
Change-Id: Id765f2dc1d31a4ba3cd424978ac6054cd60152ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166528
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30336}
The experiment was extended to support per-codec minimum bitrates
for the following codecs:
* VP8
* VP9
* H.264
The old semantic meaning for the field trial is retained, in that
specifying "br:" applies a minimum bitrate to all codecs. If "br:"
is not specified, the per-codec minimum config is consulted.
Bug: webrtc:11024
Change-Id: I89630262c7710771d5e25d039fe35f0bd217b58a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156171
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29450}
* Increase 540p bitrate to 1.2mbps from 0.9mpbs.
960x540 bitrate was by far smallest in terms of bits per pixel. This change
brings it closer to other resolutions.
* Interpolate max/target/min bitrates for non-standard resolutions based
on number of pixels.
Bug: webrtc:10965
Change-Id: If0aa56bb4c614ca09ee39d3a2b700aab2ffa1a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152828
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29195}
When using simulcast, if the source is too small, it might end up generating
layer sizes that are problematic for hardware encoders.
We can temporarily restore the old behavior that adapts the layer count to the source size until we fix the HW encoder behavior.
to fix HW encoder issues
Bug: webrtc:10849, chromium:990823
Change-Id: Ie1486c9209b408c797c92d1b319d4116fe77171b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148069
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28761}
Some applications are having issues controlling how many active simulcast
layers they have and configuring them when the source track changes size
and rely on the old behavior automatically reducing the layer count.
Using the WebRTC-LegacySimulcastLayerLimit field trial, they can get back
the old behavior until they transition to the newer API.
Bug: webrtc:8785
Change-Id: I92d4dcd62b79a483a6a8867f97c5f502c6aa4db7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146709
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28666}
As per the spec, you should be able to use simulcast with screenshare.
We remove the field trial for it and keep the old behavior only for
screenshare sources with conference flag on.
Bug: webrtc:8785
Change-Id: I1d6d4e18256fb5cfe0195620706de068f25b8d9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144785
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28543}
kMaxSimulcastStreams, kMaxSpatialLayers and kMaxTemporalStreams don't
really beling on VideoBitrateAllocation.
common_types.h is going away and it feels dubious to requrie include
of the full VideoEncoder api to use them. Therefore moving them into a
seprate file/target.
Also includes some remaining cleanup of includes.
Bug: webrtc:9271
Change-Id: I7ded3d97a9a835ac756159700774445a2b93a697
Reviewed-on: https://webrtc-review.googlesource.com/c/117305
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26299}
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}
The width/height of the highest simulcast layer is divisible by 2^exponent.
The exponent is allowed to be set through the field trial.
Bug: none
Change-Id: I2ec0af2deb6e3a176f705a2ad1c250a35b086701
Reviewed-on: https://webrtc-review.googlesource.com/c/104067
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25159}
This reverts commit 89b2963810.
Reason for revert: Make experiment default off to not mess up data in re-launch.
Original change's description:
> Reland "Enable simulcast screenshare by default"
>
> This is a reland of d43c692ba7 after fixes
> to failing chromium tests. No change to the original CL were done.
> Original CL reviewed on: https://webrtc-review.googlesource.com/87560
>
> TBR=stefan@webrtc.org
>
> Bug: chromium:690537
> Change-Id: I6b59ffc90d789aff21c7e52b118d3dfbe756c8a9
> Reviewed-on: https://webrtc-review.googlesource.com/89081
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24013}
TBR=ilnik@webrtc.org,sprang@webrtc.org,stefan@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: chromium:690537, b:116052898
Change-Id: I429677de5547ce3a7badfb4414231ff9589e7414
Reviewed-on: https://webrtc-review.googlesource.com/101560
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24798}
When simulcast screenshare is enabled, the max bitrate for the high
quality stream can be limited based on the resolution.
This CL fixes a bug where that limit could get so low that it is below
the min bitrate of the top layer, which in turn could cause the encoder
to fail initialization.
Bug: webrtc:9761
Change-Id: I093bd0ba68fe0165e8982d169daf02cdf912c924
Reviewed-on: https://webrtc-review.googlesource.com/100682
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24767}
The min bitrate is too low, and burstiness may cause overuse when first
enabling the stream, if the total available bitrate is low.
Bug: webrtc:9734
Change-Id: I399e0e809648f064feb87c73ece0c23a569b2750
Reviewed-on: https://webrtc-review.googlesource.com/99506
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24678}
This reverts commit a3df0f2d05.
Reason for revert: We decided to keep a killswitch in M70 just in case.
Original reviewed at: https://webrtc-review.googlesource.com/c/src/+/90251
Bug: chromium:690537
Change-Id: Ieb0eb8d5487e03fc55a221f10366ed9768a6eb16
Reviewed-on: https://webrtc-review.googlesource.com/95061
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24385}
Change experimental max bitrate setting from 1.6Mbps to 1.25Mbps in
order to allow a larger fraction of participants to receive this layer.
Add a new field trial to allow setting the number of temporal layers for
the high-quality simulcast stream in screensharing separately from the
temporal layer count for regular video.
Bug: webrtc:9477
Change-Id: I1341b774f870c50710901da24963bd3ede96ffd8
Reviewed-on: https://webrtc-review.googlesource.com/95101
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24356}
This reverts commit ced5cfdb35.
Reason for revert: Breaks downstream project.
Original change's description:
> Add initial support for RtpEncodingParameters max_framerate.
>
> Add support to set the framerate to the maximum of |max_framerate|.
> Different framerates are currently not supported per stream for video.
>
> Bug: webrtc:9597
> Change-Id: Ie326617b66bd97be387f809a7f82b97b8f3ff5fe
> Reviewed-on: https://webrtc-review.googlesource.com/92392
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24270}
TBR=steveanton@webrtc.org,magjed@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,srte@webrtc.org
Change-Id: I508fe48e0c53996654f657357913ac307dc256bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9597
Reviewed-on: https://webrtc-review.googlesource.com/94060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24277}
Add support to set the framerate to the maximum of |max_framerate|.
Different framerates are currently not supported per stream for video.
Bug: webrtc:9597
Change-Id: Ie326617b66bd97be387f809a7f82b97b8f3ff5fe
Reviewed-on: https://webrtc-review.googlesource.com/92392
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24270}
* Make shorter 4-frame pattern default if 2 temporal layers are used.
* Make DefaultTemporalLayers usable by upper simulcast stream with 2tl.
* If experimental settings are enable, bump the max bitrate for the top
stream. Since we're now using probing everywhere the rampup should be
less of an issue.
* Additionally, fixes an issue in full stack tests, where
ScopedFieldTrials in an experiment would override the
--force_fieldtrials specified at command line. Some trials added by
the test bots caused timeouts without this.
Bug: webrtc:9477
Change-Id: I42410605d416b51c4fbfe5b6b850997484af583c
Reviewed-on: https://webrtc-review.googlesource.com/92883
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24252}
This is a reland of d43c692ba7 after fixes
to failing chromium tests. No change to the original CL were done.
Original CL reviewed on: https://webrtc-review.googlesource.com/87560TBR=stefan@webrtc.org
Bug: chromium:690537
Change-Id: I6b59ffc90d789aff21c7e52b118d3dfbe756c8a9
Reviewed-on: https://webrtc-review.googlesource.com/89081
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24013}
Also adjust to base-layer fraction for the shortened 3-tl pattern to be
60%, just like the 2-tl setting.
This CL removes direct use of the allocation matrix and moves it behind
a static getter.
Bug: webrtc:9477
Change-Id: Ifd7d1edffa0555024fd252834357b926997d13b5
Reviewed-on: https://webrtc-review.googlesource.com/86681
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23834}
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
TBR=sprang@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org
Bug: webrtc:5840
Change-Id: I2d3b130622dd7ceec5528f3ab6c46f109e6bafb8
Reviewed-on: https://webrtc-review.googlesource.com/84743
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23715}
This reverts commit 07efe436c9.
Reason for revert: Breaks downstream project.
cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).
Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
>
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
> under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
>
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}
TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com
Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
Target bitrate is set to 0.75 of the max bitrate.
Bug: webrtc:9341, webrtc:8655
Change-Id: I9a8c8bb95bb1532d45f05578832418464452340e
Reviewed-on: https://webrtc-review.googlesource.com/79821
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23676}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
Number of temporal layers in screen sharing was unintentionally changed
from 3 to 2 in a796a7ee85.
This changes the value to 3.
Bug: webrtc:9013
Change-Id: I68291b49276afd2689f20d1c3581e149aa6fd610
Reviewed-on: https://webrtc-review.googlesource.com/61860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22621}
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 reverts commit e27e0aca94.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
>
> This reverts commit d2ed0a4c9e.
>
> Reason for revert: Breaks downstream projects.
>
> Original change's description:
> > Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> >
> > temporal_layer_thresholds_bps served only one purpose: its size was used
> > to infer number of temporal layers. I replaced it with num_temporal_layers,
> > which does what is says.
> >
> > The practical reason for this change is the need to have possibility to
> > distinguish between cases when VP9 SVC temporal layering was/not set
> > through field trial. That was not possible with
> > temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> > layer.
> >
> > Bug: webrtc:8518
> > Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> > Reviewed-on: https://webrtc-review.googlesource.com/58084
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22230}
>
> TBR=sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org
>
> Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8518
> Reviewed-on: https://webrtc-review.googlesource.com/58902
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22234}
TBR=sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,ssilkin@webrtc.org
Change-Id: I1900c6b845b9baa9430fb72c3f4e7f2a44b3a8b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/59160
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22256}