diff --git a/cta-vic-table.c b/cta-vic-table.c new file mode 100644 index 0000000..4fd3aa6 --- /dev/null +++ b/cta-vic-table.c @@ -0,0 +1,2472 @@ +/* DO NOT EDIT! This file has been generated by gen-cta-vic.py from ANSI-CTA-861-H-Final.pdf. */ + +#include "cta.h" + +const struct di_cta_video_format _di_cta_video_formats[] = { + [60] = { + .vic = 60, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 59400000, + .h_front = 1760, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [65] = { + .vic = 65, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 59400000, + .h_front = 1760, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [61] = { + .vic = 61, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 2420, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [66] = { + .vic = 66, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 2420, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [62] = { + .vic = 62, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 1760, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [67] = { + .vic = 67, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 1760, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [108] = { + .vic = 108, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 90000000, + .h_front = 960, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [109] = { + .vic = 109, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 90000000, + .h_front = 960, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [32] = { + .vic = 32, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 638, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [72] = { + .vic = 72, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 638, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [33] = { + .vic = 33, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [73] = { + .vic = 73, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [34] = { + .vic = 34, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [74] = { + .vic = 74, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [111] = { + .vic = 111, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 638, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [112] = { + .vic = 112, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 638, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [79] = { + .vic = 79, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 59400000, + .h_front = 1360, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [80] = { + .vic = 80, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 59400000, + .h_front = 1228, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [81] = { + .vic = 81, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 59400000, + .h_front = 700, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [110] = { + .vic = 110, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 99000000, + .h_front = 810, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [86] = { + .vic = 86, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 99000000, + .h_front = 998, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 11, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [87] = { + .vic = 87, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 90000000, + .h_front = 448, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [88] = { + .vic = 88, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 118800000, + .h_front = 768, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [113] = { + .vic = 113, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 198000000, + .h_front = 998, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 11, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [93] = { + .vic = 93, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 1276, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [103] = { + .vic = 103, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 1276, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [94] = { + .vic = 94, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [104] = { + .vic = 104, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [95] = { + .vic = 95, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [105] = { + .vic = 105, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [114] = { + .vic = 114, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 1276, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [116] = { + .vic = 116, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 1276, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [98] = { + .vic = 98, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 1020, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [99] = { + .vic = 99, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 968, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [100] = { + .vic = 100, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 88, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [115] = { + .vic = 115, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 1020, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [121] = { + .vic = 121, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 396000000, + .h_front = 1996, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 22, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [122] = { + .vic = 122, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 396000000, + .h_front = 1696, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 22, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [123] = { + .vic = 123, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 396000000, + .h_front = 664, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 22, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [124] = { + .vic = 124, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 742500000, + .h_front = 746, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 297, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [194] = { + .vic = 194, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 2552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [202] = { + .vic = 202, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 2552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [195] = { + .vic = 195, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 2352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [203] = { + .vic = 203, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 2352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [196] = { + .vic = 196, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [204] = { + .vic = 204, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [197] = { + .vic = 197, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 2552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [205] = { + .vic = 205, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 2552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [210] = { + .vic = 210, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1485000000, + .h_front = 1492, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 594, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [211] = { + .vic = 211, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1485000000, + .h_front = 2492, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [212] = { + .vic = 212, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 1485000000, + .h_front = 288, + .h_sync = 176, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [213] = { + .vic = 213, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2970000000, + .h_front = 1492, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 594, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [17] = { + .vic = 17, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [18] = { + .vic = 18, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [19] = { + .vic = 19, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 440, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [68] = { + .vic = 68, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 440, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [20] = { + .vic = 20, + .h_active = 1920, + .v_active = 1080, + .interlaced = true, + .pixel_clock_hz = 74250000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 2, + .v_sync = 5, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [21] = { + .vic = 21, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 27000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [22] = { + .vic = 22, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 27000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [23] = { + .vic = 23, + .h_active = 1440, + .v_active = 288, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 424, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [24] = { + .vic = 24, + .h_active = 1440, + .v_active = 288, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 424, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [25] = { + .vic = 25, + .h_active = 2880, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 48, + .h_sync = 252, + .h_back = 276, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [26] = { + .vic = 26, + .h_active = 2880, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 48, + .h_sync = 252, + .h_back = 276, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [27] = { + .vic = 27, + .h_active = 2880, + .v_active = 288, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 48, + .h_sync = 252, + .h_back = 276, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 424, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [28] = { + .vic = 28, + .h_active = 2880, + .v_active = 288, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 48, + .h_sync = 252, + .h_back = 276, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 424, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [29] = { + .vic = 29, + .h_active = 1440, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 24, + .h_sync = 128, + .h_back = 136, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [30] = { + .vic = 30, + .h_active = 1440, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 24, + .h_sync = 128, + .h_back = 136, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [31] = { + .vic = 31, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [75] = { + .vic = 75, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [37] = { + .vic = 37, + .h_active = 2880, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 48, + .h_sync = 256, + .h_back = 272, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [38] = { + .vic = 38, + .h_active = 2880, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 48, + .h_sync = 256, + .h_back = 272, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [39] = { + .vic = 39, + .h_active = 1920, + .v_active = 1080, + .interlaced = true, + .pixel_clock_hz = 72000000, + .h_front = 32, + .h_sync = 168, + .h_back = 184, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 23, + .v_sync = 5, + .v_back = 57, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [82] = { + .vic = 82, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 82500000, + .h_front = 260, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [89] = { + .vic = 89, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 185625000, + .h_front = 548, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [96] = { + .vic = 96, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [106] = { + .vic = 106, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [101] = { + .vic = 101, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 968, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [125] = { + .vic = 125, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 742500000, + .h_front = 1096, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [198] = { + .vic = 198, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 2352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [206] = { + .vic = 206, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 2352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [214] = { + .vic = 214, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2970000000, + .h_front = 2492, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [1] = { + .vic = 1, + .h_active = 640, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 25175000, + .h_front = 16, + .h_sync = 96, + .h_back = 48, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 10, + .v_sync = 2, + .v_back = 33, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [2] = { + .vic = 2, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [3] = { + .vic = 3, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [4] = { + .vic = 4, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 110, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [69] = { + .vic = 69, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 74250000, + .h_front = 110, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [5] = { + .vic = 5, + .h_active = 1920, + .v_active = 1080, + .interlaced = true, + .pixel_clock_hz = 74250000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 2, + .v_sync = 5, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [6] = { + .vic = 6, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 27000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [7] = { + .vic = 7, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 27000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [8] = { + .vic = 8, + .h_active = 1440, + .v_active = 240, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 521, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [9] = { + .vic = 9, + .h_active = 1440, + .v_active = 240, + .interlaced = false, + .pixel_clock_hz = 27000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 521, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [10] = { + .vic = 10, + .h_active = 2880, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 76, + .h_sync = 248, + .h_back = 228, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [11] = { + .vic = 11, + .h_active = 2880, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 76, + .h_sync = 248, + .h_back = 228, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [12] = { + .vic = 12, + .h_active = 2880, + .v_active = 240, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 76, + .h_sync = 248, + .h_back = 228, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 521, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [13] = { + .vic = 13, + .h_active = 2880, + .v_active = 240, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 76, + .h_sync = 248, + .h_back = 228, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 521, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [14] = { + .vic = 14, + .h_active = 1440, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 32, + .h_sync = 124, + .h_back = 120, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [15] = { + .vic = 15, + .h_active = 1440, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 32, + .h_sync = 124, + .h_back = 120, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [16] = { + .vic = 16, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [76] = { + .vic = 76, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [35] = { + .vic = 35, + .h_active = 2880, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 64, + .h_sync = 248, + .h_back = 240, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [36] = { + .vic = 36, + .h_active = 2880, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 64, + .h_sync = 248, + .h_back = 240, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [83] = { + .vic = 83, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 99000000, + .h_front = 260, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [90] = { + .vic = 90, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 198000000, + .h_front = 248, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 11, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [97] = { + .vic = 97, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [107] = { + .vic = 107, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [102] = { + .vic = 102, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 594000000, + .h_front = 88, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [126] = { + .vic = 126, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 742500000, + .h_front = 164, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [199] = { + .vic = 199, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [207] = { + .vic = 207, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2376000000, + .h_front = 552, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 44, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [215] = { + .vic = 215, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 2970000000, + .h_front = 288, + .h_sync = 176, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [40] = { + .vic = 40, + .h_active = 1920, + .v_active = 1080, + .interlaced = true, + .pixel_clock_hz = 148500000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 2, + .v_sync = 5, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [41] = { + .vic = 41, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 440, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [70] = { + .vic = 70, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 440, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [42] = { + .vic = 42, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [43] = { + .vic = 43, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [44] = { + .vic = 44, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [45] = { + .vic = 45, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [64] = { + .vic = 64, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [77] = { + .vic = 77, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 528, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [84] = { + .vic = 84, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 165000000, + .h_front = 60, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 95, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [91] = { + .vic = 91, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 371250000, + .h_front = 218, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 161, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [117] = { + .vic = 117, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [119] = { + .vic = 119, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 1056, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [127] = { + .vic = 127, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1485000000, + .h_front = 1096, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [200] = { + .vic = 200, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 4752000000, + .h_front = 2112, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [208] = { + .vic = 208, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 4752000000, + .h_front = 2112, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [216] = { + .vic = 216, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 5940000000, + .h_front = 2192, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [218] = { + .vic = 218, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 800, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [46] = { + .vic = 46, + .h_active = 1920, + .v_active = 1080, + .interlaced = true, + .pixel_clock_hz = 148500000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 2, + .v_sync = 5, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [47] = { + .vic = 47, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 110, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [71] = { + .vic = 71, + .h_active = 1280, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 148500000, + .h_front = 110, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 20, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [48] = { + .vic = 48, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [49] = { + .vic = 49, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 54000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [50] = { + .vic = 50, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [51] = { + .vic = 51, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 54000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [63] = { + .vic = 63, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [78] = { + .vic = 78, + .h_active = 1920, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 297000000, + .h_front = 88, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 36, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [85] = { + .vic = 85, + .h_active = 1680, + .v_active = 720, + .interlaced = false, + .pixel_clock_hz = 198000000, + .h_front = 60, + .h_sync = 40, + .h_back = 220, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 95, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [92] = { + .vic = 92, + .h_active = 2560, + .v_active = 1080, + .interlaced = false, + .pixel_clock_hz = 495000000, + .h_front = 548, + .h_sync = 44, + .h_back = 148, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 4, + .v_sync = 5, + .v_back = 161, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [118] = { + .vic = 118, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [120] = { + .vic = 120, + .h_active = 3840, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 176, + .h_sync = 88, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [193] = { + .vic = 193, + .h_active = 5120, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1485000000, + .h_front = 164, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [201] = { + .vic = 201, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 4752000000, + .h_front = 352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [209] = { + .vic = 209, + .h_active = 7680, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 4752000000, + .h_front = 352, + .h_sync = 176, + .h_back = 592, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [217] = { + .vic = 217, + .h_active = 10240, + .v_active = 4320, + .interlaced = false, + .pixel_clock_hz = 5940000000, + .h_front = 288, + .h_sync = 176, + .h_back = 296, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 16, + .v_sync = 20, + .v_back = 144, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, + }, + [219] = { + .vic = 219, + .h_active = 4096, + .v_active = 2160, + .interlaced = false, + .pixel_clock_hz = 1188000000, + .h_front = 88, + .h_sync = 88, + .h_back = 128, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .v_front = 8, + .v_sync = 10, + .v_back = 72, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, + }, + [52] = { + .vic = 52, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [53] = { + .vic = 53, + .h_active = 720, + .v_active = 576, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 12, + .h_sync = 64, + .h_back = 68, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 5, + .v_sync = 5, + .v_back = 39, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [54] = { + .vic = 54, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 108000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [55] = { + .vic = 55, + .h_active = 1440, + .v_active = 576, + .interlaced = true, + .pixel_clock_hz = 108000000, + .h_front = 24, + .h_sync = 126, + .h_back = 138, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 2, + .v_sync = 3, + .v_back = 19, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [56] = { + .vic = 56, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [57] = { + .vic = 57, + .h_active = 720, + .v_active = 480, + .interlaced = false, + .pixel_clock_hz = 108000000, + .h_front = 16, + .h_sync = 62, + .h_back = 60, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 9, + .v_sync = 6, + .v_back = 30, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, + [58] = { + .vic = 58, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 108000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, + }, + [59] = { + .vic = 59, + .h_active = 1440, + .v_active = 480, + .interlaced = true, + .pixel_clock_hz = 108000000, + .h_front = 38, + .h_sync = 124, + .h_back = 114, + .h_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .v_front = 4, + .v_sync = 3, + .v_back = 15, + .v_sync_polarity = DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, + .picture_aspect_ratio = DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, + }, +}; + +const size_t _di_cta_video_formats_len = 220; diff --git a/cta.c b/cta.c index 55e2aa3..802f57c 100644 --- a/cta.c +++ b/cta.c @@ -23,6 +23,15 @@ */ #define CTA_SAD_SIZE 3 +const struct di_cta_video_format * +di_cta_video_format_from_vic(uint8_t vic) +{ + if (vic > _di_cta_video_formats_len || + _di_cta_video_formats[vic].vic == 0) + return NULL; + return &_di_cta_video_formats[vic]; +} + static void add_failure(struct di_edid_cta *cta, const char fmt[], ...) { diff --git a/include/cta.h b/include/cta.h index d33b11d..3fd0bda 100644 --- a/include/cta.h +++ b/include/cta.h @@ -140,6 +140,9 @@ struct di_cta_data_block { struct di_cta_ycbcr420_cap_map ycbcr420_cap_map; }; +extern const struct di_cta_video_format _di_cta_video_formats[]; +extern const size_t _di_cta_video_formats_len; + bool _di_edid_cta_parse(struct di_edid_cta *cta, const uint8_t *data, size_t size, struct di_logger *logger); diff --git a/include/libdisplay-info/cta.h b/include/libdisplay-info/cta.h index 0432d32..f7eb49c 100644 --- a/include/libdisplay-info/cta.h +++ b/include/libdisplay-info/cta.h @@ -13,6 +13,56 @@ #include #include +/** + * CTA video format picture aspect ratio. + */ +enum di_cta_video_format_picture_aspect_ratio { + DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_4_3, /* 4:3 */ + DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_16_9, /* 16:9 */ + DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_64_27, /* 64:27 */ + DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_256_135, /* 256:135 */ +}; + +/** + * CTA video format sync pulse polarity. + */ +enum di_cta_video_format_sync_polarity { + DI_CTA_VIDEO_FORMAT_SYNC_NEGATIVE, /* Negative */ + DI_CTA_VIDEO_FORMAT_SYNC_POSITIVE, /* Positive */ +}; + +/** + * A CTA-861 video format, defined in section 4. + */ +struct di_cta_video_format { + /* Video Identification Code (VIC) */ + uint8_t vic; + /* Horizontal/vertical active pixels/lines */ + int32_t h_active, v_active; + /* Horizontal/vertical front porch */ + int32_t h_front, v_front; + /* Horizontal/vertical sync pulse */ + int32_t h_sync, v_sync; + /* Horizontal/vertical back porch */ + int32_t h_back, v_back; + /* Horizontal/vertical sync pulse polarity */ + enum di_cta_video_format_sync_polarity h_sync_polarity, v_sync_polarity; + /* Pixel clock in Hz */ + int64_t pixel_clock_hz; + /* Whether this timing is interlaced */ + bool interlaced; + /* Picture aspect ratio */ + enum di_cta_video_format_picture_aspect_ratio picture_aspect_ratio; +}; + +/** + * Get a CTA-861 video format from a VIC. + * + * Returns NULL if the VIC is unknown. + */ +const struct di_cta_video_format * +di_cta_video_format_from_vic(uint8_t vic); + /** * EDID CTA-861 extension block. */ diff --git a/meson.build b/meson.build index 9db692d..4b3fd6f 100644 --- a/meson.build +++ b/meson.build @@ -51,6 +51,7 @@ di_lib = library( 'display-info', [ 'cta.c', + 'cta-vic-table.c', 'cvt.c', 'displayid.c', 'dmt-table.c', diff --git a/tool/gen-cta-vic.py b/tool/gen-cta-vic.py new file mode 100755 index 0000000..cc3dda0 --- /dev/null +++ b/tool/gen-cta-vic.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import sys + +if len(sys.argv) != 2: + print("usage: gen-cta-vic.py ", file=sys.stderr) + sys.exit(1) +in_path = sys.argv[1] +in_basename = os.path.basename(in_path) + +tool_dir = os.path.dirname(os.path.realpath(__file__)) +out_path = tool_dir + "/../cta-vic-table.c" + +# Page numbers for CTA-861-H +pages = { + "timing": (41, 43), + "sync": (44, 46), + "aspect_ratio": (55, 58), +} + +def extract_pages(page_range): + pages = [] + page = "" + cmd = ["pdftotext", "-f", str(page_range[0]), "-l", str(page_range[1]), "-layout", in_path, "-"] + for l in subprocess.check_output(cmd, text=True): + if l.startswith("\f"): + pages.append(page) + page = l[1:] + else: + page += l + return pages + +def extract_table(page): + lines = [l.strip() for l in page.splitlines()] + rows = [] + for l in lines: + fields = [field.strip() for field in l.split(" ") if field != ""] + rows.append(fields) + return rows + +def parse_vic_list(s): + return [int(vic.strip()) for vic in s.split(",")] + +def parse_hactive(s): + # Some hactive pixel values have a footnote marker + if s == "14402" or s == "28802": + s = s[:-1] + return int(s) + +def parse_interlaced(s): + if s == "Prog": + return "false" + elif s == "Int": + return "true" + else: + assert(False) + +def parse_timing_table(page, format_table): + assert("Table 1 - Video Format Timings — Detailed Timing Information" in page) + + for fields in extract_table(page): + if len(fields) != 11 or fields[0] == "VIC": + continue + for vic in parse_vic_list(fields[0]): + format_table[vic] = { + "vic": vic, + "h_active": parse_hactive(fields[1]), + "v_active": int(fields[2]), + "interlaced": parse_interlaced(fields[3]), + "pixel_clock_hz": int(float(fields[10]) * 1000 * 1000), + } + +def parse_polarity(pol): + if pol == "P": + return "POSITIVE" + elif pol == "N": + return "NEGATIVE" + else: + assert(False) + +def parse_sync_table(page, format_table): + assert("Table 2 - Video Format Timings — Detailed Sync Information" in page) + + for fields in extract_table(page): + if len(fields) < 12: + continue + for vic in parse_vic_list(fields[0]): + fmt = format_table[vic] + fmt["h_front"] = int(fields[2]) + fmt["h_sync"] = int(fields[3]) + fmt["h_back"] = int(fields[4]) + fmt["h_sync_polarity"] = "DI_CTA_VIDEO_FORMAT_SYNC_" + parse_polarity(fields[5]) + fmt["v_front"] = int(fields[6]) + fmt["v_sync"] = int(fields[7]) + fmt["v_back"] = int(fields[8]) + fmt["v_sync_polarity"] = "DI_CTA_VIDEO_FORMAT_SYNC_" + parse_polarity(fields[9]) + +def parse_aspect_ratio_table(page, format_table): + assert("Table 3 - Video Formats — Video ID Code and Aspect Ratios" in page) + + for fields in extract_table(page): + if len(fields) != 5: + continue + vic = int(fields[0]) + fmt = format_table[vic] + pic_ar = fields[3] + if pic_ar == "64:276": + # 64:27 has a footnote + pic_ar = pic_ar[:-1] + fmt["picture_aspect_ratio"] = "DI_CTA_VIDEO_FORMAT_PICTURE_ASPECT_RATIO_" + pic_ar.replace(":", "_") + +format_table = {} +for page in extract_pages(pages["timing"]): + parse_timing_table(page, format_table) +for page in extract_pages(pages["sync"]): + parse_sync_table(page, format_table) +for page in extract_pages(pages["aspect_ratio"]): + parse_aspect_ratio_table(page, format_table) + +max_vic = 0 +for vic in format_table: + if vic > max_vic: + max_vic = vic + +# Sanity check +for vic in format_table: + fmt = format_table[vic] + assert("h_sync" in fmt) + assert("picture_aspect_ratio" in fmt) + +with open(out_path, "w+") as f: + f.write("/* DO NOT EDIT! This file has been generated by gen-cta-vic.py from {}. */\n\n".format(in_basename)) + f.write('#include "cta.h"\n\n') + f.write("const struct di_cta_video_format _di_cta_video_formats[] = {\n") + for vic in format_table: + f.write("\t[{}] = {{\n".format(vic)) + for k, v in format_table[vic].items(): + f.write("\t\t.{} = {},\n".format(k, v)) + f.write("\t},\n") + f.write("};\n\n") + f.write("const size_t _di_cta_video_formats_len = {};\n".format(max_vic + 1))