Keep bitrate constraints.

Don't relax layer bitrate constraints if spatial layering was requested.

Bug: webrtc:10063
Change-Id: Ie572fb6c5fbc677a7dd240dc75b3d75a6e784001
Reviewed-on: https://webrtc-review.googlesource.com/c/112139
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25828}
This commit is contained in:
Sergey Silkin
2018-11-28 13:32:13 +01:00
committed by Commit Bot
parent ff088a1702
commit 3312092b42
2 changed files with 21 additions and 1 deletions

View File

@ -181,7 +181,10 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
video_codec.VP9()->numberOfTemporalLayers,
video_codec.mode == VideoCodecMode::kScreensharing);
const bool no_spatial_layering = (spatial_layers.size() == 1);
// If there was no request for spatial layering, don't limit bitrate
// of single spatial layer.
const bool no_spatial_layering =
video_codec.VP9()->numberOfSpatialLayers <= 1;
if (no_spatial_layering) {
// Use codec's bitrate limits.
spatial_layers.back().minBitrate = video_codec.minBitrate;