Commit 43a3abc8 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Re-enable VTConfigUtil tests for BT.2020 HDR on 10.10

These should expect BT.709 when the proper color spaces are not
supported by the OS version.

R=sandersd

Fixed: 1113153
Change-Id: I86805fc80904236d5051ece61ce6612e3b64e74d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339538
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795310}
parent f8a2f2f1
......@@ -268,24 +268,36 @@ TEST(VTConfigUtil, GetImageBufferColorSpace_GAMMA28) {
EXPECT_EQ(cs.ToGfxColorSpace(), GetImageBufferColorSpace(image_buffer));
}
TEST(VTConfigUtil, DISABLED_GetImageBufferColorSpace_BT2020_PQ) {
TEST(VTConfigUtil, GetImageBufferColorSpace_BT2020_PQ) {
auto cs = VideoColorSpace(VideoColorSpace::PrimaryID::BT2020,
VideoColorSpace::TransferID::SMPTEST2084,
VideoColorSpace::MatrixID::BT2020_NCL,
gfx::ColorSpace::RangeID::LIMITED);
auto image_buffer = CreateCVImageBuffer(cs);
ASSERT_TRUE(image_buffer);
EXPECT_EQ(cs.ToGfxColorSpace(), GetImageBufferColorSpace(image_buffer));
auto image_buffer_cs = GetImageBufferColorSpace(image_buffer);
// When BT.2020 is unavailable the default should be BT.709.
if (__builtin_available(macos 10.13, *))
EXPECT_EQ(cs.ToGfxColorSpace(), image_buffer_cs);
else
EXPECT_EQ(gfx::ColorSpace::CreateREC709(), image_buffer_cs);
}
TEST(VTConfigUtil, DISABLED_GetImageBufferColorSpace_BT2020_HLG) {
TEST(VTConfigUtil, GetImageBufferColorSpace_BT2020_HLG) {
auto cs = VideoColorSpace(VideoColorSpace::PrimaryID::BT2020,
VideoColorSpace::TransferID::ARIB_STD_B67,
VideoColorSpace::MatrixID::BT2020_NCL,
gfx::ColorSpace::RangeID::LIMITED);
auto image_buffer = CreateCVImageBuffer(cs);
ASSERT_TRUE(image_buffer);
EXPECT_EQ(cs.ToGfxColorSpace(), GetImageBufferColorSpace(image_buffer));
auto image_buffer_cs = GetImageBufferColorSpace(image_buffer);
// When BT.2020 is unavailable the default should be BT.709.
if (__builtin_available(macos 10.13, *))
EXPECT_EQ(cs.ToGfxColorSpace(), image_buffer_cs);
else
EXPECT_EQ(gfx::ColorSpace::CreateREC709(), image_buffer_cs);
}
} // namespace media
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