ericball
03-27-2009, 11:07 PM
This is phase 1 of a composite video driver which uses the VGA mode instead of the baseband mode.· Using the VGA mode it should be able to render twice as many colors.· Unfortunately, I get varying results depending on what TV I'm using.
The baseband mode generates color via a circular shifter which is tapped to produce 16 phases of the colorburst frequency, or in math terms Chroma = 20IRE * cos( Fc * t + hue(t) ).· However, a different way to express this is two sine waves - one in phase with the colorburst (U) and one 90 degrees out of phase (V), or Chroma = U(t) * cos( Fc * t ) + V(t) * sin( Fc * t ).· Therefore, in theory, if the video driver generates chroma values at 0, 90, 180, and 270 degrees, or four times the colorburst frequency, then it should be able generate different colors depending on the values of U & V (and the luma component Y).
And that's what this video driver does.· It sets the PLLA clock to four times the colorburst frequency (14.318181 MHz, or 910 cycles per line) and clocks out 3 samples per "pixel", with 240 pixels per line and 240 lines per screen (non-interlaced, 262 lines per frame).· This test driver puts out a static graphic of 8 vertical stripes of different colors.
On my TVs I get a B&W pattern, almost like the TV isn't picking up the colorburst.· However, on my capture card I get bands of color, but they change hue.· It's also not 100% stable and there's an interference pattern.· (If I supress the colorburst, then it goes to B&W.)· On my HDTV it's B&W and then flashes to color.· (I suspect that's something with the image processing it does and it's just not happy with the signal.)
Does anyone have any insight or suggestions?
The code is for the Demoboard, I have included the settings for the Hydra and Hybrid, just change which lines are commented.
The baseband mode generates color via a circular shifter which is tapped to produce 16 phases of the colorburst frequency, or in math terms Chroma = 20IRE * cos( Fc * t + hue(t) ).· However, a different way to express this is two sine waves - one in phase with the colorburst (U) and one 90 degrees out of phase (V), or Chroma = U(t) * cos( Fc * t ) + V(t) * sin( Fc * t ).· Therefore, in theory, if the video driver generates chroma values at 0, 90, 180, and 270 degrees, or four times the colorburst frequency, then it should be able generate different colors depending on the values of U & V (and the luma component Y).
And that's what this video driver does.· It sets the PLLA clock to four times the colorburst frequency (14.318181 MHz, or 910 cycles per line) and clocks out 3 samples per "pixel", with 240 pixels per line and 240 lines per screen (non-interlaced, 262 lines per frame).· This test driver puts out a static graphic of 8 vertical stripes of different colors.
On my TVs I get a B&W pattern, almost like the TV isn't picking up the colorburst.· However, on my capture card I get bands of color, but they change hue.· It's also not 100% stable and there's an interference pattern.· (If I supress the colorburst, then it goes to B&W.)· On my HDTV it's B&W and then flashes to color.· (I suspect that's something with the image processing it does and it's just not happy with the signal.)
Does anyone have any insight or suggestions?
The code is for the Demoboard, I have included the settings for the Hydra and Hybrid, just change which lines are commented.