[FFmpeg-user] maintaining full swing when encoding in 10 bit (want to preserve all values from 0-1023)

Andy Furniss adf.lists at gmail.com
Wed Nov 11 19:34:21 CET 2015

Marwan Daar wrote:
> On 11/11/2015 11:52 AM, Andy Furniss wrote:
>> Just because you are using 10bit the result of playing will still
>> be 8 bit as that's what most computer screens are.
>> This doesn't mean that 10 bit yuv is pointless as X bit rgb -> 8
>> bit yuv and back looses loads of colours, so 10 bit yuv is better
>> even if your source is only 8 bit rgb.
> Agreed. For my purposes, I'm investigating whether the GPU is
> dithering, and if so, how exactly it's achieving this. Part of the
> process involves taking luminance measurements of different test
> patterns. Being able to encode these patterns into a movie file, so I
> can step through frame by frame, is critical for reducing the amount
> of noise in my measurements.

Ahh sounds complicated. When you say "taking luminance measurements" do
you mean externally - maybe you have some nice panel - I think mine
probably dithers 8 -> 6 bits whatever the GPU does.

On linux if you have some OLED with deep color and a radeon GPU you may
even be able to use it over HDMI - though it's disabled by default with
a module param as it only works with some cards, plus you need something
like Psychtoolbox-3.

I built 10 bit x264/ffmpeg and tested again via mp4 as below and saw the
same result = 1.png and out.png were just 1 different.

ffmpeg -i 1.png -vf scale=in_range=full:out_range=full -vcodec libx264 

ffmpeg -i 1-yuv444p10le-full.mp4 -vf scale=in_range=full:out_range=full 

More information about the ffmpeg-user mailing list