Screen content simulcast layers should not be downscaled.

Fix config so, size isn't downscaled, add unit test coverage.

BUG=webrtc:7171, webrtc:4172

Review-Url: https://codereview.webrtc.org/2692343007
Cr-Commit-Position: refs/heads/master@{#16648}
This commit is contained in:
sprang
2017-02-16 07:35:22 -08:00
committed by Commit bot
parent d103f4ba4a
commit 3ebabf1c29
2 changed files with 11 additions and 2 deletions

View File

@ -230,8 +230,10 @@ std::vector<webrtc::VideoStream> GetSimulcastConfig(size_t max_streams,
streams[s].max_framerate = max_framerate;
}
width /= 2;
height /= 2;
if (!is_screencast) {
width /= 2;
height /= 2;
}
if (s == 0)
break;
}

View File

@ -4124,6 +4124,13 @@ class WebRtcVideoChannel2SimulcastTest : public testing::Test {
expected_streams = GetSimulcastConfig(
num_configured_streams, capture_width, capture_height, 0,
kDefaultQpMax, kDefaultVideoMaxFramerate, screenshare);
if (screenshare) {
for (const webrtc::VideoStream& stream : expected_streams) {
// Never scale screen content.
EXPECT_EQ(stream.width, capture_width);
EXPECT_EQ(stream.height, capture_height);
}
}
} else {
webrtc::VideoStream stream;
stream.width = capture_width;