aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 15:34:26 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 15:34:26 +0100
commit770cfb947ea9d9eb5cda57a87dc66d13c60cfefc (patch)
tree23ed144d832e1c7622c031e7b701ece78b945778
parentac3a3cd563b175e51975081645008d45d7d00e26 (diff)
edid-decode: use 4 decimals for color characteristics
The precision is only 4 decimals, so change %.6f to %.4f. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: val.zapod.vz@gmail.com
-rw-r--r--parse-displayid-block.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index cc024b6..36985e2 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -205,7 +205,7 @@ void edid_state::parse_displayid_color_characteristics(const unsigned char *x)
for (unsigned i = 0; i < num_primaries; i++) {
unsigned idx = offset + 3 * i;
- printf(" Primary #%u: (%.6f, %.6f)\n", i,
+ printf(" Primary #%u: (%.4f, %.4f)\n", i,
fp2d(x[idx] | ((x[idx + 1] & 0x0f) << 8)),
fp2d(((x[idx + 1] & 0xf0) >> 4) | (x[idx + 2] << 4)));
}
@@ -213,7 +213,7 @@ void edid_state::parse_displayid_color_characteristics(const unsigned char *x)
for (unsigned i = 0; i < num_whitepoints; i++) {
unsigned idx = offset + 3 * i;
- printf(" White point #%u: (%.6f, %.6f)\n", i,
+ printf(" White point #%u: (%.4f, %.4f)\n", i,
fp2d(x[idx] | ((x[idx + 1] & 0x0f) << 8)),
fp2d(((x[idx + 1] & 0xf0) >> 4) | (x[idx + 2] << 4)));
}

Privacy Policy