Remove bitrate_priority argument from GetSimulcastConfig()
This is a cleanup of simulcast.cc. bitrate_priority is not needed to decide simulcast config. Move setting of bitrate priority in VideoStream one level up, to EncoderStreamFactory::CreateEncoderStreams().
Bug: webrtc:351644568
Change-Id: I002d728ccf8d141fe4bbb32b390129ce57c830cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357101
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42629}
diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc
index 3ab079c..3f57d09 100644
--- a/media/engine/webrtc_video_engine_unittest.cc
+++ b/media/engine/webrtc_video_engine_unittest.cc
@@ -9591,9 +9591,8 @@
if (num_configured_streams > 1 || conference_mode) {
expected_streams = GetSimulcastConfig(
/*min_layers=*/1, num_configured_streams, capture_width,
- capture_height, webrtc::kDefaultBitratePriority,
- kDefaultVideoMaxQpVpx, screenshare && conference_mode, true,
- field_trials_, webrtc::kVideoCodecVP8);
+ capture_height, kDefaultVideoMaxQpVpx, screenshare && conference_mode,
+ true, field_trials_, webrtc::kVideoCodecVP8);
if (screenshare && conference_mode) {
for (const webrtc::VideoStream& stream : expected_streams) {
// Never scale screen content.
diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
index 82bc6e3..90beed8 100644
--- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
+++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
@@ -72,7 +72,6 @@
using VideoStatistics = VideoCodecTestStats::VideoStatistics;
const int kBaseKeyFrameInterval = 3000;
-const double kBitratePriority = 1.0;
const int kDefaultMaxFramerateFps = 30;
const int kMaxQp = 56;
@@ -80,7 +79,7 @@
FieldTrialBasedConfig trials;
const std::vector<webrtc::VideoStream> streams = cricket::GetSimulcastConfig(
/*min_layer=*/1, codec_settings->numberOfSimulcastStreams,
- codec_settings->width, codec_settings->height, kBitratePriority, kMaxQp,
+ codec_settings->width, codec_settings->height, kMaxQp,
/* is_screenshare = */ false, true, trials, webrtc::kVideoCodecVP8);
for (size_t i = 0; i < streams.size(); ++i) {
diff --git a/test/video_codec_tester.cc b/test/video_codec_tester.cc
index 1b51010..6b783dc 100644
--- a/test/video_codec_tester.cc
+++ b/test/video_codec_tester.cc
@@ -1298,7 +1298,7 @@
const std::vector<webrtc::VideoStream> streams = cricket::GetSimulcastConfig(
/*min_layer=*/1, num_spatial_layers, vc->width, vc->height,
- /*bitrate_priority=*/1.0, cricket::kDefaultVideoMaxQpVpx,
+ cricket::kDefaultVideoMaxQpVpx,
/*is_screenshare=*/false, /*temporal_layers_supported=*/true,
field_trials, webrtc::kVideoCodecVP8);
diff --git a/video/config/encoder_stream_factory.cc b/video/config/encoder_stream_factory.cc
index 936e7f2..9c3cdc2 100644
--- a/video/config/encoder_stream_factory.cc
+++ b/video/config/encoder_stream_factory.cc
@@ -149,15 +149,23 @@
}
}
+ std::vector<webrtc::VideoStream> streams;
if (is_simulcast ||
webrtc::SimulcastUtility::IsConferenceModeScreenshare(encoder_config)) {
- return CreateSimulcastOrConferenceModeScreenshareStreams(
+ streams = CreateSimulcastOrConferenceModeScreenshareStreams(
trials, frame_width, frame_height, encoder_config,
experimental_min_bitrate);
+ } else {
+ streams = CreateDefaultVideoStreams(
+ frame_width, frame_height, encoder_config, experimental_min_bitrate);
}
- return CreateDefaultVideoStreams(frame_width, frame_height, encoder_config,
- experimental_min_bitrate);
+ // The bitrate priority currently implemented on a per-sender level, so we
+ // just set it for the first simulcast layer.
+ RTC_DCHECK_GT(streams.size(), 0);
+ streams[0].bitrate_priority = encoder_config.bitrate_priority;
+
+ return streams;
}
std::vector<webrtc::VideoStream>
@@ -320,8 +328,7 @@
// or use the regular simulcast configuration path which is generic.
layers = GetSimulcastConfig(
FindRequiredActiveLayers(encoder_config),
- encoder_config.number_of_streams, width, height,
- encoder_config.bitrate_priority, encoder_config.max_qp,
+ encoder_config.number_of_streams, width, height, encoder_config.max_qp,
webrtc::SimulcastUtility::IsConferenceModeScreenshare(encoder_config),
temporal_layers_supported, trials, encoder_config.codec_type);
// Allow an experiment to override the minimum bitrate for the lowest
diff --git a/video/config/encoder_stream_factory_unittest.cc b/video/config/encoder_stream_factory_unittest.cc
index 47ecf9f..f095a08 100644
--- a/video/config/encoder_stream_factory_unittest.cc
+++ b/video/config/encoder_stream_factory_unittest.cc
@@ -79,4 +79,21 @@
}));
}
+TEST(EncoderStreamFactory, BitratePriority) {
+ constexpr double kBitratePriority = 0.123;
+ ExplicitKeyValueConfig field_trials("");
+ VideoEncoder::EncoderInfo encoder_info;
+ auto factory = rtc::make_ref_counted<EncoderStreamFactory>(encoder_info);
+ VideoEncoderConfig encoder_config;
+ encoder_config.number_of_streams = 2;
+ encoder_config.bitrate_priority = kBitratePriority;
+ encoder_config.simulcast_layers = {
+ LayerWithRequestedResolution({.width = 320, .height = 180}),
+ LayerWithRequestedResolution({.width = 640, .height = 360})};
+ auto streams =
+ factory->CreateEncoderStreams(field_trials, 640, 360, encoder_config);
+ ASSERT_EQ(streams.size(), 2u);
+ EXPECT_EQ(streams[0].bitrate_priority, kBitratePriority);
+ EXPECT_FALSE(streams[1].bitrate_priority);
+}
} // namespace webrtc
diff --git a/video/config/simulcast.cc b/video/config/simulcast.cc
index 00b8667..3180489 100644
--- a/video/config/simulcast.cc
+++ b/video/config/simulcast.cc
@@ -332,7 +332,6 @@
size_t max_layers,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool is_screenshare_with_conference_mode,
bool temporal_layers_supported,
@@ -344,8 +343,8 @@
const bool base_heavy_tl3_rate_alloc =
webrtc::RateControlSettings(trials).Vp8BaseHeavyTl3RateAllocation();
if (is_screenshare_with_conference_mode) {
- return GetScreenshareLayers(max_layers, width, height, bitrate_priority,
- max_qp, temporal_layers_supported,
+ return GetScreenshareLayers(max_layers, width, height, max_qp,
+ temporal_layers_supported,
base_heavy_tl3_rate_alloc, trials);
} else {
// Some applications rely on the old behavior limiting the simulcast layer
@@ -354,8 +353,8 @@
max_layers = LimitSimulcastLayerCount(width, height, min_layers, max_layers,
trials, codec);
- return GetNormalSimulcastLayers(max_layers, width, height, bitrate_priority,
- max_qp, temporal_layers_supported,
+ return GetNormalSimulcastLayers(max_layers, width, height, max_qp,
+ temporal_layers_supported,
base_heavy_tl3_rate_alloc, trials, codec);
}
}
@@ -364,7 +363,6 @@
size_t layer_count,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool temporal_layers_supported,
bool base_heavy_tl3_rate_alloc,
@@ -437,12 +435,7 @@
break;
}
}
- // Currently the relative bitrate priority of the sender is controlled by
- // the value of the lowest VideoStream.
- // TODO(bugs.webrtc.org/8630): The web specification describes being able to
- // control relative bitrate for each individual simulcast layer, but this
- // is currently just implemented per rtp sender.
- layers[0].bitrate_priority = bitrate_priority;
+
return layers;
}
@@ -450,7 +443,6 @@
size_t max_layers,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool temporal_layers_supported,
bool base_heavy_tl3_rate_alloc,
@@ -504,9 +496,6 @@
layers[1].max_bitrate_bps = max_bitrate_bps;
}
- // The bitrate priority currently implemented on a per-sender level, so we
- // just set it for the first simulcast layer.
- layers[0].bitrate_priority = bitrate_priority;
return layers;
}
diff --git a/video/config/simulcast.h b/video/config/simulcast.h
index af62206..3a377cb 100644
--- a/video/config/simulcast.h
+++ b/video/config/simulcast.h
@@ -41,7 +41,6 @@
size_t max_layers,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool is_screenshare_with_conference_mode,
bool temporal_layers_supported,
@@ -53,7 +52,6 @@
size_t max_layers,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool temporal_layers_supported,
bool base_heavy_tl3_rate_alloc,
@@ -65,7 +63,6 @@
size_t max_layers,
int width,
int height,
- double bitrate_priority,
int max_qp,
bool temporal_layers_supported,
bool base_heavy_tl3_rate_alloc,
diff --git a/video/config/simulcast_unittest.cc b/video/config/simulcast_unittest.cc
index e9d24e8..b1faeb0 100644
--- a/video/config/simulcast_unittest.cc
+++ b/video/config/simulcast_unittest.cc
@@ -20,7 +20,6 @@
using test::ExplicitKeyValueConfig;
constexpr int kQpMax = 55;
-constexpr double kBitratePriority = 2.0;
constexpr bool kScreenshare = true;
constexpr int kDefaultTemporalLayers = 3; // Value from simulcast.cc.
@@ -88,8 +87,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 1280, 720, kBitratePriority, kQpMax,
- !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 1280, 720, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
EXPECT_EQ(320u, streams[0].width);
@@ -108,10 +107,6 @@
EXPECT_EQ(kExpected[i].max_bitrate_bps, streams[i].max_bitrate_bps);
EXPECT_TRUE(streams[i].active);
}
- // Currently set on lowest stream.
- EXPECT_EQ(kBitratePriority, streams[0].bitrate_priority);
- EXPECT_FALSE(streams[1].bitrate_priority);
- EXPECT_FALSE(streams[2].bitrate_priority);
}
TEST(SimulcastTest, GetConfigWithBaseHeavyVP8TL3RateAllocation) {
@@ -123,8 +118,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 1280, 720, kBitratePriority, kQpMax,
- !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 1280, 720, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kExpected[0].min_bitrate_bps, streams[0].min_bitrate_bps);
EXPECT_EQ(static_cast<int>(0.4 * kExpected[0].target_bitrate_bps / 0.6),
@@ -144,8 +139,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 2;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 1280, 720, kBitratePriority, kQpMax,
- !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 1280, 720, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
EXPECT_EQ(640u, streams[0].width);
@@ -161,8 +156,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 800, 600, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 800, 600, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
EXPECT_EQ(400u, streams[0].width);
@@ -178,8 +173,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 100, 100, kBitratePriority, kQpMax, kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 100, 100, kQpMax, kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
// Simulcast streams number is never decreased for screenshare,
// even for very low resolution.
@@ -193,8 +188,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 800, 600, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 800, 600, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
EXPECT_EQ(200u, streams[0].width);
@@ -211,8 +206,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 2;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 640 + 1, 360 + 1, kBitratePriority, kQpMax,
- !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 640 + 1, 360 + 1, kQpMax, !kScreenshare, true,
+ trials, webrtc::kVideoCodecVP8);
// Must be divisible by |2 ^ (num_layers - 1)|.
EXPECT_EQ(kMaxLayers, streams.size());
@@ -229,8 +224,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 2;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 709, 501, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 709, 501, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
// Must be divisible by |2 ^ 2|.
EXPECT_EQ(kMaxLayers, streams.size());
@@ -247,8 +242,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 2;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 709, 501, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 709, 501, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
// Must be divisible by |2 ^ 3|.
EXPECT_EQ(kMaxLayers, streams.size());
@@ -265,18 +260,18 @@
const size_t kMinLayers = 1;
const int kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 320, 180, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 320, 180, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(1u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 640, 360,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 1920, 1080,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
}
@@ -287,18 +282,18 @@
const size_t kMinLayers = 3; // "HD" layer must be present!
const int kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 320, 180, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 320, 180, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 640, 360,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 1920, 1080,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
}
@@ -307,8 +302,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 1400, 800, kBitratePriority, kQpMax, kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 1400, 800, kQpMax, kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_GT(streams.size(), 1u);
for (size_t i = 0; i < streams.size(); ++i) {
@@ -329,8 +324,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 1;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 1400, 800, kBitratePriority, kQpMax, kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 1400, 800, kQpMax, kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
}
@@ -340,8 +335,8 @@
const size_t kMinLayers = 1;
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, 900, 800, kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, 900, 800, kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
EXPECT_EQ(900u, streams[2].width);
@@ -362,8 +357,8 @@
const std::vector<VideoStream> kExpectedNear = GetSimulcastBitrates720p();
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
- kMinLayers, kMaxLayers, kWidth, kHeight, kBitratePriority, kQpMax,
- !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
+ kMinLayers, kMaxLayers, kWidth, kHeight, kQpMax, !kScreenshare, true,
+ trials, webrtc::kVideoCodecVP8);
EXPECT_EQ(kMaxLayers, streams.size());
EXPECT_EQ(kWidth, streams[2].width);
@@ -387,22 +382,22 @@
std::vector<VideoStream> streams;
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 960, 540,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
// <960x540: 2 layers
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 960, 539,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 270,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
// <480x270: 1 layer
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 269,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(1u, streams.size());
}
@@ -414,30 +409,30 @@
std::vector<VideoStream> streams;
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 960, 540,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
// Lowest cropped height where max layers from higher resolution is used.
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 960, 512,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(3u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 960, 508,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 270,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
// Lowest cropped height where max layers from higher resolution is used.
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 256,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 254,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(1u, streams.size());
}
@@ -450,17 +445,17 @@
std::vector<VideoStream> streams;
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 270,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
// Lowest cropped height where max layers from higher resolution is used.
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 252,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(2u, streams.size());
streams = cricket::GetSimulcastConfig(kMinLayers, kMaxLayers, 480, 250,
- kBitratePriority, kQpMax, !kScreenshare,
- true, trials, webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials,
+ webrtc::kVideoCodecVP8);
EXPECT_EQ(1u, streams.size());
}
@@ -472,8 +467,7 @@
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
/* min_layers = */ 1, kMaxLayers, /* width = */ 960, /* height = */ 540,
- kBitratePriority, kQpMax, !kScreenshare, true, trials,
- webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
ASSERT_EQ(streams.size(), kMaxLayers);
EXPECT_EQ(240u, streams[0].width);
@@ -490,7 +484,7 @@
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
/* min_layers = */ 1, /* max_layers = */ 3, /* width = */ 1,
- /* height = */ 1, kBitratePriority, kQpMax, !kScreenshare, true, trials,
+ /* height = */ 1, kQpMax, !kScreenshare, true, trials,
webrtc::kVideoCodecVP8);
ASSERT_TRUE(!streams.empty());
@@ -509,8 +503,7 @@
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
/* min_layers = */ 1, kMaxLayers, /* width = */ 960, /* height = */ 540,
- kBitratePriority, kQpMax, !kScreenshare, true, trials,
- webrtc::kVideoCodecVP8);
+ kQpMax, !kScreenshare, true, trials, webrtc::kVideoCodecVP8);
ASSERT_EQ(streams.size(), kMaxLayers);
EXPECT_EQ(240u, streams[0].width);
@@ -526,12 +519,12 @@
const size_t kMaxLayers = 3;
std::vector<VideoStream> streams_vp8 = cricket::GetSimulcastConfig(
/* min_layers = */ 1, /* max_layers = */ 3, /* width = */ 1280,
- /* height = */ 720, kBitratePriority, kQpMax, !kScreenshare, true, trials,
+ /* height = */ 720, kQpMax, !kScreenshare, true, trials,
webrtc::kVideoCodecVP8);
std::vector<VideoStream> streams_vp9 = cricket::GetSimulcastConfig(
/* min_layers = */ 1, /* max_layers = */ 3, /* width = */ 1280,
- /* height = */ 720, kBitratePriority, kQpMax, !kScreenshare, true, trials,
+ /* height = */ 720, kQpMax, !kScreenshare, true, trials,
webrtc::kVideoCodecVP9);
ASSERT_EQ(streams_vp8.size(), kMaxLayers);
@@ -562,8 +555,7 @@
std::vector<VideoStream> streams = cricket::GetSimulcastConfig(
/* min_layers = */ 1, kMaxLayers, /* width = */ 1280, /* height = */ 720,
- kBitratePriority, kQpMax, !kScreenshare, true, trials,
- webrtc::kVideoCodecVP9);
+ kQpMax, !kScreenshare, true, trials, webrtc::kVideoCodecVP9);
ASSERT_EQ(streams.size(), kMaxLayers);
EXPECT_EQ(1280u, streams[2].width);
@@ -574,8 +566,7 @@
streams = cricket::GetSimulcastConfig(
/* min_layers = */ 1, kMaxLayers, /* width = */ 1276, /* height = */ 716,
- kBitratePriority, kQpMax, !kScreenshare, true, trials,
- webrtc::kVideoCodecVP9);
+ kQpMax, !kScreenshare, true, trials, webrtc::kVideoCodecVP9);
ASSERT_EQ(streams.size(), kMaxLayers);
EXPECT_EQ(1276u, streams[2].width);