TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 2017-1-12 20:16 |
---|
签到天数: 1 天 [LV.1]初来乍到
至尊会员
![Rank: 16](static/image/common/star_level3.gif) ![Rank: 16](static/image/common/star_level3.gif) ![Rank: 16](static/image/common/star_level3.gif) ![Rank: 16](static/image/common/star_level3.gif)
- 积分
- 210663
|
这个是HDR转SDR的VapourSynth脚本,但我并不熟悉VapourSynth,能转换成AviSynth脚本吗- import vapoursynth as vs
- core = vs.get_core()
- c = core.ffms2.Source(source = 'path/to/file')
- source_peak=1200 #set manually
- c=core.resize.Bilinear(clip=c, format=vs.YUV444PS, range_in_s="limited", range_s="full",chromaloc_in_s="center",dither_type="none")
- c=core.resize.Bilinear(clip=c, format=vs.RGBS, matrix_in_s="2020ncl", range_in_s="full",dither_type="none")
- c=core.resize.Bilinear(clip=c, format=vs.RGBS, transfer_in_s="st2084", transfer_s="linear",dither_type="none", nominal_luminance=source_peak)
- exposure_bias=source_peak/100
- #hable/uncharted tone mapping
- tm = core.std.Expr(c, expr="x {exposure_bias} * 0.15 x {exposure_bias} * * 0.05 + * 0.004 + x {exposure_bias} * 0.15 x {exposure_bias} * * 0.50 + * 0.06 + / 0.02 0.30 / - ".format(exposure_bias=exposure_bias),format=vs.RGBS)#12=1200 nits / 100 nits
- w = core.std.Expr(c, expr="{exposure_bias} 0.15 {exposure_bias} * 0.05 + * 0.004 + {exposure_bias} 0.15 {exposure_bias} * 0.50 + * 0.06 + / 0.02 0.30 / - ".format(exposure_bias=exposure_bias),format=vs.RGBS)#
- c = core.std.Expr(clips=[tm,w], expr=" x 1 y / * ",format=vs.RGBS)
- #c=core.fmtc.primaries(clip=c, prims="2020", primd="709")
- c=core.resize.Bilinear(clip=c, format=vs.RGBS, primaries_in_s="2020", primaries_s="709",dither_type="none")
- c=core.resize.Bilinear(clip=c, format=vs.RGBS, transfer_in_s="linear", transfer_s="709",dither_type="none")
- c=core.resize.Bilinear(clip=c, format=vs.YUV420P8, matrix_s="709", range_in_s="full",range_s="limited",chromaloc_in_s="center")
- c.set_output()
复制代码
|
|