View Single Post
Old 27th January 2018, 19:40   #46  |  Link
age
Registered User
 
Join Date: Oct 2015
Posts: 54
EOTF and tonemapping are two different things, you could read about the st2084 formula in the official documentation or in the zimg code or elsewhere.
I've founded an interesting pdf about hdr and tonemapping
http://www.eusipco2016.org/documents...R_tutorial.pdf
at page 119 the EOTF formula.
At pages 100-107 some methods for the correction of the saturation.
From the first one I've done a vapoursynth function with only two parameters,(clip and source_peak)it's simple but at my eyes is better then my previous attempt

https://filebin.net/7c6kocrmxxnat1cp


Code:
import vapoursynth as vs
import tmsimple

core = vs.get_core()

c = core.ffms2.Source(source  = 'C:/.../testhdr.mkv')

c=core.resize.Bicubic(clip=c, format=vs.RGBS,filter_param_a=0.0,filter_param_b=0.75, range_in_s="limited", matrix_in_s="2020ncl", primaries_in_s="2020", primaries_s="2020", transfer_in_s="st2084", transfer_s="linear",dither_type="none", nominal_luminance=1000)


c=tmsimple.tm(clip=c,source_peak=1000)

c=core.resize.Bicubic(clip=c, format=vs.YUV420P8, filter_param_a=0.0, filter_param_b=0.75, matrix_s="709", primaries_in_s="2020", primaries_s="709", transfer_in_s="linear", transfer_s="709",dither_type="ordered")


c.set_output()
age is offline   Reply With Quote