[FFmpeg-user] maintaining full swing when encoding in 10 bit (want to preserve all values from 0-1023)
Marwan Daar
marwan.daar at gmail.com
Wed Nov 11 20:25:05 CET 2015
On 11/11/2015 1:34 PM, Andy Furniss wrote:
>
> 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.
Yes, externally. I have a few colorimeters and a spectro that are able
to measure the amount of light from an emissive surface. I have a few
GDM class CRTs (sony GDM FW900) and a borrowed cheap LCD panel that I'm
experimenting with. My GPU has a 10 bit DAC, so it's quite possible that
I'm able to achieve true 10 bit output using the analogue out of the GPU
when using the CRT. On the other hand, the LCD panel is likely 6+2 bits,
so any image that appears to be rendered in 10 bits, would have to do so
via dithering. By modifying the video lookup table to simulate a 1 bit
display, I can potentially probe how the dithering is actually done.
>
> 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.
Yes, it's embarrassing how difficult it is to achieve a full 10 bit
workflow, and how limited such usage is when achievable. Psychtoolbox
rocks btw :)
>
> 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
> 1-yuv444p10le-full.mp4
>
> ffmpeg -i 1-yuv444p10le-full.mp4 -vf
> scale=in_range=full:out_range=full out.png
Interesting. I just repeated your experiment and had same results.
Out.png has values that are 1 higher than the original 1.png.
So the mp4 is preserving the right information (thanks for the code btw,
very helpful), which means, as you suspected, the problem probably lies
in the way madVR is handling the two different formats (png vs .264).
I'll do some more digging.
More information about the ffmpeg-user
mailing list