Log in

View Full Version : HD Rips in SD xVID Format


703
31st January 2012, 00:57
What is the general practice?

For encoding, do they encode to the BT.601 matrix co-efficients from the original BT.709 matrix co-efficients in the HD feed and leave the primaries at BT.709 without gamut re-mapping?

As the standard for SD material is BT.601 matrix and SMTPE-C primaries. However, I wouldn't think you would convert the original BT.709 gamut to SMTPE-C and risk clipping the more saturated colors.

Thanks

Asmodian
31st January 2012, 01:59
Actually SMTPE-C is larger than BT.709 so no clipping worries. I would suggest converting to BT.601/SMTPE-C or a lot of decoding chains will display with wrong colors.

As for "General Practice"; Doom9 is probably not the right forum.

Edit: well blue is a bit different (some blue in BT.709 cannot be displayed in BT.601) but red and green are more saturated in BT.601. I have never noticed blue being off or clipped but I haven't done much HD->SD either. It is pretty clear when it is wrong if you are used to normal skin tones (mostly due to the difference in green saturation).

hello_hello
31st January 2012, 05:55
"General practice" seems to be not to bother with colorimetry at all.

It shouldn't matter what encoder you use, HD is pretty much always R.709 and SD is pretty much always R.601. I can't speak for what every hardware player would do but that's the way a PC would generally display video whether it be Xvid or h264 etc.

If I'm converting from HD to SD I always convert the colors. I'm not sure if the clipping you're referring to is the same thing, but I recently inquired about the colormatrix clamp option in this thread and while I was just trying to get my head around what happens when you use it, the information poisondeathray offered may be of interest to you:
http://forum.doom9.org/showthread.php?t=163699

703
31st January 2012, 06:20
Thanks for the response.

The clipping I was referring to has nothing to do with levels, but rather from the color space conversion when you go from SMTPE-C to Rec.709 from the perspective of the CIE Chromaticity Diagram.

Roughly speaking, SMPTE-C is just as wide as Rec.709, however if you look at Red:

SMTPE-C: xr=0.630 yr=0.340
Rec.709: xr=0.64 yr=0.33

Therefore, the most saturated RED in Rec.709 is a different colour to the most satured RED in SMPTE-C, and when you do the conversion, the software will have to re-map the Rec.709 values to fit inside the SMPTE-C gamut.

So the way I think about it, yes for SD, change the matrix co-efficient to Rec.601 or else components will decode the levels wrongly to RGB, but see little point of gamut re-mapping, as normally displays and components don't do any gamut re-mapping, not in a consistent manner anyway!

Asmodian
31st January 2012, 07:06
So the way I think about it, yes for SD, change the matrix co-efficient to Rec.601 or else components will decode the levels wrongly to RGB, but see little point of gamut re-mapping, as normally displays and components don't do any gamut re-mapping, not in a consistent manner anyway!

Yes they do, on a PC most everything uses Rec.601 if vertical resolution is <~700 or 720 and Rec.709 for anything over. A few will actually use the flags in the stream if it is set.

Blurays also follow this, they expect smtpe-c for 480p and bt.709 for 720p and 1080p.

If you look at a real video source on a gamut map you will almost never see any colors all the way out near the primaries. I wouldn't worry about clamping when going from rec.709 to rec.601.

IMO it is correct to do the remap and wrong not to.

Ghitulescu
31st January 2012, 09:39
The clipping I was referring to has nothing to do with levels, but rather from the color space conversion when you go from SMTPE-C to Rec.709 from the perspective of the CIE Chromaticity Diagram.

Roughly speaking, SMPTE-C is just as wide as Rec.709, however if you look at Red:

SMTPE-C: xr=0.630 yr=0.340
Rec.709: xr=0.64 yr=0.33

Therefore, the most saturated RED in Rec.709 is a different colour to the most satured RED in SMPTE-C, and when you do the conversion, the software will have to re-map the Rec.709 values to fit inside the SMPTE-C gamut.

So the way I think about it, yes for SD, change the matrix co-efficient to Rec.601 or else components will decode the levels wrongly to RGB, but see little point of gamut re-mapping, as normally displays and components don't do any gamut re-mapping, not in a consistent manner anyway!
Maybe also because there are several colour spaces in SD.
Are you doing a DVD? Assuming your HD source is according to r.709 (IIRC some Panasonic tape-based HD formats still use R.601) you can simply convert it to r.601, and all DVD players can display it with the correct colours.

703
31st January 2012, 11:17
Yes, I am putting some HD content into xViD format. If played back using MadVR it automatically converts from SMTPE-C to Rec.709 if the output display is set as calibrated to Rec.709 (not a default setting).

However, when the same XViD or say DVD is played by a media player that upcoverts to 1080P, I am just not sure if its going to convert the gamut to Rec.709 to give me the correct colours when the TV/Projector is calibrated to Rec.709 primaries only.

Ghitulescu
31st January 2012, 11:28
It's not very clever to downsample to SD then let a mediaplayer upsample it again at 1080p ... is it the space so tight?

You have to take not only the color space, but the PAR and the DAR into consideration, not to mention the extreme loss in visual definition.