aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2010-01-03 04:07:18 +0000
committerAnssi Hannula <anssi@mandriva.org>2010-01-03 04:07:18 +0000
commita3e9aad555c8df59b42cbd630e5a7abd6ed17ec2 (patch)
treeed63483fd2281dfdbb2ae775c892485b53f3f3fa
parent0a9f2ccd983cdee30712812b718a7c03ce1eade7 (diff)
downloadmonitor-edid-a3e9aad555c8df59b42cbd630e5a7abd6ed17ec2.tar
monitor-edid-a3e9aad555c8df59b42cbd630e5a7abd6ed17ec2.tar.gz
monitor-edid-a3e9aad555c8df59b42cbd630e5a7abd6ed17ec2.tar.bz2
monitor-edid-a3e9aad555c8df59b42cbd630e5a7abd6ed17ec2.tar.xz
monitor-edid-a3e9aad555c8df59b42cbd630e5a7abd6ed17ec2.zip
monitor-parse-edid:
correctly parse some interlaced video timings if the Detailed Timing Descriptor specifies field vertical parameters instead of the frame parameters
-rw-r--r--NEWS3
-rwxr-xr-xmonitor-parse-edid14
2 files changed, 17 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 87ee540..d6e07e9 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,9 @@
EIA/CEA-861-B) in Video Data Blocks of CEA EDID Timing Extension
o set Interlace flag for ModeLines created for interlaced Detailed
Timings
+ o correctly parse some interlaced video timings if the Detailed Timing
+ Descriptor specifies field vertical parameters instead of the frame
+ parameters
Version 2.5 - 18 October 2009, by Anssi Hannula
diff --git a/monitor-parse-edid b/monitor-parse-edid
index c29f8e5..a702cc6 100755
--- a/monitor-parse-edid
+++ b/monitor-parse-edid
@@ -835,6 +835,20 @@ sub parse_edid {
foreach my $h (@{$edid{detailed_timings}}) {
+ # EDID standard is ambiguous on how interlaced modes should be
+ # specified; workaround clearly broken modes:
+ if ($h->{interlaced}) {
+ foreach ("720x480", "1440x480", "2880x480", "720x576", "1440x576", "2880x576", "1920x1080") {
+ if ($_ eq $h->{horizontal_active} . 'x' . $h->{vertical_active} * 2) {
+ $h->{vertical_active} *= 2;
+ $h->{vertical_blanking} *= 2;
+ $h->{vertical_sync_offset} *= 2;
+ $h->{vertical_sync_pulse_width} *= 2;
+ $h->{vertical_blanking} |= 1;
+ }
+ }
+ }
+
# if the mm size given in the detailed_timing is not far from the cm size
# put it as a more precise cm size
my %in_cm = map { $_ => $h->{$_ . '_image_size'} / 10 } ('horizontal', 'vertical');