Page 1 of 1

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

Posted: Sun Jan 14, 2018 11:34 am
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...?

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

Posted: Sun Jan 14, 2018 3:00 pm
by BradleyS
Not really. BD/DVD are 8-bit and so is HandBrake’s pipeline.

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

Posted: Sun Jan 14, 2018 10:47 pm
by Woodstock
But, but, but! With 12-bit encodes, you can more precisely portray the artifacts! :)

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

Posted: Mon Jan 15, 2018 4:10 pm
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?

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

Posted: Mon Jan 15, 2018 6:36 pm
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.

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

Posted: Mon Jan 15, 2018 7:35 pm
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.

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

Posted: Mon Jan 15, 2018 8:04 pm
by BradleyS
Indeed. In practice, 10-/12-bit files sometimes turn out smaller even with an 8-bit source. So your mileage may vary.

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

Posted: Mon Jan 15, 2018 8:39 pm
by rollin_eng
I guess a good question is “Can a 10/12 bit encode ever be worse/bigger than an 8 bit encode?”

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

Posted: Mon Jan 15, 2018 8:41 pm
by BradleyS
In theory, they should always be smaller given 8-bit input. In practice, I've seen some larger.

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

Posted: Mon Jan 15, 2018 8:43 pm
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.

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

Posted: Mon Jan 15, 2018 10:43 pm
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...

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

Posted: Mon Jan 15, 2018 11:08 pm
by Deleted User 11865
Diminishing returns and encoding performance?

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

Posted: Tue Jan 16, 2018 3:37 am
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.

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

Posted: Tue Jan 16, 2018 8:44 am
by Deleted User 11865
Well, we're discussing 8-bit input here anyway :P

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

Posted: Tue Jan 16, 2018 9:42 am
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.

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

Posted: Tue Jan 16, 2018 10:13 am
by Deleted User 11865
Internal float processing?

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

Posted: Tue Jan 16, 2018 4:31 pm
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.

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

Posted: Tue Jan 16, 2018 4:40 pm
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.

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

Posted: Tue Jan 16, 2018 5:46 pm
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.

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

Posted: Tue Jan 16, 2018 6:03 pm
by BradleyS
That's the plan. Takes time, and I don't know your age, but I think we can manage that. :D

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

Posted: Tue Jan 16, 2018 6:48 pm
by Deleted User 13735
May want you hedge your bets a little, I'm 68.

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

Posted: Tue Jan 16, 2018 7:12 pm
by BradleyS
Little over 30 years on me! Still, none of us knows what tomorrow holds, right? Hope you stay well!

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

Posted: Wed Jan 17, 2018 7:50 pm
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?

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

Posted: Wed Jan 17, 2018 8:00 pm
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