I've created an 8-bit VGA controller that outputs a 400x300 RGB signal. I also want to implement an AV output using PAL encoding. I don't understand how I can achieve the same resolution since the color subcarrier has a frequency of 4.43Mhz. Since the active video is 52μs long, I can only have 52x4.43 = 230 color pixels per line. In other words, I can send 400 pixels per line but I cannot send 400 colors per line. Am I missing something? Is there a way out?
-
\$\begingroup\$ 400x300 is not a standard resolution. Why that resolution? \$\endgroup\$– Mitu RajCommented Jun 4, 2021 at 19:16
-
\$\begingroup\$ I use VESA 800x600 @ 36Mhz divided by 2. Works fine on every monitor I tested it and it is easier to source crystals-oscillators than 25.175 Mhz for std VGA. \$\endgroup\$– tcopCommented Jun 4, 2021 at 19:25
-
\$\begingroup\$ So you are upscaling 400x300 to 800x600? \$\endgroup\$– Mitu RajCommented Jun 4, 2021 at 19:31
-
1\$\begingroup\$ I am supposed to send 800 pixels in 22.22μs. I send 400. I get everything doubled. \$\endgroup\$– tcopCommented Jun 4, 2021 at 19:36
-
\$\begingroup\$ There are millions of colours with 24b, but chroma BW is determined by phase not toggle rate. \$\endgroup\$– D.A.S.Commented Jun 4, 2021 at 19:49
2 Answers
There are basically no pixels in an analog PAL (or NTSC) signal.
While the subcarrier is 4.43361875 MHz (or 3.579545 MHz for NTSC), the video information is still analog.
The color information just can't change as fast as the luma due to chroma being bandwidth limited to about 1.3 MHz in PAL (NTSC is different).
And the color hue information is sent as the phase of the color subcarrier, and color saturation is sent as the amplitude of the color subcarrier. So the chroma bandwidth limit just limits how fast the phase or amplitude of the color carrier can be changed.
Basically, that's why RGB is converted to YUV, and that's why the Y (luma) can have more bandwidth of 5 to 6 MHZ (depending on which PAL standard is used) than UV which is limited to 1.3 MHz before quadrature modulated with the color carrier.
You can't change the chroma subcarrier or the TV won't lock onto it.
Since 1.3 MHz color bandwidth is maximum, and your visible scanline is 52 microseconds, it basically means 135 color pixels per visible line.
Basically what it means is that you can draw sharper brightness information and apply less sharp color information. If you have analog RGB already, just add a composite encoder chip which does the conversion so you don't have to generate composite yourself.
-
\$\begingroup\$ So how does a dvd player achieves higher resolutions? \$\endgroup\$– tcopCommented Jun 5, 2021 at 17:18
-
\$\begingroup\$ @tcop I don't follow what higher resolutions you mean? What resolution is stored on disc does not mean it can fit out of composite output without degradation. Besides DVD stores video in 4:2:0 format, which means for 720x576 frame, that's only the brightness info. The U and V are both 360x288. And 720x576 is the digital component resolution, so composite bandwidth can't match that. \$\endgroup\$– JustmeCommented Jun 5, 2021 at 17:36
-
\$\begingroup\$ Thanks. Could you please explain how 360 is achieved? \$\endgroup\$– tcopCommented Jun 5, 2021 at 18:25
-
\$\begingroup\$ 360 is achieved in DVDs by sampling component video color difference signals at 6.75 MHz, which allows analog bandwidth roughly up to 2.75 MHz. Since PAL composite video allows color difference signal bandwidth up to 1.3 MHz, by same logic, that's about 170 color difference pixels. It simply means, if you have 400 pixels per line, you can change brightness every pixel if you like, but due to composite color bandwidth limit, it is not possible to change color at every pixel, it can be changed gradually over 3..4 pixels. \$\endgroup\$– JustmeCommented Jun 5, 2021 at 20:10
-
\$\begingroup\$ Thanks. It is clear now. I had the impression that DVD's high resolution was achieved through composite and not through component video. \$\endgroup\$– tcopCommented Jun 5, 2021 at 22:00
In PAL (and NTSC), the color information is deliberately bandlimited and undersampled in order to reduce the analog signal bandwidth requirements while maintaining "reasonable" picture quality. This is based partly on the fact that the human eye has greater spatial resolution for intensity than for color.
So yes, any attempt to create a compatible PAL signal digitally is going to have to take this into account.
-
\$\begingroup\$ According to en.wikipedia.org/wiki/Standard-definition_television it can go far beyond 230 color pixels. But I cannot understand how this is possible. There are not many info out there about PAL or NTSC. I am wondering if I can just use a higher frequency sub-carrier signal. \$\endgroup\$– tcopCommented Jun 4, 2021 at 19:10
-
\$\begingroup\$ There are literally dozens of books explaining how PAL or NTSC works, so saying that there is info out there is not exactly true. \$\endgroup\$– JustmeCommented Jun 4, 2021 at 20:53
-
\$\begingroup\$ Feel free to share any link of those dozens of material \$\endgroup\$– tcopCommented Jun 4, 2021 at 21:27