From 6ef1b34aae1bcd02ed261ebc5daab14cc4b8db1b Mon Sep 17 00:00:00 2001 From: sprang Date: Mon, 13 Mar 2017 02:01:32 -0700 Subject: [PATCH] Fix perf test regression for screenshare and vp9. Turns out temporal_layer_thresholds_bps doesn't work quite as expected. It's for instance not honored at all for normal VP8 video. We need to take a pass over this in general. BUG=chromium:700297 Review-Url: https://codereview.webrtc.org/2744823002 Cr-Commit-Position: refs/heads/master@{#17199} --- webrtc/video/video_quality_test.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc index cd83754291..6f4fc78d5d 100644 --- a/webrtc/video/video_quality_test.cc +++ b/webrtc/video/video_quality_test.cc @@ -1155,15 +1155,12 @@ VideoStream VideoQualityTest::DefaultVideoStream(const Params& params) { stream.target_bitrate_bps = params.video.target_bitrate_bps; stream.max_bitrate_bps = params.video.max_bitrate_bps; stream.max_qp = 52; - if (params.video.num_temporal_layers > 1) { - RTC_CHECK_LE(params.video.num_temporal_layers, kMaxTemporalStreams); - if (params.video.codec == "VP8") { - for (int i = 0; i < params.video.num_temporal_layers - 1; ++i) { - stream.temporal_layer_thresholds_bps.push_back(static_cast( - stream.target_bitrate_bps * - kVp8LayerRateAlloction[params.video.num_temporal_layers][i])); - } - } + // TODO(sprang): Can we make this less of a hack? + if (params.video.num_temporal_layers == 2) { + stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); + } else if (params.video.num_temporal_layers == 3) { + stream.temporal_layer_thresholds_bps.push_back(stream.max_bitrate_bps / 4); + stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); } return stream; }