Log in

View Full Version : 8Bit Depth vs 10Bit Depth Explanation for Noobs


Turtleface
9th January 2011, 18:06
Ok, i'm new here, i made an account about 4 months ago, but never posted or visited because of that stupid 7 day wait before you can post. But now i'm stuck on this problem.

8Bit Depth vs 10Bit Depth? Advantages? Disadvantages?

I Rip PAL DVDs, would i get any extra quality with a lower bitrate with 10bit depth?

Any help would be much appreciated.

LoRd_MuldeR
9th January 2011, 18:16
I assume you are referring to x264, right?

Yes, you can get better compression efficiency (i.e. better quality at same bitrate) with 10-Bit, even when your source is "only" 8-Bit and the final output is 8-Bit too, simply because the encoder's and decoder's internal precision is higher (-> less rounding errors). On the other hand support for 10-Bit or even 12-Bit H.264 doesn't exist in any (consumer) playback device at the moment. Even software decoders are still very rare currently. So this is something you probably don't want to use yet. Also high-bitdepth H.264 will be significant slower to encode/decode. It was said that 8-Bit basically is a trade-off for speed.

See also:
http://forum.doom9.org/showthread.php?t=155510

Blue_MiSfit
10th January 2011, 04:51
Hi Turtleface, welcome to doom9!

Yes.

At this point, the main limiting factor in using 10 bit h.264 is the lack of a free software decoder. Mainconcept sells a payware decoder, but it's $230 last I checked. http://www.mainconcept.com/products/apps-plug-ins/decoding/decoder-packs/h264avc-broadcast.html

x264 can certainly encode 10 bit video now, even as Lord_Mulder describes, even from an 8 bit source (and there are benefits in doing so). Even though much assembly optimization has been done for 10 bit encoding, I'd assume the code isn't quite as tight as the 8 bit path, so there will likely be a noticeable speed cost.

Still, nothing wrong with doing some experimenting. Just don't expect 10 bit encodes to actually play anywhere :devil:

Derek

ajrobb
13th January 2011, 14:46
DVDs are encoded as 11-bit DCT coefficients but I am dubious about the IDCT truncating back to 8 bits for playback.

aegisofrime
13th January 2011, 17:15
I tried 10-bit encoding once. Speed wasn't as bad as I first thought it would be, however since there wasn't a decoder it was a really pointless exercise :/

Episodio1
13th January 2011, 19:05
Why only 8bit/10bit if a CPU register is 16/32/64 bits?

Where can I see this process explained to understand a bit more?

Thanks.

Dark Shikari
13th January 2011, 19:10
Why only 8bit/10bit if a CPU register is 16/32/64 bits?

Where can I see this process explained to understand a bit more?

Thanks.It is better if intermediate data values can fit in 16 bits where possible. At 11 bit, motion compensation can no longer be done in 16-bit.

Mug Funky
14th January 2011, 04:47
@ajrobb: really? i thought DC precision was a maximum of 10-bit for DVD (and MPEG-2 goes up to 11 IIRC).

but this has no bearing on the encoding precision with respect to the output which always decodes to 8-bit

mpucoder
14th January 2011, 05:45
DC coefficients can be 8, 9, 10, or 11 bits unsigned. AC coefficients are always 12 bits signed. I am not aware of any restriction for DVD. However, these are the encoded values, not the precision of the data they represent, which is 9 bits in MPEG-2 (not a typo, see 13818-2 Annex A).

Turtleface
14th January 2011, 23:28
Thanks for the replies, mediacoder now supports 10 bit depth x264 encoding for those who want to know

LoRd_MuldeR
14th January 2011, 23:52
Thanks for the replies, mediacoder now supports 10 bit depth x264 encoding for those who want to know

Probably because it uses x264 to do so :p

shae
9th June 2015, 19:39
Actually, what does "bitdepth" mean in the context of DCT, isn't it practically an arbitrary resolution function? And how does it relate to the input/output bitdepth?

foxyshadis
9th June 2015, 22:45
It's arbitrary, but well defined in AVC and HEVC specs. They specify the precision of the DCT output as being equal to the sample bit depth, creating scaled integer transforms with rounding and intermediate precision specified at every step, so that there's only one possible output for every input.

It's certainly possible to have, say, 16-bit DCT coefficients for all input/ouput depths, but the specs don't go that route to conserve limited hardware resources.

pandy
12th June 2015, 12:05
DC coefficients can be 8, 9, 10, or 11 bits unsigned. AC coefficients are always 12 bits signed. I am not aware of any restriction for DVD. However, these are the encoded values, not the precision of the data they represent, which is 9 bits in MPEG-2 (not a typo, see 13818-2 Annex A).

