Commit fa87a4c5 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Chromium LUCI CQ

media/gpu/AV1Decoder: Deny av1 10bits streams on ChromeOS

The hardware video decoder outputs color artifacts with av1
10bits streams. We deny av1 10bits so that software decoders are
instead used for them.

Bug: b:174722425
Test: No artifacts with 10 bits streams (i.e. software decoders are used) on volteer
Change-Id: I0280d9e2206366761ca670b123f90e49752d8448
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616642
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843420}
parent 111aff83
......@@ -237,6 +237,11 @@ AcceleratedVideoDecoder::DecodeResult AV1Decoder::DecodeInternal() {
DVLOG(1) << "Film grain streams are not supported";
return kDecodeError;
}
if (new_bit_depth != 8u) {
// TODO(b/174722425): Decode 10 bits streams once it is fixed.
DVLOG(1) << "10 and 12 bits streams are not supported";
return kDecodeError;
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
const gfx::Size new_frame_size(
......
......@@ -362,12 +362,19 @@ TEST_F(AV1DecoderTest, DecodeShowExistingPictureStream) {
}
TEST_F(AV1DecoderTest, Decode10bitStream) {
constexpr gfx::Size kFrameSize(320, 180);
constexpr gfx::Size kRenderSize(320, 180);
constexpr auto kProfile = libgav1::BitstreamProfile::kProfile0;
const std::string k10bitStream("bear-av1-320x180-10bit.webm");
std::vector<scoped_refptr<DecoderBuffer>> buffers = ReadWebm(k10bitStream);
ASSERT_FALSE(buffers.empty());
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
std::vector<DecodeResult> expected = {DecodeResult::kDecodeError};
EXPECT_EQ(Decode(buffers[0]), expected);
// Once AV1Decoder gets into an error state, Decode() returns kDecodeError
// until Reset().
EXPECT_EQ(Decode(buffers[0]), expected);
#else
constexpr gfx::Size kFrameSize(320, 180);
constexpr gfx::Size kRenderSize(320, 180);
constexpr auto kProfile = libgav1::BitstreamProfile::kProfile0;
std::vector<DecodeResult> expected = {DecodeResult::kConfigChange};
std::vector<DecodeResult> results;
for (auto buffer : buffers) {
......@@ -394,6 +401,7 @@ TEST_F(AV1DecoderTest, Decode10bitStream) {
testing::Mock::VerifyAndClearExpectations(mock_accelerator_);
}
EXPECT_EQ(results, expected);
#endif
}
TEST_F(AV1DecoderTest, DecodeSVCStream) {
......
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