diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-04-22 16:59:45 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-04-22 16:59:45 +0200 |
commit | 5b288237e7f49c3430241644085778d7a3394a93 (patch) | |
tree | 5cc203326760ff327f975bbc36b2ec0ee5075821 /parse-base-block.cpp | |
parent | f5d64041f09d60510b0ddb06e16f6107f3893cd8 (diff) |
edid-decode: various fixes
1) Drop an obsolete and always false test in print_standard_timing
2) Drop a test for image width/height where one of the two is 0.
3) Simplify rate test in cta_hf_scdb() (rate is always > 0)
4) Fix Dolby Vision bit for global dimming (0x04 instead of 0x02)
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: val.zapod.vz@gmail.com
Diffstat (limited to 'parse-base-block.cpp')
-rw-r--r-- | parse-base-block.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/parse-base-block.cpp b/parse-base-block.cpp index bd5ad37..9f0147e 100644 --- a/parse-base-block.cpp +++ b/parse-base-block.cpp @@ -831,11 +831,6 @@ void edid_state::print_standard_timing(const char *prefix, unsigned char b1, uns return; } - if (b1 == 0) { - fail("Non-conformant standard timing (0 horiz).\n"); - return; - } - t = find_std_id((b1 << 8) | b2, dmt_id); if (t) { char type[16]; @@ -1662,13 +1657,9 @@ void edid_state::parse_base_block(const unsigned char *x) printf(" Maximum image size: %u cm x %u cm\n", x[0x15], x[0x16]); max_display_width_mm = x[0x15] * 10; max_display_height_mm = x[0x16] * 10; - if ((max_display_height_mm && !max_display_width_mm) || - (max_display_width_mm && !max_display_height_mm)) - fail("Invalid maximum image size (%u cm x %u cm).\n", - max_display_width_mm, max_display_height_mm); - else if (max_display_width_mm < 100 || max_display_height_mm < 100) + if (x[0x15] < 10 || x[0x16] < 10) warn("Dubious maximum image size (%ux%u is smaller than 10x10 cm).\n", - max_display_width_mm, max_display_height_mm); + x[0x15], x[0x16]); } else if (edid_minor >= 4 && (x[0x15] || x[0x16])) { if (x[0x15]) |