From: Jon Langseth Date: Sun, 22 Jul 2012 11:51:58 +0000 (+0200) Subject: Merge branch 'videodetect' X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;h=bcd052520233e777bc7724f960b23a5ac861b817;p=avrfbosd Merge branch 'videodetect' --- bcd052520233e777bc7724f960b23a5ac861b817 diff --cc syncgen/main.c index 3fa6cea,e67d582..1dbfefb --- a/syncgen/main.c +++ b/syncgen/main.c @@@ -134,19 -128,22 +128,22 @@@ void vsync(uint8_t odd_even ISR (TIMER0_COMPA_vect) { - if(line == 310) vsync(0); - else if(line == 622) vsync(1); - else + if(line == 310) vsync(0); // End of ODD fields, start vsync'ing + else if(line == 622) vsync(1); // End of EVEN, start vsync'ing + else // In frame. Generate a hsync pulse, then do some drawing :) { hsync(); - int t_line = line; + + int t_line = line; // Reducing line-count complexity by half ;) t_line = ( line > 312 ) ? line - 312 : line; + // Draw the logo-image centered vertically if ( t_line > 118 && t_line < 118 + (2*testimg_height) ) { - _delay_us(12); + _delay_us(12.3); asm_render_line(); + // Stretch the image vertically by repeating the same line twice if( !stretch ) { stretch = 1;