aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rwxr-xr-xmonitor-parse-edid532
2 files changed, 80 insertions, 456 deletions
diff --git a/NEWS b/NEWS
index 2b699c5..da2aa69 100644
--- a/NEWS
+++ b/NEWS
@@ -12,8 +12,8 @@
o accept EDID data with multiple extension blocks
o add support for Detailed Timing Descriptors in CEA EDID Timing
Extension
- o add support for Short Video Descriptor formats 1-34 (as defined by
- EIA/CEA-861-B) in Video Data Blocks of CEA EDID Timing Extension
+ o add support for Short Video Descriptor formats 1-64 (as defined by
+ EIA/CEA-861) 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
diff --git a/monitor-parse-edid b/monitor-parse-edid
index a8e9e74..7405230 100755
--- a/monitor-parse-edid
+++ b/monitor-parse-edid
@@ -165,453 +165,80 @@ my %subfields = (
) ],
);
-my %cea_video_modes = ( # EIA/CEA-861-B
- # 60/59.94 Hz formats:
- 1 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 25.175, 25.200 ],
- 'horizontal_active' => 640,
- 'horizontal_blanking' => 160,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 16,
- 'horizontal_sync_pulse_width' => 96,
- 'vertical_sync_offset' => 10,
- 'vertical_sync_pulse_width' => 2,
- },
- 2 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 720,
- 'horizontal_blanking' => 138,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 16,
- 'horizontal_sync_pulse_width' => 62,
- 'vertical_sync_offset' => 9,
- 'vertical_sync_pulse_width' => 6,
- },
- 3 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 720,
- 'horizontal_blanking' => 138,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 16,
- 'horizontal_sync_pulse_width' => 62,
- 'vertical_sync_offset' => 9,
- 'vertical_sync_pulse_width' => 6,
- },
- 4 => {
- 'vertical_active' => 720,
- 'vertical_blanking' => 30,
- 'pixel_clock' => [ 74.175, 74.250 ],
- 'horizontal_active' => 1280,
- 'horizontal_blanking' => 370,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 110,
- 'horizontal_sync_pulse_width' => 40,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 5 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 74.175, 74.250 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 280,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 88,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 10, # 5 per field
- },
- 6 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 1,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 38,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 8, # alternating 4,4.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 7 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 38,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 8, # alternating 4,4.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 8 => {
- 'vertical_active' => 240,
- 'vertical_blanking' => 22, # 23 also allowed
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 38,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 3,
- },
- 9 => {
- 'vertical_active' => 240,
- 'vertical_blanking' => 22, # 23 also allowed
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 38,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 3,
- },
- 10 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 54.000, 54.054 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 1,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 76,
- 'horizontal_sync_pulse_width' => 248,
- 'vertical_sync_offset' => 8, # alternating 4,4.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 11 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 54.000, 54.054 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 76,
- 'horizontal_sync_pulse_width' => 248,
- 'vertical_sync_offset' => 8, # alternating 4,4.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 12 => {
- 'vertical_active' => 240,
- 'vertical_blanking' => 22, # 23 also allowed
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 76,
- 'horizontal_sync_pulse_width' => 248,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 3,
- },
- 13 => {
- 'vertical_active' => 240,
- 'vertical_blanking' => 22, # 23 also allowed
- 'pixel_clock' => [ 27.000, 27.027 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 76,
- 'horizontal_sync_pulse_width' => 248,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 3,
- },
- 14 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 54.000, 54.054 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 32,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 9,
- 'vertical_sync_pulse_width' => 6,
- },
- 15 => {
- 'vertical_active' => 480,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 54.000, 54.054 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 32,
- 'horizontal_sync_pulse_width' => 124,
- 'vertical_sync_offset' => 9,
- 'vertical_sync_pulse_width' => 6,
- },
- 16 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 148.350, 148.500 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 280,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 88,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 5,
- },
- # 50 Hz formats:
- 17 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49,
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 720,
- 'horizontal_blanking' => 144,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 12,
- 'horizontal_sync_pulse_width' => 64,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 18 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49,
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 720,
- 'horizontal_blanking' => 144,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 12,
- 'horizontal_sync_pulse_width' => 64,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 19 => {
- 'vertical_active' => 720,
- 'vertical_blanking' => 30,
- 'pixel_clock' => [ 74.250 ],
- 'horizontal_active' => 1280,
- 'horizontal_blanking' => 700,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 440,
- 'horizontal_sync_pulse_width' => 50,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 20 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45, # alternating 22,23 per field
- 'pixel_clock' => [ 74.250 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 720,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 528,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 10,
- },
- 21 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49, # alternating 24,25 per field
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 1,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 126,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 22 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49, # alternating 24,25 per field
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 126,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 23 => {
- 'vertical_active' => 288,
- 'vertical_blanking' => 24, # or 25 or 26
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 126,
- 'vertical_sync_offset' => 2,
- 'vertical_sync_pulse_width' => 3,
- },
- 24 => {
- 'vertical_active' => 288,
- 'vertical_blanking' => 24, # or 25 or 26
- 'pixel_clock' => [ 27.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 276,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 126,
- 'vertical_sync_offset' => 2,
- 'vertical_sync_pulse_width' => 3,
- },
- 25 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49, # alternating 24,25 per field
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 1,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 48,
- 'horizontal_sync_pulse_width' => 252,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 26 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49, # alternating 24,25 per field
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 1,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 48,
- 'horizontal_sync_pulse_width' => 252,
- 'vertical_sync_offset' => 4, # alternating 2,2.5 per field
- 'vertical_sync_pulse_width' => 6,
- },
- 27 => {
- 'vertical_active' => 288,
- 'vertical_blanking' => 24, # or 25 or 26
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 48,
- 'horizontal_sync_pulse_width' => 252,
- 'vertical_sync_offset' => 2,
- 'vertical_sync_pulse_width' => 3,
- },
- 28 => {
- 'vertical_active' => 288,
- 'vertical_blanking' => 24, # or 25 or 26
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 2880,
- 'horizontal_blanking' => 552,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 48,
- 'horizontal_sync_pulse_width' => 252,
- 'vertical_sync_offset' => 2,
- 'vertical_sync_pulse_width' => 3,
- },
- 29 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49,
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 288,
- 'interlaced' => 0,
- 'aspect_ratio' => "4:3",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 128,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 30 => {
- 'vertical_active' => 576,
- 'vertical_blanking' => 49,
- 'pixel_clock' => [ 54.000 ],
- 'horizontal_active' => 1440,
- 'horizontal_blanking' => 288,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 24,
- 'horizontal_sync_pulse_width' => 128,
- 'vertical_sync_offset' => 5,
- 'vertical_sync_pulse_width' => 5,
- },
- 31 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 148.500 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 720,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 528,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 5,
- },
- # other formats:
- 32 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 74.175, 74.250 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 830,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 638,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 5,
- },
- 33 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 74.250 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 720,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 528,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 5,
- },
- 34 => {
- 'vertical_active' => 1080,
- 'vertical_blanking' => 45,
- 'pixel_clock' => [ 74.175, 74.250 ],
- 'horizontal_active' => 1920,
- 'horizontal_blanking' => 280,
- 'interlaced' => 0,
- 'aspect_ratio' => "16:9",
- 'horizontal_sync_offset' => 528,
- 'horizontal_sync_pulse_width' => 44,
- 'vertical_sync_offset' => 4,
- 'vertical_sync_pulse_width' => 5,
- },
- );
+my @cea_video_mode_to_detailed_timing = ('pixel_clock', 'horizontal_active', 'vertical_active', 'aspect',
+ 'horizontal_blanking', 'horizontal_sync_offset', 'horizontal_sync_pulse_width',
+ 'vertical_blanking', 'vertical_sync_offset', 'vertical_sync_pulse_width',
+ 'horizontal_sync_positive', 'vertical_sync_positive', 'interlaced');
+
+my @cea_video_modes = (
+# [0] pixel clock, [1] X, [2] Y, [3] aspect, [4] Hblank, [5] Hsync_offset, [6] Hsync_pulse_width,
+# [7] Vblank, [8] Vsync_offset, [9] Vsync_pulse_width, [10] Hsync+, [11] Vsync+, [12] interlaced
+# 59.94/29.97 and similar modes also have a 60.00/30.00 counterpart by raising the pixel clock
+ [ 25.175, 640, 480, "4/3", 160, 16, 96, 45, 10, 2, 0, 0, 0 ], # 1: 640x 480@59.94
+ [ 27.000, 720, 480, "4/3", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 2: 720x 480@59.94
+ [ 27.000, 720, 480, "16/9", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 3: 720x 480@59.94
+ [ 74.250, 1280, 720, "16/9", 370, 110, 40, 30, 5, 5, 1, 1, 0 ], # 4: 1280x 720@60.00
+ [ 74.250, 1920, 1080, "16/9", 280, 88, 44, 45, 4, 10, 1, 1, 1 ], # 5: 1920x1080@30.00
+ [ 27.000, 1440, 480, "4/3", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 6: 1440x 480@29.97
+ [ 27.000, 1440, 480, "16/9", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 7: 1440x 480@29.97
+ [ 27.000, 1440, 240, "4/3", 276, 38, 124, 22, 4, 3, 0, 0, 0 ], # 8: 1440x 240@60.05
+ [ 27.000, 1440, 240, "16/9", 276, 38, 124, 22, 4, 3, 0, 0, 0 ], # 9: 1440x 240@60.05
+ [ 54.000, 2880, 480, "4/3", 552, 76, 248, 45, 8, 6, 0, 0, 1 ], # 10: 2880x 480@29.97
+ [ 54.000, 2880, 480, "16/9", 552, 76, 248, 45, 8, 6, 0, 0, 1 ], # 11: 2880x 480@29.97
+ [ 54.000, 2880, 240, "4/3", 552, 76, 248, 22, 4, 3, 0, 0, 0 ], # 12: 2880x 240@60.05
+ [ 54.000, 2880, 240, "16/9", 552, 76, 248, 22, 4, 3, 0, 0, 0 ], # 13: 2880x 240@60.05
+ [ 54.000, 1440, 480, "4/3", 276, 32, 124, 45, 9, 6, 0, 0, 0 ], # 14: 1440x 480@59.94
+ [ 54.000, 1440, 480, "16/9", 276, 32, 124, 45, 9, 6, 0, 0, 0 ], # 15: 1440x 480@59.94
+ [ 148.500, 1920, 1080, "16/9", 280, 88, 44, 45, 4, 5, 1, 1, 0 ], # 16: 1920x1080@60.00
+ [ 27.000, 720, 576, "4/3", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 17: 720x 576@50.00
+ [ 27.000, 720, 576, "16/9", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 18: 720x 576@50.00
+ [ 74.250, 1280, 720, "16/9", 700, 440, 40, 30, 5, 5, 1, 1, 0 ], # 19: 1280x 720@50.00
+ [ 74.250, 1920, 1080, "16/9", 720, 528, 44, 45, 4, 10, 1, 1, 1 ], # 20: 1920x1080@25.00
+ [ 27.000, 1440, 576, "4/3", 288, 24, 126, 49, 4, 6, 0, 0, 1 ], # 21: 1440x 576@25.00
+ [ 27.000, 1440, 576, "16/9", 288, 24, 126, 49, 4, 6, 0, 0, 1 ], # 22: 1440x 576@25.00
+ [ 27.000, 1440, 288, "4/3", 288, 24, 126, 24, 2, 3, 0, 0, 0 ], # 23: 1440x 288@50.08
+ [ 27.000, 1440, 288, "16/9", 288, 24, 126, 24, 2, 3, 0, 0, 0 ], # 24: 1440x 288@50.08
+ [ 54.000, 2880, 576, "4/3", 576, 48, 252, 49, 4, 6, 0, 0, 1 ], # 25: 2880x 576@25.00
+ [ 54.000, 2880, 576, "16/9", 576, 48, 252, 49, 4, 6, 0, 0, 1 ], # 26: 2880x 576@25.00
+ [ 54.000, 2880, 288, "4/3", 576, 48, 252, 24, 2, 3, 0, 0, 0 ], # 27: 2880x 288@50.08
+ [ 54.000, 2880, 288, "16/9", 576, 48, 252, 24, 2, 3, 0, 0, 0 ], # 28: 2880x 288@50.08
+ [ 54.000, 1440, 576, "4/3", 288, 24, 128, 49, 5, 5, 0, 0, 0 ], # 29: 1440x 576@50.00
+ [ 54.000, 1440, 576, "16/9", 288, 24, 128, 49, 5, 5, 0, 0, 0 ], # 30: 1440x 576@50.00
+ [ 148.500, 1920, 1080, "16/9", 720, 528, 44, 45, 4, 5, 1, 1, 0 ], # 31: 1920x1080@50.00
+ [ 74.250, 1920, 1080, "16/9", 830, 638, 44, 45, 4, 5, 1, 1, 0 ], # 32: 1920x1080@24.00
+ [ 74.250, 1920, 1080, "16/9", 720, 528, 44, 45, 4, 5, 1, 1, 0 ], # 33: 1920x1080@25.00
+ [ 74.250, 1920, 1080, "16/9", 280, 88, 44, 45, 4, 5, 1, 1, 0 ], # 34: 1920x1080@30.00
+ [ 108.000, 2880, 480, "4/3", 552, 64, 248, 45, 9, 6, 0, 0, 0 ], # 35: 2880x 480@59.94
+ [ 108.000, 2880, 480, "16/9", 552, 64, 248, 45, 9, 6, 0, 0, 0 ], # 36: 2880x 480@59.94
+ [ 108.000, 2880, 576, "4/3", 576, 48, 256, 49, 5, 5, 0, 0, 0 ], # 37: 2880x 576@50.00
+ [ 108.000, 2880, 576, "16/9", 576, 48, 256, 49, 5, 5, 0, 0, 0 ], # 38: 2880x 576@50.00
+ [ 72.000, 1920, 1080, "16/9", 384, 32, 168, 170, 46, 10, 1, 0, 1 ], # 39: 1920x1080@25.00
+ [ 148.500, 1920, 1080, "16/9", 720, 528, 44, 45, 4, 10, 1, 1, 1 ], # 40: 1920x1080@50.00
+ [ 148.500, 1280, 720, "16/9", 700, 440, 40, 30, 5, 5, 1, 1, 0 ], # 41: 1280x 720@100.00
+ [ 54.000, 720, 576, "4/3", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 42: 720x 576@100.00
+ [ 54.000, 720, 576, "16/9", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 43: 720x 576@100.00
+ [ 54.000, 1440, 576, "4/3", 288, 24, 126, 49, 4, 6, 0, 0, 0 ], # 44: 1440x 576@50.00
+ [ 54.000, 1440, 576, "16/9", 288, 24, 126, 49, 4, 6, 0, 0, 0 ], # 45: 1440x 576@50.00
+ [ 148.500, 1920, 1080, "16/9", 280, 88, 44, 45, 4, 10, 1, 1, 1 ], # 46: 1920x1080@60.00
+ [ 148.500, 1280, 720, "16/9", 370, 110, 40, 30, 5, 5, 1, 1, 0 ], # 47: 1280x 720@120.00
+ [ 54.000, 720, 480, "4/3", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 48: 720x 480@119.88
+ [ 54.000, 720, 480, "16/9", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 49: 720x 480@119.88
+ [ 54.000, 1440, 480, "4/3", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 50: 1440x 480@59.94
+ [ 54.000, 1440, 480, "16/9", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 51: 1440x 480@59.94
+ [ 108.000, 720, 576, "4/3", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 52: 720x 576@200.00
+ [ 108.000, 720, 576, "16/9", 144, 12, 64, 49, 5, 5, 0, 0, 0 ], # 53: 720x 576@200.00
+ [ 108.000, 1440, 576, "4/3", 288, 24, 126, 49, 4, 6, 0, 0, 1 ], # 54: 1440x 576@100.00
+ [ 108.000, 1440, 576, "16/9", 288, 24, 126, 49, 4, 6, 0, 0, 1 ], # 55: 1440x 576@100.00
+ [ 108.000, 720, 480, "4/3", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 56: 720x 480@239.76
+ [ 108.000, 720, 480, "16/9", 138, 16, 62, 45, 9, 6, 0, 0, 0 ], # 57: 720x 480@239.76
+ [ 108.000, 1440, 480, "4/3", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 58: 1440x 480@119.88
+ [ 108.000, 1440, 480, "16/9", 276, 38, 124, 45, 8, 6, 0, 0, 1 ], # 59: 1440x 480@119.88
+ [ 59.400, 1280, 720, "16/9", 2020, 1760, 40, 30, 5, 5, 1, 1, 0 ], # 60: 1280x 720@24.00
+ [ 74.250, 1280, 720, "16/9", 2680, 2420, 40, 30, 5, 5, 1, 1, 0 ], # 61: 1280x 720@25.00
+ [ 74.250, 1280, 720, "16/9", 2020, 1760, 40, 30, 5, 5, 1, 1, 0 ], # 62: 1280x 720@30.00
+ [ 297.000, 1920, 1080, "16/9", 280, 88, 44, 45, 4, 5, 1, 1, 0 ], # 63: 1920x1080@120.00
+ [ 297.000, 1920, 1080, "16/9", 720, 528, 44, 45, 4, 10, 1, 1, 0 ], # 64: 1920x1080@100.00
+);
sub within_limit {
my ($value, $type, $limit) = @_;
@@ -801,17 +428,14 @@ sub parse_edid {
my @vmodes = unpack("a" x $h->{size}, $vv);
foreach my $vmode (@vmodes) {
$h = get_many_bits($vmode, 'cea_video_data_block');
- my $cea_mode = $cea_video_modes{$h->{mode}};
+ my $cea_mode = $cea_video_modes[$h->{mode} - 1];
if (!$cea_mode) {
warn "parse_edid: unhandled CEA mode $h->{mode}\n" if $verbose;
next;
}
- foreach my $pixclock (@{$cea_mode->{pixel_clock}}) {
- my %det_mode = %$cea_mode;
- $det_mode{pixel_clock} = $pixclock;
- $det_mode{source} = 'cea_vdb';
- push @{$edid{detailed_timings}}, \%det_mode;
- }
+ my %det_mode = (source => 'cea_vdb');
+ @det_mode{@cea_video_mode_to_detailed_timing} = @$cea_mode;
+ push @{$edid{detailed_timings}}, \%det_mode;
}
}
}