Thread: Avisynth+
View Single Post
Old 5th February 2017, 19:17   #2990  |  Link
edcrfv94
Registered User
 
Join Date: Apr 2015
Posts: 84
I update r2420 from r1858, have a problem with MP_Pipeline.
Very high CPU usage and very slow.

r2420 1.6 fps 40-50% CPU usage
r1858 26 fps 16-20% CPU usage

Quote:
MP_Pipeline("""

SetMemoryMax(500)

input = "K:\test.m2ts"
LWLibavVideoSource(input, threads=1)

src = last

### export clip:src
### prefetch: 92,88
### ###

SetMemoryMax(2000)

src
kf_awarpFCB_test(depth=8, thresh=96, blur=3, lsb_in=true, lsb_out=true, YV12_out=false, cplace="MPEG2")
dither_out()

function kf_awarpFCB_test(clip src, int "depth", int "thresh", int "blur", bool "lsb_in", bool "lsb_out", bool "isYV24", bool "YV12_out", string "cplace")
{

depth = Default(depth, 6)
thresh = Default(thresh, 96)
blur = Default(blur, 3)

lsb_in = Default(lsb_in, false)
lsb_out = Default(lsb_out, true)
isYV24 = Default(isYV24, false)
YV12_out = Default(YV12_out, false)

w = width(src)
h = (lsb_in == false) ? height(src) : height(src)/2

src16 = (lsb_in == false) ? src.Dither_convert_8_to_16() : src

Y416 = src16.Dither_resize16(w, h, csp="YV24", kernel="bicubic", a1=0.6, a2=0.4, cplace=cplace)
YV24 = (isYV24 == false) ? Y416.DitherPost(mode=7) : (lsb_in == false) ? src : src.DitherPost(mode=7)
emask = YV24.ConvertToY8().aSobel(thresh, 1).aBlur(blur, 1, 1)
uv_fcb = YToUV(YV24.UToY8().awarp(emask, depth, 1), YV24.VToY8().awarp(emask, depth, 1), YV24)
Dither_limit_dif16(Y416, uv_fcb.Dither_convert_8_to_16(), thr=1.0, elast=2, y=2, u=3, v=3)

YV12_out ? last.Dither_resize16(w, h, csp="YV12", kernel="bicubic", a1=0, a2=0.5) : last

lsb_out ? last : last.DitherPost(mode=7)

return last
}

""")

Last edited by edcrfv94; 5th February 2017 at 20:55.
edcrfv94 is offline