分页: 2 / 2

Re: 想问一下Chroma Shift

发表于 : 2014-09-18 19:52
mawen1250
把resizer换成Dither_resize16(kernel="spline16"),Height()换成Height()/2,其余相同。

Re: 想问一下Chroma Shift

发表于 : 2014-09-19 14:57
alexz220
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)

Re: 想问一下Chroma Shift

发表于 : 2018-03-11 20:54
lwjkk666
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的