root/morphix/trunk/ddcxinfo/tt

Revision 2, 1.0 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

Line 
1         /* Standard timings. */
2         for(i = 0; i < 8; i++) {
3                 double aspect = 1;
4                 unsigned int x, y;
5                 unsigned char xres, vfreq;
6                 xres = edid_info->standard_timing[i].xresolution;
7                 vfreq = edid_info->standard_timing[i].vfreq;
8                 if((xres != vfreq) ||
9                    ((xres != 0) && (xres != 1)) ||
10                    ((vfreq != 0) && (vfreq != 1))) {
11                         switch(edid_info->standard_timing[i].aspect) {
12                                 case 0: aspect = 1; break; /*undefined*/
13                                 case 1: aspect = 0.750; break;
14                                 case 2: aspect = 0.800; break;
15                                 case 3: aspect = 0.625; break;
16                         }
17                         x = (xres + 31) * 8;
18                         y = x * aspect;
19                         printf("Standard timing %d: %d Hz, %dx%d\n", i,
20                                (vfreq & 0x3f) + 60, x, y);
21                 }
22         }
23
Note: See TracBrowser for help on using the browser.