版面规则
提问时请注意:尽量详细描述操作过程、AVS脚本内容等,最好能写出片名,只贴图有时无法看出问题原因。
提示:发布原创内容请尽量使用附件上传。使用网盘会出现过期失效的问题,请注意。
alexz220
帖子: 115
注册时间: 2012-07-21 17:15

Re: 想问一下Chroma Shift

mawen1250 写了:把resizer换成Dither_resize16(kernel="spline16"),Height()换成Height()/2,其余相同。
如果是既有chroma shift又有chroma bleeding呢?请问以下做法正确吗?

# 8bit input
src = last
src16 = src.U16

# parameters
sw = src.Width()
sh = src.Height()
U_Horizontal_Shift = U_Horizontal_Shift
U_Vertical_Shift = U_Vertical_Shift
V_Horizontal_Shift = V_Horizontal_Shift
V_Vertical_Shift = V_Vertical_Shift
depth = depth

# seperate planes
Y = src16
U = src16.UToY()
V = src16.VToY()

# fix chroma shift with 16bit resizer, output 16bit stack YV12
U1 = U.Dither_resize16(U.Width(), U.Height()/2, U_Horizontal_Shift, U_Vertical_Shift, kernel="spline16")
V1 = V.Dither_resize16(V.Width(), V.Height()/2, V_Horizontal_Shift, V_Vertical_Shift, kernel="spline16")
shift_fixed = YToUV(U1, V1, Y)

# fix chroma bleeding with awarpsharp2, output 16bit stack YV24
up = shift_fixed.Dither_resize16(sw*2, sh*2, kernel="bicubic")
bleeding_fixed = up.DitherPost(mode=6).awarpsharp2(type=1, thresh=100, depth=depth).U16
U2 = bleeding_fixed.UToY()
V2 = bleeding_fixed.VToY()
YToUV(U2, V2, Y)
lwjkk666
帖子: 321
注册时间: 2012-05-29 13:43

Re: 想问一下Chroma Shift

U1 = U.Dither_resize16(U.Width(), U.Height()/2, U_Horizontal_Shift, U_Vertical_Shift, kernel="spline16")
V1 = V.Dither_resize16(V.Width(), V.Height()/2, V_Horizontal_Shift, V_Vertical_Shift, kernel="spline16")
这里不是U.width()也要/2吗,
PS:VS版的是直接就是/2的

回到 “AviSynth”