Use codec's bitrate limits if SVC is off.
Adding SVC rate allocator and layering configurator caused regression for VP9 non-SVC senders. SVC bitrate limits, which were supposed to be used only when spatial layering is enabled, are applied when encoding single spatial layer. E.g. for VP9 360p sender maximum bitrate is limited to 500kbps. This fixes the regression. If sender is configured to send VP9 single layer then codec's bitrate limits are applied to this layer. Bug: webrtc:9151, chromium:831093 Change-Id: Ia1ae4087155ad7917a3443304a21532f1e68ea65 Reviewed-on: https://webrtc-review.googlesource.com/69813 Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Michael Horowitz <mhoro@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22862}
This commit is contained in:

committed by
Commit Bot

parent
30bd4038cf
commit
fafeac3517
@ -222,6 +222,13 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
GetSvcConfig(video_codec.width, video_codec.height,
|
||||
video_codec.VP9()->numberOfSpatialLayers,
|
||||
video_codec.VP9()->numberOfTemporalLayers);
|
||||
|
||||
const bool no_spatial_layering = (spatial_layers.size() == 1);
|
||||
if (no_spatial_layering) {
|
||||
// Use codec's bitrate limits.
|
||||
spatial_layers.back().minBitrate = video_codec.minBitrate;
|
||||
spatial_layers.back().maxBitrate = video_codec.maxBitrate;
|
||||
}
|
||||
}
|
||||
|
||||
RTC_DCHECK(!spatial_layers.empty());
|
||||
|
Reference in New Issue
Block a user