AFAIR 8,9 and 10 bit DCT precision is allowed by DVD, side to this up to 10 bit data (usually in format 8.2) can be feed to encoder - usually... never saw 11 bit DCT precision in consumer market.

Actually, what does "bitdepth" mean in the context of DCT, isn't it practically an arbitrary resolution function? And how does it related to the input/output bitdepth?

DCT use numeric particular precision for digital representation, video bit depth is quantization resolution (link is simple - more precise numeric DCT representation lead to lower rounding errors).

StainlessS
13th June 2015, 06:06
HCEnc
https://s20.postimg.org/bjzdi3r7h/HCEnc_zpsk11pw1fa.jpg (https://postimg.org/image/sx9nwymih/)

pandy
15th June 2015, 10:38
HCEnc
http://i1136.photobucket.com/albums/n494/StainlessStephen/HCEnc_zpsk11pw1fa.jpg

Not in consumer (DVD etc) profiles... - im fully aware that HCEnc offer 11 bits for DCT.

StainlessS
15th June 2015, 13:19
AFAIR 8,9 and 10 bit DCT precision is allowed by DVD
OK Sorry Pandy, twas above I was questioning.

shae
11th July 2015, 12:29
How does a change in DCT resolution affect the final pixels? For example, will a 10-bit YUV input encoded with 8-bit DCT precision yield roughly the same as if the input YUV was truncated to 8-bit, or is the relation non-linear?

They specify the precision of the DCT output as being equal to the sample bit depth
Sample bit-depth, as in, the source RGB/YUV?

pandy
13th July 2015, 09:34
How does a change in DCT resolution affect the final pixels? For example, will a 10-bit YUV input encoded with 8-bit DCT precision yield roughly the same as if the input YUV was truncated to 8-bit, or is the relation non-linear?


Sample bit-depth, as in, the source RGB/YUV?

There is no strict dependency except well agreed that DCT should be calculated (DCT precision) with at least 3 - 4 more bits.
Remember that DCT is different domain (frequency) and DCT describe different aspect of signal (imagine DCT as special case of FFT where whole spectrum is divided for equally spaced parts (bins) and you measuring level of frequency content in middle of the bin).

shae
13th July 2015, 10:45
If the DCT is 11-12 bit, where are these 8 and 10 bit the thread is about?

Is there some software that can be used to quickly switch and compare different DCT resolutions on still images?

Sulik
13th July 2015, 18:50
That parameter is "DC precision", *not* DCT precision (the MPEG-2 DCT is the same implementation regardless of this parameter, and is always 12-bit).
This MPEG-2 setting corresponds to the DC coefficient (dct coefficient 0,0) -> it means more bits are allocated to it, which helps bias the rounding (may help in flat areas), but everything ends up quantized to 8-bit in the end, so the impact is usually quite limited (can in fact be negative).

pandy
14th July 2015, 08:47
If the DCT is 11-12 bit, where are these 8 and 10 bit the thread is about?

Input and output - i.e. video samples (they can be or 8 bit or 10 bit or any bit you like)

Is there some software that can be used to quickly switch and compare different DCT resolutions on still images?

Not sure...

That parameter is "DC precision", *not* DCT precision (the MPEG-2 DCT is the same implementation regardless of this parameter, and is always 12-bit).
This MPEG-2 setting corresponds to the DC coefficient (dct coefficient 0,0) -> it means more bits are allocated to it, which helps bias the rounding (may help in flat areas), but everything ends up quantized to 8-bit in the end, so the impact is usually quite limited (can in fact be negative).

As i understand question it was about number of bits required by DCT to represent 8 bit video samples and usually this is 3 - 4 bits more. DCT precision can be variable and up to system (implementation) - usually standard request minimum and usually implementations are close to standard and yes, most of MPEG DCT is internally 12 bit coefficients however you may have carefully designed DCT MPEG compliant with 11 bit coefficient or you can go for example for 16 bit precision - it is purely up to you especially if other than MPEG standard is considered.
And yes, DC coefficient (mean energy in block) is presented on those pictures and settings as you described - and not everything is quantized to 8 bit - depends on encoder\decoder - broadcast mostly using 8.2 format (i.e. 10 bit).

shae
21st July 2015, 15:10
Now I'm not sure what we're talking about anymore. :)

foxyshadis said the standard requires the DCT output precision to match the bit depth of the input YUV.