Ripping BR/DVD as HEVC 10/12-bit?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
oRBIT2002
Experienced
Posts: 90
Joined: Sun Nov 01, 2009 11:22 am

Ripping BR/DVD as HEVC 10/12-bit?

Post by oRBIT2002 »

Is there a reason to encode BR/DVD-rips as 10/12-bits HEVC? I don't think there is but still I am not sure if there's a quality-gain of some sort...?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

Not really. BD/DVD are 8-bit and so is HandBrake’s pipeline.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Woodstock »

But, but, but! With 12-bit encodes, you can more precisely portray the artifacts! :)
Jonny G
Posts: 1
Joined: Mon Jan 15, 2018 4:06 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Jonny G »

What if I’m re-encoding a 4K 10 bit video file? If I select the h265 10 bit encoder (from the nightly build), will the resulting file retain the information from the original, or does the fact that HB’s pipeline is 8 bit make it pointless?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

Down the road it won't be pointless, but no ETA on that. Currently, anything HandBrake opens is converted to 8-bit at some point.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by JohnAStebbins »

Keep in mind that what is being stored in 10/12 bits is not the original spatial domain pixel values, but rather the temporal domain coefficients. When converting from spatial to temporal, there are rounding errors where information is lost. Also, coefficients are deliberately quantized (more information loss). By storing 10/12 bit coefficients, there is less loss and the reconstruction tends to have less banding artefacts. Also, due to less loss, the reconstruction is more accurate which, under some circumstances, allows for greater compression at the same bitrate.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

Indeed. In practice, 10-/12-bit files sometimes turn out smaller even with an 8-bit source. So your mileage may vary.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by rollin_eng »

I guess a good question is “Can a 10/12 bit encode ever be worse/bigger than an 8 bit encode?”
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

In theory, they should always be smaller given 8-bit input. In practice, I've seen some larger.
Deleted User 11865

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 11865 »

All other settings being the same, my guess would be no, speaking in terms of compression efficiency (additional detail could be retained, pushing the output size up a bit). Not sure what the encoding performance hit of higher bit depths is nowadays though.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by mduell »

JohnAStebbins wrote: Mon Jan 15, 2018 7:35 pmAlso, due to less loss, the reconstruction is more accurate which, under some circumstances, allows for greater compression at the same bitrate.
So why aren't they doing 16-bit or more...
Deleted User 11865

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 11865 »

Diminishing returns and encoding performance?
Deleted User 13735

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 13735 »

In any >8 bit -> 8 bit downconversion, whether at the beginning (from source) or end of the pipeline (to encoder), a transformation called dithering always takes place. This smooths repetitive pixel jaggies from downsampling to a more randomized pattern that is less obvious to the eye. It's been around as long as photographs began to be reproduced for newspapers in the 1800s and is present in every video encoding chain in one form or another.

This pixel randomization (noise) far exceeds the ability of any high bit source or float point processing to overcome the damage that has been, or will be done to the definition as a result of downconversion anywhere in the chain. For that reason, unless there is >=10 bit integrity from door to door, all other considerations would seem to be moot, or imaginative.

Even if dithering did not occur, losses from downsampling and pixel decimation are irreversible.

Some encoders do a better job of dithering than others, and Handbrake is one of them. So if I have to downconvert, I give Handbrake 10 bit source, because the output has less banding and dithering "wash" than my expensive NLE. If you are giving Handbrake a YUV digital intermediate, I always suggest 10 bit.

This impression is the result of tests I ran five years ago. If anyone has controlled, quantifiable results that challenge this impression, I welcome them.
Deleted User 11865

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 11865 »

Well, we're discussing 8-bit input here anyway :P
Deleted User 13735

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 13735 »

... which makes internal float processing or 10 bit encoding a nothing burger in this case, as people like to say. Lots of discussion on the internet, but quantified evidence is pretty slim.
Deleted User 11865

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 11865 »

Internal float processing?
Deleted User 13735

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 13735 »

32-bit float internal processing is sometimes used in editing with 10/12 bit source for filtering and grading precision, even if the encode is to be 8-bit. The logic is to put the downsampling and dithering last.

That said, I think that most requests for this stuff are made for the wrong reasons. I personally would use it with 10 bit yuv intermediates from my editor. However, if someone asked "who among us" is enthusiastic about rewriting the encoding engine and filters in Handbrake from the ground up, the room would surely go silent. That's not a criticism, it just an astronomical undertaking to consider.

8-bit integer math is right for processing and rendering 8-bit source. I'm a big critic of alchemic thinking on the internet, which would sometimes have us believe otherwise. End of political speech, I'm going back in my hole until Groundhog Day.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

Indeed, it's a bit heavy to rewrite HandBrake's pipeline to support 10-/12-bit YUV, not to mention other color formats. John's made some progress in private, if I recall correctly.
Deleted User 13735

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 13735 »

I think getting x265 REC 2020 out the door uncompromised from 10 bit source would be a righteous goal, at least during my lifetime.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

That's the plan. Takes time, and I don't know your age, but I think we can manage that. :D
Deleted User 13735

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Deleted User 13735 »

May want you hedge your bets a little, I'm 68.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS »

Little over 30 years on me! Still, none of us knows what tomorrow holds, right? Hope you stay well!
oRBIT2002
Experienced
Posts: 90
Joined: Sun Nov 01, 2009 11:22 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by oRBIT2002 »

Perhaps a stupid question but if Handbrake only supports 8-bit, there's still 10/12-bit options available for HEVC-encoding. What's the point of that?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by JohnAStebbins »

oRBIT2002 wrote: Wed Jan 17, 2018 7:50 pm Perhaps a stupid question but if Handbrake only supports 8-bit, there's still 10/12-bit options available for HEVC-encoding. What's the point of that?
viewtopic.php?f=6&t=37297&p=176079#p176037
Post Reply