/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// ITU-T H.265 §D.3.28 suggests c=0 green, c=1 blue, c=2 red on the wire, // regardless of the R/G/B storage order in Smpte2086Metadata.
TEST(HDRUtils, EncodeSmpte2086_PrimaryOrder)
{
nsTArray<uint8_t> buf;
ASSERT_TRUE(EncodeSmpte2086Payload(MakeBT2020_1000nit(), buf));
ASSERT_EQ(buf.Length(), 24u);
// Green X = round(0.170 * 50000) = 8500 = 0x2134
EXPECT_EQ(buf[0], 0x21u);
EXPECT_EQ(buf[1], 0x34u); // Green Y = round(0.797 * 50000) = 39850 = 0x9BAA
EXPECT_EQ(buf[2], 0x9Bu);
EXPECT_EQ(buf[3], 0xAAu); // Blue X = round(0.131 * 50000) = 6550 = 0x1996
EXPECT_EQ(buf[4], 0x19u);
EXPECT_EQ(buf[5], 0x96u); // Blue Y = round(0.046 * 50000) = 2300 = 0x08FC
EXPECT_EQ(buf[6], 0x08u);
EXPECT_EQ(buf[7], 0xFCu); // Red X = round(0.708 * 50000) = 35400 = 0x8A48
EXPECT_EQ(buf[8], 0x8Au);
EXPECT_EQ(buf[9], 0x48u); // Red Y = round(0.292 * 50000) = 14600 = 0x3908
EXPECT_EQ(buf[10], 0x39u);
EXPECT_EQ(buf[11], 0x08u);
}
// Verify white point and luminance fields.
TEST(HDRUtils, EncodeSmpte2086_WhitePointAndLuminance)
{
nsTArray<uint8_t> buf;
ASSERT_TRUE(EncodeSmpte2086Payload(MakeBT2020_1000nit(), buf));
ASSERT_EQ(buf.Length(), 24u);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.