aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-parse-edid
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-01 09:46:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-01 09:46:03 +0000
commit29bba0af7e3ed3af74d74c8b2e527e73a5f59c66 (patch)
treee2e2d99c32ed10ba0b3dbfed06eda888f942d0bc /monitor-parse-edid
parent45358d5ef77bfdc823ec72dc1e18c8943cf2989f (diff)
downloadmonitor-edid-29bba0af7e3ed3af74d74c8b2e527e73a5f59c66.tar
monitor-edid-29bba0af7e3ed3af74d74c8b2e527e73a5f59c66.tar.gz
monitor-edid-29bba0af7e3ed3af74d74c8b2e527e73a5f59c66.tar.bz2
monitor-edid-29bba0af7e3ed3af74d74c8b2e527e73a5f59c66.tar.xz
monitor-edid-29bba0af7e3ed3af74d74c8b2e527e73a5f59c66.zip
add established_timings
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-xmonitor-parse-edid34
1 files changed, 31 insertions, 3 deletions
diff --git a/monitor-parse-edid b/monitor-parse-edid
index 51334eb..8c99fde 100755
--- a/monitor-parse-edid
+++ b/monitor-parse-edid
@@ -20,7 +20,7 @@ my @edid_info = group_by2(
C => 'gamma',
a => 'feature_support',
a10 => '_color_characteristics',
- a3 => '_established_timings',
+ a3 => 'established_timings',
a16 => 'standard_timings',
a72 => 'monitor_details',
@@ -57,6 +57,25 @@ my %subfields = (
1 => 'GTF_compliance',
) ],
+ established_timings => [ group_by2(
+ 1 => '720x400_70',
+ 1 => '720x400_88',
+ 1 => '640x480_60',
+ 1 => '640x480_67',
+ 1 => '640x480_72',
+ 1 => '640x480_75',
+ 1 => '800x600_56',
+ 1 => '800x600_60',
+ 1 => '800x600_72',
+ 1 => '800x600_75',
+ 1 => '832x624_75',
+ 1 => '1024x768_87i',
+ 1 => '1024x768_60',
+ 1 => '1024x768_70',
+ 1 => '1024x768_75',
+ 1 => '1280x1024_75',
+ ) ],
+
detailed_timing => [ group_by2(
8 => 'horizontal_active',
8 => 'horizontal_blanking',
@@ -170,6 +189,12 @@ sub parse_edid {
$v = get_many_bits($v, 'video_input_definition');
} elsif ($field eq 'feature_support') {
$v = get_many_bits($v, 'feature_support');
+ } elsif ($field eq 'established_timings') {
+ my $h = get_many_bits($v, 'established_timings');
+ $v = [
+ sort { $a->{X} <=> $b->{X} || $a->{vfreq} <=> $b->{vfreq} }
+ map { /(\d+)x(\d+)_(\d+)(i?)/ ? { X => $1, Y => $2, vfreq => $3, $4 ? (interlace => 1) : () } : () }
+ grep { $h->{$_} } keys %$h ];
} elsif ($field eq 'standard_timings') {
my @aspect2ratio = (
$edid{edid_version} > 1 || $edid{edid_revision} > 2 ? '16/10' : '1/1',
@@ -365,8 +390,11 @@ sub print_edid {
print "Gamma: ", $edid->{gamma} / 100 + 1, "\n";
printf "%s signal\n", $edid->{video_input_definition}{digital} ? 'Digital' : 'Analog';
- if ($verbose && $edid->{standard_timings}) {
- foreach (@{$edid->{standard_timings}}) {
+ if ($verbose) {
+ foreach (@{$edid->{established_timings} || []}) {
+ print "Standard resolution: $_->{X}x$_->{Y} @ $_->{vfreq} Hz (established timing)\n" if !$_->{interlace};
+ }
+ foreach (@{$edid->{standard_timings} || []}) {
print "Standard resolution: $_->{X}x$_->{Y} @ $_->{vfreq} Hz, ratio $_->{ratio}",
$edid->{ratio_name} && index($edid->{ratio_name}, $_->{ratio}) == -1 ? ' (!)' : '',
"\n";