Tuesday, March 27, 2007

ITU Rec 601 vs Rec 709 colourspace

Every superhero knows that in transitioning from standard definition television to high def we've adopted a different matrixing function for component to/from RGB conversion. The numbers for (old-skool) Rec 601 are thus;
Y = 0.299R +0.587G +0.114B
Cb = 0.564(B-Y) + 350mV
Cr = 0.713(R-Y) + 350mV

And the new kids on the block (Rec 709);
Y = 0.213R +0.715G +0.072B
Cb = 0.539(B-Y) + 350mV
Cr = 0.635(R-Y) + 350mV

So, not only has the weighting of the colours that make up the luminance path changed but the weighting of the colour difference signals is different. I've heard varying accounts of why they felt the change was necessary - I think it's probably to do with cameras and telecines (now be entirely CCD-based as opposed to the ubiquity of tubes when 601 was being formulated) and display devices (are we going to be able to buy a tube'd monitor by the end of this year?!). The new values better reflect the tri-stimulus nature of human vision and are less bound by the very noisy response of the blue-tube in image acquisition devices of yester-year.

However, one of the upshots of this is that digital devices that can receive an SD/HD-SDi bitstream have to be able to switch in the appropriate matrix. If that isn't the case then you'd notice a green cast on pictures if you switched between standards (going from HD to SD) or a magenta error going the other way. In the case of a monitor you'd have to re-calibrate the white point to D65.

The reason this has cropped up is that a facility (where I've just started to offer them colour calibration advice) has noticed that a monitor that was lined up correctly for HD working is showing the wrong colourimetry when being sent an SD feed. It's gone green (and not with envy! - oh, and that isn't the facility in case you're wondering!). It's a JVC DTV1700 series monitor which (although a cheapie at <£2k) has an EBU-phosphored tube (so you can calibrate it to 6500k at the white point). It looks like JVC's input card doesn't do the matrix switch. So, I'm wondering what other monitors do - I was sure the Sony BVM-D range did (but those monitors started in the mid-teen thousands of pounds). Any comments from people who've hit this before? As an aside the image (right - click it!) is from a very good Tektronix poster entitled Understanding Colors and Gamut - I have many copies (along with the equally exciting Understanding High Definition Video!) - give me a yell if you want one.

3 comments:

glenn said...

Nice blog.

In regards to 601 versus 709 colourspace, the numbers you have are a weird mix of digital and analog. The Recommendation (you can download em for free via the 3 free downloads promotion) from what I remember only specifies the digital values. Standard analog levels are defined elsewhere (and there are different standards... just to make life hard...).

The Rec. 709 figures you have are rounded off... they shouldn't be. Wherever you got those numbers from might be a pretty sketchy source.

2- When going SD<-->HD, there should be a special color matrix applied that converts between rec.601 and rec.709 Y'CbCr values. A lot of consumer equipment omits this matrix as a cost cutting measure... and also because it's a subtle difference. It's really subtle. In that case, white will stay white (exactly the same)... hue and saturation for saturated colors will be different.

You can't calibrate a monitor to fix this. (Though some monitors let you pick which set of luma coefficients to use I believe; that would fix it.) Some cameras let you set which set of luma coefficients to use.

3- I'm surprised to hear that the JVC handles it incorrectly... this is pretty unacceptable for broadcast use.

4- The reason the luma coefficients were changed (from what Poynton has said anyways) is so that they are appropriate for the standard primaries of modern video monitors.
Originally, NTSC was envisioned with wide gamut primaries. These primaries fell out of use as manufacturers used a narrower set of primaries to make the picture brighter (which was needed because early CRTs were dim). In Rec. 709, they chose a new set of primaries (the Rec. 709 primaries).

There is a very slight **theoretical** advantage to make the luma coefficients 'match' the set of primaries being used. But really, it was a boneheaded idea. Changing the luma coefficients doesn't really fix the problems with chroma subsampling (it ain't visually lossless). Benefit-wise the quality improvement is close to negligible (there are many people who think Rec. 601 chroma subsampling is visually lossless).

see "Luminance, luma, and the migration to DTV" at poynton's website
http://poynton.com/Poynton-video-eng.html

Phil Crawley said...

Well those figures came out of the Tek book that BBC Kingswood Warren dish out!
I shall go and consult further but as I understood the 601 and 709 matrix functions only apply to Y Cr Cb to/from RGB transcoding in the digital domain. Typically it's how RGB display surfaces handle HD/SDi signals which is why it's curious that the DTV-series JVC monitors don't apply the appropriate matrix when switching between SD and HD rasters - but it is the case.

glenn said...

Actually looking at the poster a little closer, it looks like they just copied the chart diagram from somewhere else as nothing lines up between the chart and the table.

Who made this poster? It's just weird in that there are errors that weren't caught.

2- I was incorrect in my earlier comment about 709 only defining digital values... it also specifies analog values. It doesn't mash them together though.