From f49a8262cc4b89549375cde7b962bbf5ee3c0d07 Mon Sep 17 00:00:00 2001 From: Ilya Nikolaevskiy Date: Wed, 20 Mar 2024 15:09:20 +0100 Subject: [PATCH] Adjust min vp9 simulcast bitrate to closer mimic SVC behaviour If SVC is used, the minimum bitrate would be 30kbps, instead of 49, as configured in svc_config.h, because the overall stream will get min_bitrate from the default VP8 simulcast configuration, and this 30kbps will be allocated to the stream for svc_rate_allocator to divide between layers. However, with the configuration before this change, 49kbps would be always allocated to the lowest simulcast stream. Bug: webrtc:15852 Change-Id: I1c77f45654af8850180a83f8e3f4428cc42d086e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343760 Commit-Queue: Ilya Nikolaevskiy Reviewed-by: Sergey Silkin Cr-Commit-Position: refs/heads/main@{#41940} --- video/config/simulcast.cc | 2 +- video/config/simulcast_unittest.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/video/config/simulcast.cc b/video/config/simulcast.cc index 6db23d1aa2..42d644ee06 100644 --- a/video/config/simulcast.cc +++ b/video/config/simulcast.cc @@ -126,7 +126,7 @@ constexpr const SimulcastFormat kSimulcastFormatsVP9[] = { webrtc::DataRate::KilobitsPerSec(121)}, {320, 180, 1, webrtc::DataRate::KilobitsPerSec(142), webrtc::DataRate::KilobitsPerSec(142), - webrtc::DataRate::KilobitsPerSec(49)}, + webrtc::DataRate::KilobitsPerSec(30)}, {240, 135, 1, webrtc::DataRate::KilobitsPerSec(101), webrtc::DataRate::KilobitsPerSec(101), webrtc::DataRate::KilobitsPerSec(30)}, diff --git a/video/config/simulcast_unittest.cc b/video/config/simulcast_unittest.cc index 8dbc003738..e518d9bf1e 100644 --- a/video/config/simulcast_unittest.cc +++ b/video/config/simulcast_unittest.cc @@ -548,7 +548,6 @@ TEST(SimulcastTest, BitratesBasedOnCodec) { EXPECT_NE(streams_vp9[0].max_bitrate_bps, streams_vp8[0].max_bitrate_bps); EXPECT_NE(streams_vp9[0].target_bitrate_bps, streams_vp8[0].target_bitrate_bps); - EXPECT_NE(streams_vp9[0].min_bitrate_bps, streams_vp8[0].min_bitrate_bps); EXPECT_NE(streams_vp9[1].max_bitrate_bps, streams_vp8[1].max_bitrate_bps); EXPECT_NE(streams_vp9[1].target_bitrate_bps,