PDA

View Full Version : 1000th Time: DVD's are 601 or not?


mverta
31st March 2007, 02:13
Are all commercial DVD's content 601- compliant? That is, are the MPEG-2 streams 16-235, or not?

I've had this argument with so many people I have no idea who's right anymore. I'm asking this for both original content one wants to produce, or other content.. is, ultimately, the MPEG-2 file 16-235 or is it 0-255? If DVD's are 601-compliant, then it would have to be 16-235, no exceptions.

_Mike

cacepi
31st March 2007, 04:43
Are all commercial DVD's content 601- compliant? That is, are the MPEG-2 streams 16-235, or not?
Yes and no. It all depends on what you mean by "601 compliant": colorspace, coefficients, or format.

DVD video is Y'CbCr, which, as defined by 601, is 16-235 for Y' and 16-240 for CbCr. Any source you encode to DVD expects these values. So in terms of colorspace, yes; DVD is "601 compliant."

However, the color coefficients for deriving Y'CbCr can be either BT. 601 or BT. 709. In fact, if no coefficients are specified in the stream, then the spec says that BT. 709 coefficients should be used. So no, DVD is not 601 compliant.

601 can also refer to the D1 video format; uncompressed with Y'CbCr 4:2:2 color. Since DVD is obviously compressed, it isn't 601 compliant.

As far as 16-235 goes? Yes. Everything else? No.

mverta
31st March 2007, 04:52
Thank you; it was a black-level (luminance) question... luminance, then, should always be 16-235 for all SD NTSC DVD content.


_Mike

cacepi
31st March 2007, 05:34
luminance, then, should always be 16-235 for all SD NTSC DVD content.
Well, no, actually.

The 16-235 is a function of the colorspace, and that only comes into play if you're converting to/from RGB. It's a representation of what the compressed video will look like played back uncompensated in RGB.

In other words, 16-235 is what you get out, but not what you put in. Understand?

Don't precompensate RGB for conversion to YUV/Y'CbCr or you will seriously b0rk your video's color all to hell. Let the encoding process do it for you (i.e. place ConvertToYV12() at the end in AviSynth).

mverta
31st March 2007, 06:00
Let me double-check, because I'm creating content for DVD...

I'm working in RGB colorspace, in AfterEffects, and while I work on the assets, I'm working in 0-255. When I'm done and ready to encode, I render out a file, and my question is whether to remap the luminance to 16-235 or not for that render..

If I do, then that 16-235 RGB file goes into, say, ProCoder, where it is encoded to MPEG-2 for use on a DVD. Or, I can leave the render output at 0-255 and use a convert to 601 filter in Procoder to limit the luminance range there... (really, it's the same thing... no?). But either way, the MPEG-2 file I end up should be 16-235 luminance, right? So whether I do the reduction in After Effects or in ProCoder, I still have to do it. Correct?

_Mike

cacepi
31st March 2007, 06:15
If I do, then that 16-235 RGB file goes into, say, ProCoder, where it is encoded to MPEG-2 for use on a DVD. Or, I can leave the render output at 0-255 and use a convert to 601 filter in Procoder to limit the luminance range there... (really, it's the same thing... no?)
No, because an RGB file still has to be converted to 601 for encoding, and the conversion from RGB to 601 assumes full 8 bit values (0-255). If you convert a 16-235 RGB file to 601 you'll get something like 30-218 on the other end, and you don't want that.

mpucoder
31st March 2007, 06:15
in the RGB colorspace the full range (0-255) is used. The encoder will convert it to the proper YCbCr values

mverta
31st March 2007, 06:33
ProCoder has a filter (601 Correction - Shrink Colorspace) but it's not on by default... if it's automatically going to change the levels, why have an optional filter?

I also notice that if I straight encode a 0-255 file in ProCoder, the resultant MPEG-2 file also measures 0-255.

_Mike

mpucoder
31st March 2007, 14:47
I also notice that if I straight encode a 0-255 file in ProCoder, the resultant MPEG-2 file also measures 0-255.

_Mike
In which colorspace?

mverta
31st March 2007, 15:24
...We use Decklink HD Extreme cards to preview realtime video output on our professionally calibrated displays. The cards perform RGB>YUV conversion on the fly, so we can see what we're doing in After Effects as it's happening.

Anything below 16,16,16 RGB, while visible on the computer monitor, disappears on the professional monitors displaying the YUV conversion of the image. This is because the displays are calibrated using 601 test patterns, which fix black at 16, and that becomes the darkest setting for the monitor. So a block of 0 squares next to a block of 16 squares both look the same - in fact, you can't see them.

If we send those blocks of 0 and 16 squares to Procoder, straight, and then burn a dvd, the output will look exactly like the realtime display - we see nothing. Procoder does NOT automatically bring the 0's up to 16. If it did, then the 16's would get pulled up to 32, and we'd see 3 squares. The only way to make that happen is to pre-remap the levels to 16-235 either in After Effects, or using ProCoder's 601-colorspace shrink filter. THEN you'll end up with the 0 squares bumping up to 16 (which appears black on the monitor) and the 16 squares bumping up to 32, which are bright enough to see.

So I guess I answered my own question. If we don't remap our 0-255 range before encoding, then simply everything below 16 gets truncated (visually; they're still IN the MPEG-2 file), and our images become too contrasted and dark. Other encoders do this automatically, but ProCoder 2 does not. Remapping our 0-255 luminance range to 16-235 causes the authored dvd's to precisely match our realtime displays.

_Mike

cacepi
31st March 2007, 23:04
Other encoders do this automatically, but ProCoder 2 does not. Remapping our 0-255 luminance range to 16-235 causes the authored dvd's to precisely match our realtime displays.
Huh. Well, that's annoying. So ProCoder doesn't have some type of DVD preset for encoding? You'd think an app that retails for $499 would be smart enough to know when to make the switch...

Compressor spoils you, I guess.

Mug Funky
1st April 2007, 03:29
@ mverta:

try look at the output video on a waveform monitor. if you can't see below 16, how can you tell if procoder is scaling these values or clipping them at 16 and 235? if it clips it will look exactly the same on the broadcast monitor. if it does nothing and keeps the 0-255 range, then a waveform monitor will show this as a downward step, or as no step at all.

there's monitoring programs you can use with a decklink card btw - you get waveform, vectorscope and all that (unfortunately i can't remember the name of it), so if you don't have those things lying around you'll get a pretty good software representation.

mverta
1st April 2007, 03:41
Well one low-rent way of checking is just to load the DVD into the computer and view it using DVD player software, like nVidia for Windows Media Player. The player doesn't expand the colorspace, so it holds values at whatever they are. If you encode a 0-255 signal using Procoder, straight, and play the DVD back on WMP, you can see the 0 values, and the 16 values, etc. (That's assuming your computer monitor is properly calibrated, which ours are.) The values are preserved; they're not being altered, though of course there is a filter for that which you can use at encoding time, or do what I've suggested above, which is do it at the After Effects stage.

_Mike