This is an automatic generated email to let you know that the following patch 
were queued:

Subject: edid-decode: support new colorimetry bits
Author:  Hans Verkuil <[email protected]>
Date:    Thu Sep 16 12:04:28 2021 +0200

Add support for sRGB and Default colorimetry in the
Colorimetry Data Block as per CTA-861.6.

Signed-off-by: Hans Verkuil <[email protected]>

 parse-cta-block.cpp | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

---

diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index 6c21e8d50f79..358048606198 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -1817,7 +1817,7 @@ void edid_state::cta_vcdb(const unsigned char *x, 
unsigned length)
                warn("S_PT is equal to S_IT and S_CE, so should be set to 0 
instead.\n");
 }
 
-static const char *colorimetry_map[] = {
+static const char *colorimetry1_map[] = {
        "xvYCC601",
        "xvYCC709",
        "sYCC601",
@@ -1828,6 +1828,17 @@ static const char *colorimetry_map[] = {
        "BT2020RGB",
 };
 
+static const char *colorimetry2_map[] = {
+       "Reserved MD0",
+       "Reserved MD1",
+       "Reserved MD2",
+       "Reserved MD3",
+       "Default",
+       "sRGB",
+       "ICtCp",
+       "ST2113RGB",
+};
+
 static void cta_colorimetry_block(const unsigned char *x, unsigned length)
 {
        unsigned i;
@@ -1836,14 +1847,14 @@ static void cta_colorimetry_block(const unsigned char 
*x, unsigned length)
                fail("Empty Data Block with length %u.\n", length);
                return;
        }
-       for (i = 0; i < ARRAY_SIZE(colorimetry_map); i++) {
+       for (i = 0; i < ARRAY_SIZE(colorimetry1_map); i++)
                if (x[0] & (1 << i))
-                       printf("    %s\n", colorimetry_map[i]);
-       }
-       if (x[1] & 0x80)
-               printf("    DCI-P3\n");
-       if (x[1] & 0x40)
-               printf("    ICtCp\n");
+                       printf("    %s\n", colorimetry1_map[i]);
+       if (x[1] & 0xf)
+               fail("Reserved bits MD0-MD3 must be 0.\n");
+       for (i = 0; i < ARRAY_SIZE(colorimetry2_map); i++)
+               if (x[1] & (1 << i))
+                       printf("    %s\n", colorimetry2_map[i]);
 }
 
 static const char *eotf_map[] = {

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to