aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 15:23:08 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 15:23:08 +0100
commitac3a3cd563b175e51975081645008d45d7d00e26 (patch)
treea37ff45ab5c1e0fab696e1c6cb8e75644e5b4e21
parent155ac5ef7f703f589c3a772a7fd850ea4eb35882 (diff)
edid-decode: fix Video Timing Range Limits pixelclock
The pixelclock min/max values were off by one. 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 e707b29..cc024b6 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -505,8 +505,8 @@ void edid_state::parse_displayid_video_timing_range_limits(const unsigned char *
if (!check_displayid_datablock_length(x, 15, 15))
return;
printf(" Pixel Clock: %.3f-%.3f MHz\n",
- (double)(x[3] | (x[4] << 8) | (x[5] << 16)) / 100.0,
- (double)(x[6] | (x[7] << 8) | (x[8] << 16)) / 100.0);
+ (double)((x[3] | (x[4] << 8) | (x[5] << 16)) + 1) / 100.0,
+ (double)((x[6] | (x[7] << 8) | (x[8] << 16)) + 1) / 100.0);
printf(" Horizontal Frequency: %u-%u kHz\n", x[9], x[10]);
printf(" Minimum Horizontal Blanking: %u pixels\n", x[11] | (x[12] << 8));
printf(" Vertical Refresh: %u-%u Hz\n", x[13], x[14]);

Privacy Policy