Composite Video
Lee Marshall
Posts: 106
im trying to get my head around the whole CVBS/composite video waveform.
so far - gathering a lot of info from www.maxim-ic.com/appnotes.cfm/appnote_number/734
- I understand the following(at least i think i do):
Each line has:
A Sync Pulse(drop to 0v) for 4.7uS
A Breezeway/Front Porch for 0.6uS
A color burst, a sort of sine wave that synchronises an oscillator in the TV to a frequency (around 4.3mhz for PAL).
A section of video which lasts for 52.6uS, this parallels with the electron gun tracking across the line in the screen.
The voltage level of the signal during the active video section dictates the brighness(luma), and the phase difference between the TVs oscillator frequency and the frequency of the active video dictates the color(chroma). so i take it, the frequency of active video is modulated to produce different colors.
What i dont get:
for the active video part of the signal to have a frequency it would have to be like a sine wave/some kind of oscillation. Figure 6 in the link shows a test-bar pattern, but it uses a square wave for each bar of different amplitude. How can this change the color? not only does it not have a frequency, and therefore no phase comparison is possible, but i thought the amplitude of the active video could only change brightness.
This has been bugging me a lot over the last week, and i would really appreciate any insight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
Post Edited (Mr Crowley) : 10/10/2007 4:00:33 AM GMT
so far - gathering a lot of info from www.maxim-ic.com/appnotes.cfm/appnote_number/734
- I understand the following(at least i think i do):
Each line has:
A Sync Pulse(drop to 0v) for 4.7uS
A Breezeway/Front Porch for 0.6uS
A color burst, a sort of sine wave that synchronises an oscillator in the TV to a frequency (around 4.3mhz for PAL).
A section of video which lasts for 52.6uS, this parallels with the electron gun tracking across the line in the screen.
The voltage level of the signal during the active video section dictates the brighness(luma), and the phase difference between the TVs oscillator frequency and the frequency of the active video dictates the color(chroma). so i take it, the frequency of active video is modulated to produce different colors.
What i dont get:
for the active video part of the signal to have a frequency it would have to be like a sine wave/some kind of oscillation. Figure 6 in the link shows a test-bar pattern, but it uses a square wave for each bar of different amplitude. How can this change the color? not only does it not have a frequency, and therefore no phase comparison is possible, but i thought the amplitude of the active video could only change brightness.
This has been bugging me a lot over the last week, and i would really appreciate any insight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
Post Edited (Mr Crowley) : 10/10/2007 4:00:33 AM GMT
Comments
would this be an example of superimposing a 2mhz wave on a 166khz wave..or is it the other way around?
(see attachment)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
Post Edited (Mr Crowley) : 10/10/2007 4:43:51 AM GMT
lntsc = 3640 'NTSC color cycles per line * 16
What's that? Well on the Grayscale Video - the "Luma Signal" - another small signal is superimposed, carrying the "hue" information in its phase, and the "saturation" in its amplitude. it will look like a "ripple" in an oscilloscope. There are 225 such "ripples" in a line of an NTSC signal, colouring the image so to speak. Note that according to the standard only every third pixel can be coloured differently. But this suffices for our human eyes.
Now the Propeller is limited in range of its outputs: They are digital and you can generate only 8 different voltage levels with 3 pins.
0 is sync
1 is blank
2 ..6 can be used for a grayscale level.
Additionally, around each third pixel, this signal is "boosted" by a bit, to generate the phase shifted chroma information. The time frame for this signal however is much more precise than the pixel clock, it is that magic number above: 20us/3640. Note however that this is not the "frequency" of this signal!
The Prop can't be more precise, and this is why there are 15 colour shades only.
And this signal has a constant amplitude (+1), so - as Mike already said - there is no variability in saturation.
BTW: I just see your posting: "Superimposed" means just adding (in contrast to a "true" modulation). One generally consideres the "smaller" signal superimposed onto the "larger" one, but this is just a figure of speech.
Post Edited (deSilva) : 10/10/2007 4:47:22 AM GMT
i noticed a kind of weird square wave(seen in pic) in the first half of the active video, what would this be for??
and, the signal is AC(as opposed to the lowest voltage being 0v), as if there's a capacitor in the dvd players output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
Post Edited (Mr Crowley) : 10/10/2007 5:38:44 AM GMT
What is being displayed on the DVD? This could help you explain the "weird square wave" that you are seeing. Notice you also have another wave that appears in the same area. This is because your scope syncs on one video line at a time so you are seeing several successive video lines "superimposed" on one another on the display. This is not to be confused with your questions about the chroma being superimposed on the luma signals, only to point out that you are viewing several video lines at once due to the persistence of the scope (and your eyes).
If the DVD that you are playing has closed caption, this information is sent as digital pulses on the video stream during the vertical blank intervals. Read up on closed caption on wikipedia for more details on how this works.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
where Fc is the colorburst frequency, Y is the B&W luma signal, and U & V are the color difference signals.
The TV receiver decodes the video by first separating the luma and chroma signals using filters. The two chroma signals are then separated by modulating the signal with the colorburst frequency (phase-locked to the colorburst portion of the sync).
The chroma phase versus the colorburst gives the hue (color 1-15 on the Prop), and the amplitude gives the intensity (single value on the Prop).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
Post Edited (Mr Crowley) : 10/10/2007 5:42:12 PM GMT
Or better: What do you want to ask?
i guess i should have been more concise about the statement i was making.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
I'm not entirely sure of the exact semantics there so my answer is, "The video signal from the propeller from the three-R DAC driving a TV through an RCA Phono gives a colour image".
With the Parallax reference video circuit, you get color. See here: http://propeller.wikispaces.com/Colors
There is a screen capture, made with a HYDRA, that displays the standard (non artifacted) colors possible with a Propeller. One set is missing, that's the set along the right.
The grid of other colors, was created by generating two colored pixels in the space of one NTSC color clock. (320 pixels in the active area, instead of the 160 normally.)
If you want to build your own video circuit, there are a lot of options for color possible.
One really easy way to look at color, the way the Propeller currently generates it is this:
Also take a look at http://www.ntsc-tv.com/ Lots of detailed information there, circuits, etc...
Later today, when I'm near a prop, I'll do a screen capture of a color signal ran through an S-video intensity only input. The sub-pixels can be easily seen.
With static color timing (non interlaced), those show up as thin, smaller than a pixel, lines that texture everything according to it's color. With interlaced timing, it's a rapidly changing pattern of dots, that alternate their position each scan line, going even or odd, on each frame.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Post Edited (potatohead) : 10/10/2007 7:33:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards,
Jim
as i currently see it, its all about how much of which color is put into each pixel on the screen.
its sort of like: if the voltage peaks at the same frequency as the color burst, but 256deg out of phase with the color burst frequency, the line would be yellow.
The greater the variance between the 256deg and the other phases, the more pronounced the yellow is.
Thanks for all the help, now i can make my video driver!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards,
Jim
But you do not need this, as the Video Logic within the propeller will do most of the color things for itself -
except in those most exotic cases Potatohead has discussed. And it is much simpler with VGA.
---
Edit: Posts crossed.... Jim is right, of course...
Post Edited (deSilva) : 10/10/2007 11:12:02 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
I wanted to gain a better idea about the workings of composite video, so that i could make a driver optimized for what i want to do.
i have now achieved this, and i thank you all for the help.
i dont need control of saturation or anything, i will probably just use basic colours, maybe just greyscale. maybe nothing but b/w, ill see, when i come to writing my big program.
it was going to be a BZFlag-like game, but i see someone has already started on something similar. maybe ill do an armagetron advanced.
that reminds me, has anyone written an ethernet interface yet?
my view on the prop 2 matter:
i think the prop 2 needs more ram, maybe ~128K, you just cant put many reasonable quality bitmaps along with a lot of code in 32KB.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I hear and I forget. I see and I remember. I do and I understand
-Confucius
On this Prop, there are drivers written for an external SRAM. That's 512K, plenty for an 8 bit double buffered screen, assets and such, at TV resolution. A standard color one can be found in the HYDRA forum. I think it's about done, or done enough to be worked with. jasper_m & epmoyer got that up and running fairly quickly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!