All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Mallon <harry.mallon@codex.online>
To: linux-media@vger.kernel.org
Subject: [PATCH] edid-decode: Report supported SL-HDR versions
Date: Tue,  8 Sep 2020 13:58:44 +0100	[thread overview]
Message-ID: <20200908125844.73317-1-harry.mallon@codex.online> (raw)

Specified in ETSI TS 103 433-1 v1.3.1

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
---
 parse-cta-block.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index 97924d1..ad1e18b 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -1512,11 +1512,21 @@ static void cta_hdr_dyn_metadata_block(const unsigned char *x, unsigned length)
 		printf("    HDR Dynamic Metadata Type %u\n", type);
 		switch (type) {
 		case 1:
-		case 2:
 		case 4:
 			if (type_len > 2)
 				printf("      Version: %u\n", x[3] & 0xf);
 			break;
+		case 2:
+			if (type_len > 2) {
+				unsigned version = x[3] & 0xf;
+				printf("      Version: %u\n", version);
+				if (version >= 1) {
+					if (x[3] & 0x10) printf("      Supports SL-HDR1 (ETSI TS 103 433-1)\n");
+					if (x[3] & 0x20) printf("      Supports SL-HDR2 (ETSI TS 103 433-2)\n");
+					if (x[3] & 0x40) printf("      Supports SL-HDR3 (ETSI TS 103 433-3)\n");
+				}
+			}
+			break;
 		default:
 			break;
 		}
-- 
2.28.0


             reply	other threads:[~2020-09-08 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 12:58 Harry Mallon [this message]
2020-09-08 22:23 ` [PATCH] edid-decode: Report supported SL-HDR versions Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908125844.73317-1-harry.mallon@codex.online \
    --to=harry.mallon@codex.online \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.