Commit df63276b authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/V4L2VEA, VaapiVEA: Ignore temporal layers request

When application requests simulcast, libwebrtc configures
temporal layers on each stream. If VaapiVEA and V4L2VEA refuses
the temporal layer encoding, then we cannot make use of
HW encoders on ChromeOS in simulcast case. Ignoring temporal
layers and producing a  simple stream causes a little less
flexibility on a video call background, but not so critical.
So V4L2VEA and VaapiVEA ignores the request as intended.

Bug: 1030199, 1071089
Test: webrtc.RTCPeerConnection.*
Change-Id: Iff153d76c05a1a994a609b97956dbb1fe041c627
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154359
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760392}
parent 72383447
......@@ -200,8 +200,11 @@ bool V4L2VideoEncodeAccelerator::Initialize(const Config& config,
TRACE_EVENT0("media,gpu", "V4L2VEA::Initialize");
VLOGF(2) << ": " << config.AsHumanReadableString();
if (config.HasTemporalLayer() || config.HasSpatialLayer()) {
VLOGF(1) << "Neither temporal nor spatial layer encoding is supported";
// V4L2VEA doesn't support temporal layers but we let it pass here to support
// simulcast.
if (config.HasSpatialLayer()) {
VLOGF(1) << "Spatial layer encoding is supported";
return false;
}
......
......@@ -279,8 +279,11 @@ bool VaapiVideoEncodeAccelerator::Initialize(const Config& config,
DCHECK_EQ(state_, kUninitialized);
VLOGF(2) << "Initializing VAVEA, " << config.AsHumanReadableString();
if (config.HasTemporalLayer() || config.HasSpatialLayer()) {
VLOGF(1) << "Neither temporal nor spatial layer encoding is supported";
// VaapiVEA doesn't support temporal layers but we let it pass here to support
// simulcast.
if (config.HasSpatialLayer()) {
VLOGF(1) << "Spatial layer encoding is supported";
return false;
}
......
......@@ -71,7 +71,6 @@ TEST_P(VaapiVEAInitializeTest, SpatialLayerAndTemporalLayerEncoding) {
}
constexpr VaapiVEAInitializeTestParam kTestCases[] = {
{3u, 1u, false}, // Temporal Layer only.
{1u, 3u, false}, // Spatial Layer only.
{3u, 3u, false}, // Temporal + Spatial Layer.
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment