aboutsummaryrefslogtreecommitdiffstats
path: root/parse-displayid-block.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-15 11:02:22 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-15 11:02:22 +0100
commitf48427bcd5d079d2ddea31bc26cc919ebabb2b8d (patch)
tree57fbbf5f9743c603e3f73c57bbe799690532bf4c /parse-displayid-block.cpp
parent31144f33569bfe2acb50e0c2e52fdf53bd8eb6d8 (diff)
edid-decode: improve RCDB/SLDB checks
CTA-861-H more clearly described the relationship between the RCDB and SLDB Data Blocks, so implement new checks that verify the correctness of these DBs. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-displayid-block.cpp')
-rw-r--r--parse-displayid-block.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index 312b9c3..035e53d 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -193,7 +193,7 @@ void edid_state::parse_displayid_color_characteristics(const unsigned char *x)
printf(" Uses %u CIE (x, y) coordinates\n", cie_year);
if (xfer_id) {
printf(" Associated with Transfer Characteristics Data Block with Identifier %u\n", xfer_id);
- if (!(dispid.preparse_xfer_ids & (1 << xfer_id)))
+ if (!(dispid.preparsed_xfer_ids & (1 << xfer_id)))
fail("Missing Transfer Characteristics Data Block with Identifier %u.\n", xfer_id);
}
if (!num_primaries) {
@@ -679,7 +679,7 @@ void edid_state::parse_displayid_transfer_characteristics(const unsigned char *x
if (xfer_id) {
printf(" Transfer Characteristics Data Block Identifier: %u\n", xfer_id);
- if (!(dispid.preparse_color_ids & (1 << xfer_id)))
+ if (!(dispid.preparsed_color_ids & (1 << xfer_id)))
fail("Missing Color Characteristics Data Block using Identifier %u.\n", xfer_id);
}
if (first_is_white)
@@ -1503,17 +1503,17 @@ void edid_state::preparse_displayid_block(const unsigned char *x)
unsigned offset = 5;
- dispid.preparse_displayid_blocks++;
+ dispid.preparsed_displayid_blocks++;
while (length > 0) {
unsigned tag = x[offset];
unsigned len = x[offset + 2];
switch (tag) {
case 0x02:
- dispid.preparse_color_ids |= 1 << ((x[offset + 1] >> 3) & 0x0f);
+ dispid.preparsed_color_ids |= 1 << ((x[offset + 1] >> 3) & 0x0f);
break;
case 0x0e:
- dispid.preparse_xfer_ids |= 1 << ((x[offset + 1] >> 4) & 0x0f);
+ dispid.preparsed_xfer_ids |= 1 << ((x[offset + 1] >> 4) & 0x0f);
break;
default:
break;
@@ -1550,11 +1550,11 @@ void edid_state::parse_displayid_block(const unsigned char *x)
product_type(prod_type, false).c_str());
if (!prod_type)
fail("DisplayID Base Block has no product type.\n");
- if (ext_count != dispid.preparse_displayid_blocks - 1)
+ if (ext_count != dispid.preparsed_displayid_blocks - 1)
fail("Expected %u DisplayID Extension Block%s, but got %u.\n",
ext_count,
ext_count > 1 ? "s" : "",
- dispid.preparse_displayid_blocks - 1);
+ dispid.preparsed_displayid_blocks - 1);
} else {
if (prod_type)
fail("Product Type should be 0 in extension block.\n");

Privacy Policy