Fix target bitrate handling for a single layer VP9 screenshare
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}
This commit is contained in:

committed by
Commit Bot

parent
977b3351b9
commit
9ef5e056f9
@ -296,6 +296,18 @@ TEST_F(VideoCodecInitializerTest,
|
||||
kDefaultMaxBitrateBps / 1000);
|
||||
}
|
||||
|
||||
TEST_F(VideoCodecInitializerTest,
|
||||
Vp9SingleSpatialLayerTargetBitrateIsEqualToCodecMaxBitrate) {
|
||||
SetUpFor(VideoCodecType::kVideoCodecVP9, 1, 1, true);
|
||||
VideoStream stream = DefaultStream();
|
||||
stream.num_temporal_layers = 1;
|
||||
streams_.push_back(stream);
|
||||
|
||||
EXPECT_TRUE(InitializeCodec());
|
||||
EXPECT_EQ(codec_out_.spatialLayers[0].targetBitrate,
|
||||
kDefaultMaxBitrateBps / 1000);
|
||||
}
|
||||
|
||||
TEST_F(VideoCodecInitializerTest,
|
||||
Vp9KeepBitrateLimitsIfNumberOfSpatialLayersIsReducedToOne) {
|
||||
// Request 3 spatial layers for 320x180 input. Actual number of layers will be
|
||||
|
Reference in New Issue
Block a user