View Full Version : What precision can be extracted from DVD/HDTV?
trbarry
19th June 2003, 00:04
Our current decoders like MPEG2DEC3 & DVD2AVI & anything else I know of all decode MPEG-2 to 4:2:0 format at only 8 bits / component. But a couple times I've been told that MPEG-2 is actually storing 10 bit data per component.
Does anyone know if that's true? And, if so, is it possible to write a decoder that gives better 10 bit (really 15 bit YV12) quality from our DVD rips and HDTV caps?
I don't know what we would do with it anyway since our encoders are only 8 bits but I thought it was an interesting question.
- Tom
fccHandler
19th June 2003, 01:28
Hi, Tom. :)
I've read the spec many times, so...
Originally posted by trbarry
a couple times I've been told that MPEG-2 is actually storing 10 bit data per component.
The statement is false. Someone might be confusing the YCbCr components with the DC component, which is allowed 10 bits of precision max.
is it possible to write a decoder that gives better 10 bit (really 15 bit YV12) quality from our DVD rips and HDTV caps?
No. The functions of the MPEG decoder are very precisely described in the spec (including the description of its output as 8-bit YCbCr). However, the MPEG encoder is not described at all, except to say that it's only job is to produce output that is compliant with the rest of the spec.
This was wise of the MPEG folks, because it leaves the details of the encoding process entirely up to the programmers. Thus, the encoder can always (and will always) be able to be improved, while the decoding process is fairly set in stone.
trbarry
19th June 2003, 02:56
fccHandler -
Okay, thanks. Just curious.
There's a poll about new Avisynth features going on and I was wondering if there was anything useful I could do with a bigger color space if I started from MPEG-2. But I guess it's just to avoid round off errors for me.
- Tom
fccHandler
19th June 2003, 03:21
Actually, I imagine there's a lot you could do with a bigger color space to improve YUV to RGB conversion, plus I've heard that some new video cards are able to process 10 bits per component. But from lurking here so long it sounds like most people want to keep everything YV12, so there probably isn't much point to pursue the idea...
BTW, that Avisynth thread is deep. I thought I knew a lot about video until I started reading that. Keep up the good work. :D
Blight
19th June 2003, 06:41
Using a bigger colorspace is good for video processing as multiple processing filters may cause a multiplication of rounding cut-offs (leading to the "Banding" Effect).
Idealy you would want to maintain all processing in float space. And this is the reason why Direct3D v9 introduced the Floating Point color space.
mpucoder
19th June 2003, 14:49
Here comes someone to spoil the speculation. The 10-bit values are the macroblock coefficients, not the component values. i.e. the result of the DCT is computed to 10 bits of accuracy. The component values as input to the transform, or as computed by the inverse transform, can be any precision. But 8-bit is the specified sample size of all 4 digital video standards acceptable for DVD (SMPTE 170M, ITU-R BT.470 B, ITU-R BT.470 G, and ITU-R BT.470 M).
Using greater precision in a filter chain makes a great deal of sense. But care should be taken to use correct values at the IDCT result. Since 8-bit values were the source, and the object is to recreate the source, higher precision values should be forced into representations of the source values. In other words, any bits beyond the most significant 8 were not present in the source, and are the result of the transform itself.
trbarry
19th June 2003, 17:29
But care should be taken to use correct values at the IDCT result.
mpucoder -
Thanks for the explanation. You certainly did not spoil anything.
I'm pretty sure decoders like DVD2AVI & MPEG2DECx are already decoding to an 8 bit 4:2:0 internal planar format, and then upconverting from there for, say, RGB.
And I don't think that entails pitching away any low order bits, so hopefully all that's not a problem if they are doing their job right.
- Tom
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.