Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th August 2018, 19:54   #1  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
x265: --output-depth Needs to be set?

I wonder, do I need to set:
--output-depth 10

if I set:
--profile main10
? Or does main10 set it automatically?

UPDATE: Thanks FranceBB.

Last edited by Forteen88; 31st August 2018 at 18:05.
Forteen88 is offline   Reply With Quote
Old 6th August 2018, 00:49   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
There's no need to specify --output-depth 10, Main10 encodes everything in 10bit automatically.
For instance, if you feed x265 with an 8bit stream, it will dither it up to 10bit and encode as 10bit.
FranceBB is offline   Reply With Quote
Old 6th August 2018, 15:23   #3  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
Does it make sense to use --dither if the input clip is 16bit and output 10bit?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 7th August 2018, 04:58   #4  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
Quote:
Originally Posted by Boulder View Post
Does it make sense to use --dither if the input clip is 16bit and output 10bit?
It does.
x265 will accept input pixels of any depth between 8 and 16 bits regardless of the depth of its internal pixels (8, 10 or 12) and it will shift and mask input pixels as required to reach the internal depth.
There have been many people arguing that it's better to let x265 dither the input and other that kept saying that it was better to frameserve the desired output bit-depth.
I think that if you filter out issues in 16bit, it's actually better to frameserve 16bit to x265 'cause this way it's internally aware of the "original" 16bit and it will dither it down in a way that it makes easier to compress while preventing banding.
If you dither it yourself using a frameserver (let's say 8bit source, 16bit filtering, dithered down 10bit output), x265 will think that it's a "normal" 10bit input and it will deal with it as it is and - according to the way you dithered it down - it might require more bitrate.
This is most noticeable with 8bit, but mathematically it's true for 10bit and 12bit as well.
In other words, instead of fine-tuning your dithering method trying to check the differences between different dithering methods available (ordered dithering, Serpentine Floyd-Steinberg error diffusion, Stucki error diffusion, Atkinson error diffusion etc), just let x265 handle the dithering for you: it will do it in the best possible way.

Last edited by FranceBB; 7th August 2018 at 05:05.
FranceBB is offline   Reply With Quote
Old 7th August 2018, 16:43   #5  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by FranceBB View Post
There have been many people arguing that it's better to let x265 dither the input and other that kept saying that it was better to frameserve the desired output bit-depth.
I think that if you filter out issues in 16bit, it's actually better to frameserve 16bit to x265 'cause this way it's internally aware of the "original" 16bit and it will dither it down in a way that it makes easier to compress while preventing banding.
x265's --dither mode isn't that advanced. It would be cool to have dithering driven by RDO, ala trellis quantization. But that's not in any encoding tool I know of.

If x265 is going down to a lower bit depth, using --dither will improve quality vs. the default dithering/truncation mode. But --dither isn't magic; a well-tuned external ditherer could well outperform it. But for when that isn't available, having --dither available is welcome.

FWIW, in some recent experiments I found that ffmpeg's x_dither does a better job of reducing banding in 10-bit to 8-bit conversions than x265's --dither.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.