portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

S-Video

Fri Dec 27, 2013 9:11 am

Chrominance(color) can be disabled on the composite video out using "sdtv_disable_colourburst=1", effectively giving only Luminance(greyscale). This looks very sharp, as it is half of the S-Video signal. It is even sharper if fed directly to the Luminance port of an S-Video input on a capable TV. Almost as sharp as HDMI at 640x480, albeit greyscale-only.

Would it be possible to have a mode that brings out Chrominance(color) to a GPIO pin or somewhere else on the board? This would be all that's needed to complete an S-Video signal.

drgeoff
Posts: 9745
Joined: Wed Jan 25, 2012 6:39 pm

Re: S-Video

Fri Dec 27, 2013 10:43 am

No, for a multitude of reasons including the one that the GPIOs are logic outputs (high or low) and the chrominance signal is analogue.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: S-Video

Fri Dec 27, 2013 10:50 am

The GPIO output pin can be either 3.3v or 0v it would not be possible to generate a chrominance signal.
If you want S-Video output then you'll need a HDMI video converter box with S-Video or Y/C support.

Richard S.

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: S-Video

Fri Dec 27, 2013 12:03 pm

drgeoff wrote:No, for a multitude of reasons including the one that the GPIOs are logic outputs (high or low) and the chrominance signal is analogue.
redhawk wrote:The GPIO output pin can be either 3.3v or 0v it would not be possible to generate a chrominance signal.
If you want S-Video output then you'll need a HDMI video converter box with S-Video or Y/C support.

Richard S.
Both of these issues are easily addressable with a DAC that outputs 0.3v peak-to-peak. Or a DAC that is fed into a common-emitter Class-A "amplifier" with lower-than-unity gain.
Last edited by portets on Fri Dec 27, 2013 12:21 pm, edited 2 times in total.

drgeoff
Posts: 9745
Joined: Wed Jan 25, 2012 6:39 pm

Re: S-Video

Fri Dec 27, 2013 12:19 pm

portets wrote:
drgeoff wrote:No, for a multitude of reasons including the one that the GPIOs are logic outputs (high or low) and the chrominance signal is analogue.
redhawk wrote:The GPIO output pin can be either 3.3v or 0v it would not be possible to generate a chrominance signal.
If you want S-Video output then you'll need a HDMI video converter box with S-Video or Y/C support.

Richard S.
Both of these issues are easily addressable with a DAC that outputs 0.3v peak-to-peak. Or a DAC that is fed into a common-emitter Class-A "amplifier" with lower-than-unity gain.
You seem confused on several points:

1. The chrominance signal can be pretty close to 1 volt peak to peak (100% colour bars).

2. Each GPIO is a 1-bit output. You need around 8 bits of resolution for the chrominance signal. For low frequency signals (such as audio) a 1-bit output can be operated in a pulse width or pulse density mode to act as a D to A. The RPi can achieve about 11 bits resolution for 48 kHz samples. The chrominance signal needs samples at more than 7.2 MHz (NTSC) or 8.9 MHz (PAL). That would yield about 3 bits of resolution.

3. Anyway all of #2 above is irrelevant. There is no pathway within the chip which can route signals from the video output side of the GPU to the GPIO pins.

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: S-Video

Fri Dec 27, 2013 12:39 pm

I thought luminance was 1v peak to peak and chrominance was 0v to 0.3v. Anyway, I read that the R-Pi's GPIO's could do ~20MHz. Wouldn't that be enough?

And couldn't the R-Pi's GPU driver be modified to output a color burst signal to software via a config.txt flag where it can be picked up by a program? Or maybe to a specific hardware point(GPIO, etc). I assume this would have to be done by someone that has access to the blob and not just the open source GPU driver pieces.

I don't know the math involved, but keep in mind that the chrominance of a composite/s-video signal is not 720/704/640 wide like the luminance is. It's somewhere between 120 and 160 wide from what I can gather. So it doesn't need as much bandwidth as it would seem.

All I'm really after is a really sharp and clean greyscale with some sort of color over it. Even if the color element is blurry and low-res. I just hate how much the color signal interferes with the greyscale signal in composite. It makes text and fine detail so much more indistinguishable.

User avatar
Burngate
Posts: 5971
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: S-Video

Fri Dec 27, 2013 7:54 pm

Luminance including sync is 1V p-p. Without sync, it's 700mV
Colour burst is 300mV. For 100% bars the green and magenta chrominance is 700mV; lower for 75% bars.
75-Bars.png
75-Bars.png (17.22 KiB) Viewed 3967 times
Since the subcarrier is ~4.5MHz (4433618.75 Hz ±1) you should only need ~9Mz clock rate to quantize it, and still keep all the phase information.
That should be within the capability of a GPIO pin.
But bear in mind that it's an analogue signal, so requiring up to 8 bits in the digital domain. That means, if you're wanting a 1-bit D-A, you'll have to toggle at 256 times that rate - not doable!

The GPU has all the information available to create a YUV set of signals, but it doesn't necessarily have the hardware to output it. There's certainly a PAL or NTSC encoder followed by video output stage, but not necessarily a second output stage for the chrominance signal

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2075
Joined: Thu Jul 11, 2013 2:37 pm

Re: S-Video

Fri Dec 27, 2013 9:21 pm

The composite video output is from a dedicated D-to-A peripheral which has sole control over the "video DAC" output. It basically takes a framebuffer of suitable H x V, frames it at 50/59.97fps and produces sync/colour/backporch levels all by itself.

I don't know if it is even possible to output the chrominance channel to a different (dedicated) output pin - and if it did, chances are you wouldn't be able to access it on the Pi.
Rockets are loud.
https://astro-pi.org

Return to “Advanced users”