Hacker News new | ask | show | jobs
by ornitorrincos 1845 days ago
YUV has been the standard video Color encoding on TV. It is in fact a backwards compatible extension to black and white as the wikipedia page puts it: https://en.wikipedia.org/wiki/YUV

while not standard, writing a shader to decode is not hard(admittedly if you know shaders)

The time I spent dealing with video decode/encode was not pleasurable but interesting.

The really hard part is the actual encoding/decoding algorhtims

3 comments

> while not standard, writing a shader to decode is not hard(admittedly if you know shaders)

Ah, the old "Step 2: Draw the rest of the owl" scenario.

We'll leave that as an exercise for the reader
YUV was the standard in PAL, NTSC used something called YIQ.
Is that why the industry joke was the NTSC acronym meant “Never The Same Color Twice”?
I don't think so. I think NTSC's color issues (compared to PAL) were due more to how PAL alternates the phase of the lines (PAL = phase alternating lines, btw). The alternating phases or PAL had the effect of canceling out transmission errors (in the colors), providing more stable color than NTSC. This is somewhat similar to how balanced pairs in ethernet cables cancel out transmission errors. (see also: balanced lines in long pro audio cables or differential pairs in PCB routing)
It's similar, but note that what differential-voltage signaling cancels (as in pro audio cables, PCB routing, or ethernet cables) is common-mode EMI; but, as I understand it, the differential-phase signaling in PAL instead cancels out errors introduced by dispersion (where the phase delay varies significantly over the 6MHz bandwidth of a TV channel).

So it's analogous, but there's a critically important difference. (Not that you claimed otherwise.)

I'd add the relative lack of calibration on NTSC as another huge factor. When you have TV manufacturers putting out sets with completely different defaults on top of broadcasters not being able to calibrate to any sort of standard TV appearance, you'd see a lot of different results per-station AND per-show.
I may be conjuring things, but I think many early video cards actually outputted a TV or component video signal, which uses YUV (=YCbCr?) color, so it is RGB that would have required conversion, not YUV.