Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: webrtc/video/screenshare_loopback.cc

Issue 1287643002: Enabling spatial layers in VP9Impl. Filter layers in the loopback test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase master + fixing the comment Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/loopback.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/screenshare_loopback.cc
diff --git a/webrtc/video/screenshare_loopback.cc b/webrtc/video/screenshare_loopback.cc
index 4a13629734d1771f8d2e88639818936548f33a3d..a221e9c52f14e44797b853ac2fa5b655b9a8f25a 100644
--- a/webrtc/video/screenshare_loopback.cc
+++ b/webrtc/video/screenshare_loopback.cc
@@ -78,6 +78,27 @@ int NumTemporalLayers() {
return static_cast<int>(FLAGS_num_temporal_layers);
}
+DEFINE_int32(num_spatial_layers, 1, "Number of spatial layers to use.");
+int NumSpatialLayers() {
+ return static_cast<int>(FLAGS_num_spatial_layers);
+}
+
+DEFINE_int32(
+ tl_discard_threshold,
+ 0,
+ "Discard TLs with id greater or equal the threshold. 0 to disable.");
+int TLDiscardThreshold() {
+ return static_cast<int>(FLAGS_tl_discard_threshold);
+}
+
+DEFINE_int32(
+ sl_discard_threshold,
+ 0,
+ "Discard SLs with id greater or equal the threshold. 0 to disable.");
+int SLDiscardThreshold() {
+ return static_cast<int>(FLAGS_sl_discard_threshold);
+}
+
DEFINE_int32(min_transmit_bitrate, 400, "Min transmit bitrate incl. padding.");
int MinTransmitBitrate() {
return FLAGS_min_transmit_bitrate;
@@ -135,6 +156,12 @@ class ScreenshareLoopback : public test::Loopback {
explicit ScreenshareLoopback(const Config& config) : Loopback(config) {
CHECK_GE(config.num_temporal_layers, 1u);
CHECK_LE(config.num_temporal_layers, 2u);
+ CHECK_GE(config.num_spatial_layers, 1u);
+ CHECK_LE(config.num_spatial_layers, 5u);
+ CHECK(config.num_spatial_layers == 1 || config.codec == "VP9");
+ CHECK(config.num_spatial_layers == 1 || config.num_temporal_layers == 1);
+ CHECK_LT(config.tl_discard_threshold, config.num_temporal_layers);
+ CHECK_LT(config.sl_discard_threshold, config.num_spatial_layers);
vp8_settings_ = VideoEncoder::GetDefaultVp8Settings();
vp8_settings_.denoisingOn = false;
@@ -147,6 +174,8 @@ class ScreenshareLoopback : public test::Loopback {
vp9_settings_.frameDroppingOn = false;
vp9_settings_.numberOfTemporalLayers =
static_cast<unsigned char>(config.num_temporal_layers);
+ vp9_settings_.numberOfSpatialLayers =
+ static_cast<unsigned char>(config.num_spatial_layers);
}
virtual ~ScreenshareLoopback() {}
@@ -219,6 +248,9 @@ void Loopback() {
flags::MinTransmitBitrate(),
flags::Codec(),
flags::NumTemporalLayers(),
+ flags::NumSpatialLayers(),
+ flags::TLDiscardThreshold(),
+ flags::SLDiscardThreshold(),
flags::LossPercent(),
flags::LinkCapacity(),
flags::QueueSize(),
« no previous file with comments | « webrtc/video/loopback.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698