View Single Post
Old 24th July 2020, 16:31   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
range_in_s settings on bitdepth conversion ?

What is math or generic explanation for this observation?

Start with YUV420P8 "bars"; Y=0,16,235,255 . Then convert to YUV420P10 , using either range_in_s full or limited

Y values read with vsedit picker, but double checked with planestats (crop to a single color)

Limited
Y=0,64,940,1020

Full
Y=0,64,943,1023




Code:
a = core.std.BlankClip(width=320, height=720, format=vs.YUV420P8, fpsnum=24, fpsden=1, length=24, color=[0, 128, 128])
b = core.std.BlankClip(width=320, height=720, format=vs.YUV420P8, fpsnum=24, fpsden=1, length=24, color=[16, 128, 128])
c = core.std.BlankClip(width=320, height=720, format=vs.YUV420P8, fpsnum=24, fpsden=1, length=24, color=[235, 128, 128])
d = core.std.BlankClip(width=320, height=720, format=vs.YUV420P8, fpsnum=24, fpsden=1, length=24, color=[255, 128, 128])

clip = core.std.StackHorizontal([a,b,c,d])

clip10 = core.resize.Bicubic(clip, format=vs.YUV420P10, range_in_s="limited")
#clip10 = core.resize.Bicubic(clip, format=vs.YUV420P10, range_in_s="full")

clip10.set_output()
poisondeathray is offline   Reply With Quote