CVT Timings Program

based on GTF by Andy Ricter of NVidia, converted to CVT with extra features by Erich Boleyn


Contents


Download the CVT program Source

This program was modified from the source of the GTF Project at SourceForge with some interaction with the original author, Andy Ritger at NVidia.

Linux compilation and other instructions are in the comments at the top of the program source code.

It also includes some extra features like calculating interlaced video modes (this has not been very well tested, though the numbers compared to the spreadsheet with one change for making it more intuitive to use), and the output is slightly more verbose to be clear what the mode parameters are.

IMPORTANT NOTE: X (via Xorg) will likely get the capaibility to calculate CVT modes for you by late 2006, or so they tell me.


Why should I care about CVT anyway?

The VESA Standards Body has, as of early 2003, replaced the GTF (General Timing Formula) video timings standard with the CVT (Coordinated Video Timings) standard.

You can't get the standards documents for free, but you can download the GTF Spreadsheet and the CVT Spreadsheet from THe VESA site, which are the reference calculations and also explain the timing standards reasonably well.

Note that, as of 2005, many monitors don't implement new CVT timings, more are starting to, and CVT gives several benefits:

Unfortunately, it is also somewhat different in how it calculates modes that use even the same features, so even the "same" video modes are slightly different. These differences appear to be there for a good reason (Standardized Pixel Clocks and a more clean definition when rounding is necessary in calculations), but it does mean that CVT normal video modes don't correspond to old GTF or VESA monitor video modes.

I.e. you arguably still have to keep around the old GTF way of caculating modes in the case you want a compatible set of timings.


Examples of usage with timings

First off, just the "usage" message, which shows the extra features:

erich@lap64:~/tools/cvt$ ./cvt

Description:  This program generates video timing descriptions using formulas
   from the VESA "CVT" (Coordinated Video Timing) v1.1 specification, based
   itself on the earlier VESA "GTF" (Generalized Timing Formula) v1.0
   specification.

usage: ./cvt x y refresh [-v|--verbose]
      [-r|--reduced-blank] [-i|--interlaced]
      [-f|--fbmode] [-x|-xf86mode]

            x : the desired horizontal resolution (required)
            y : the desired vertical resolution (required)
      refresh : the desired refresh rate (required)
 -v|--verbose : enable verbose printouts (traces each step of the computation)
 -r|--reduced-blank : use "Reduced Blanking" timings
 -i|--interlaced : generate an Interlaced video mode
 -f|--fbmode  : output an fbset(8)-style mode description
 -x|-xf86mode : output an XFree86-style mode description (this is the default
                if no mode description is requested)
CVT standard modes for 1024x768, 1280x1024, and 1920x1200 at 60Hz:

erich@lap64:~/tools/cvt$ ./cvt 1024 768 60

  # 1024x768 @ 60.00 Hz (CVT)
  #   field rate 59.92 Hz; hsync: 47.82 kHz; pclk: 63.50 MHz
  Modeline "1024x768_60.00"  63.50  1024 1072 1176 1328  768 771 775 798  -HSync +Vsync

erich@lap64:~/tools/cvt$ ./cvt 1280 1024 60

  # 1280x1024 @ 60.00 Hz (CVT)
  #   field rate 59.89 Hz; hsync: 63.67 kHz; pclk: 109.00 MHz
  Modeline "1280x1024_60.00"  109.00  1280 1360 1496 1712  1024 1027 1034 1063 -HSync +Vsync

erich@lap64:~/tools/cvt$ ./cvt 1920 1200 60

  # 1920x1200 @ 60.00 Hz (CVT)
  #   field rate 59.88 Hz; hsync: 74.56 kHz; pclk: 193.25 MHz
  Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -HSync +Vsync
CVT Reduced Blanking modes for 1024x768, 1280x1024, and 1920x1200 at 60Hz (note they have considerably lower pixel clocks!!):
erich@lap64:~/tools/cvt$ ./cvt 1024 768 60 -r

  # 1024x768 @ 60.00 Hz Reduced Blank (CVT)
  #   field rate 59.87 Hz; hsync: 47.30 kHz; pclk: 56.00 MHz
  Modeline "1024x768_60.00_rb"  56.00  1024 1072 1104 1184  768 771 775 790  +HSync -Vsync

erich@lap64:~/tools/cvt$ ./cvt 1280 1024 60 -r

  # 1280x1024 @ 60.00 Hz Reduced Blank (CVT)
  #   field rate 59.96 Hz; hsync: 63.19 kHz; pclk: 91.00 MHz
  Modeline "1280x1024_60.00_rb"  91.00  1280 1328 1360 1440  1024 1027 1034 1054  +HSync -Vsync

erich@lap64:~/tools/cvt$ ./cvt 1920 1200 60 -r

  # 1920x1200 @ 60.00 Hz Reduced Blank (CVT)
  #   field rate 59.95 Hz; hsync: 74.04 kHz; pclk: 154.00 MHz
  Modeline "1920x1200_60.00_rb"  154.00  1920 1968 2000 2080  1200 1203 1209 1235  +HSync -Vsync
Example showing CVT 1920x1080 60Hz standard with verbose information:
erich@lap64:~/tools/cvt$ ./cvt 1920 1080 60 -v
 1: [V FIELD RATE RQD]         :       60.000000
 2: [H PIXELS RND]             :     1920.000000
 2.5: [ASPECT_RATIO]           :       16:9
 2.5: [V SYNC]                 :        5.000000
 3: [LEFT MARGIN (PIXELS)]     :        0.000000
 3: [RIGHT MARGIN (PIXELS)]    :        0.000000
 4: [TOTAL ACTIVE PIXELS]      :     1920.000000
 5: [V LINES RND]              :     1080.000000
 6: [TOP MARGIN (LINES)]       :        0.000000
 6: [BOT MARGIN (LINES)]       :        0.000000
 7: [INTERLACE]                :        0.000000
 8: [H PERIOD EST]             :       14.881503
 9: [Actual V_SYNC_BP]         :       36.958633
 9: [Estimated V_SYNC_BP]      :       37.000000
 9: [V_SYNC_BP]                :       37.000000
10: [Back porch]               :       32.000000
11: [TOTAL V LINES]            :     1120.000000
12: [IDEAL DUTY CYCLE]         :       25.535549
13: [H BLANK]                  :      656.000000
14: [TOTAL PIXELS]             :     2576.000000
15: [Non-rounded PIXEL FREQ]   :      173.100800
15: [ACT PIXEL FREQ]           :      173.000000
16: [ACT H FREQ]               :       67.158386
17: [ACT FIELD RATE]           :       59.962841
18: [ACT FRAME RATE]           :       59.962841
20: [H BACK PORCH]             :      328.000000
21: [H SYNC RND]               :      200.000000
22: [H FRONT PORCH]            :      128.000000
23: [V FRONT PORCH]            :        3.000000

  # 1920x1080 @ 60.00 Hz (CVT)
  #   field rate 59.96 Hz; hsync: 67.16 kHz; pclk: 173.00 MHz
  Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -HSync +Vsync

erich@uruk.org