Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MP_Pipeline("""
- ### platform: win32
- SetMemoryMax(300)
- src = "D:\mawen1250\[BDMV][HUNTER × HUNTER][ハンターハンター Vol.4][KUNO-DIY]\BDMV\STREAM\00006.m2ts"
- FFIndex(src, demuxer="lavf")
- FFVideoSource(src, seekmode=-1, threads=1)
- #DSS2(src)
- emask = last.tcanny(sigma=1.0, mode=1, plane=1)
- ### inherit start ###
- OP1=816
- OP2=2734
- ED1=31650
- ED2=33568
- downscale=false
- ### inherit end ###
- ### export clip: emask
- ### prefetch: 32, 4
- ### lock threads to cores
- ### ###
- ### platform: win32
- SetMemoryMax(1000)
- src = last
- sw = src.width()
- sh = src.height()
- up = src.SoftCubicResize(sw*2, sh*2, soft=50)
- sm1 = up.awarpsharp2(chroma=6, thresh=100, type=1, depth=16).Spline36Resize(sw, sh)
- sm2 = up.awarpsharp2(chroma=6, thresh=100, type=1, depth= 6).Spline36Resize(sw, sh)
- sm3 = MergeChroma(src, sm1.Trim(0,OP1+134)+sm2.Trim(OP1+135,OP1+440)+sm1.Trim(OP1+441,OP1+572)+sm2.Trim(OP1+573,OP2-1)+sm1.Trim(OP2,0), 1.0)
- sclp = sm3.CSmod(chroma=false, Smode=3, Smethod=3, strength=100, preblur=1, usepasf=false, Sovershoot=2, Tlimit=false, ss_w=1.50, ss_h=1.50, ssrep=true, filter_ss="Dehalo_Alpha_mt(darkstr=0.2, brightstr=1.0, rx=2.0, ry=2.0, highsens=100, lowsens=30)")
- ### export clip: sclp, emask
- ### prefetch: 16, 0
- ### ###
- SetMemoryMax(1200)
- src = last
- sw = src.width()
- sh = src.height()
- dw = 1280
- dh = 720
- deband1 = sclp.GradFun3( smode=2, thr=0.25, elast=2.5, ampn=0, radius=16, ampo=0.8, dthr=0.011, lsb=true, lsb_in=false, mask=0 )
- deband2 = sclp.GradFun3( smode=2, thr=0.35, elast=2.5, ampn=0, radius=16, ampo=0.8, dthr=0.011, lsb=true, lsb_in=false, mask=0 ).f3kdb(range=24, Y=48, Cb=33, Cr=33, grainY=0, grainC=0, dither_algo=3, dynamic_grain=true, keep_tv_range=false, input_mode=1, output_mode=1, output_depth=16)
- deband3 = StackVertical(sclp.Crop(0, 0, 0, -sh/2).f3kdb(range=24, Y=120, Cb=64, Cr=64, grainY=0, grainC=0, dither_algo=3, dynamic_grain=true, keep_tv_range=false, input_mode=0, output_mode=1, output_depth=16), sclp.Crop(0, sh/2, 0, 0).f3kdb(range=24, Y=40, Cb=48, Cr=48, grainY=0, grainC=0, dither_algo=3, dynamic_grain=true, keep_tv_range=false, input_mode=0, output_mode=1, output_depth=16)")
- deband = deband1.Trim(0,OP1+134)+deband2.Trim(OP1+135,OP1+235)+deband1.Trim(OP1+236,ED1+240)+deband2.Trim(ED1+241,ED1+492)+deband3.Trim(ED1+493,ED1+604)+deband1.Trim(ED1+605,0)
- addgrain= deband#.GrainFL(lsb_in=true, lsb=true, th1=16, th2=24, th3=64, th4=96, g1str=0, g2str=4, g3str=0, g1shrp=60, g2shrp=66, g3shrp=80, g1size=1.25, g2size=1.25, g3size=1.25, g1soft=3,g2soft=3,g3soft=3)
- mask1 = emask.mt_lut("x 2 <= x x 5 << ?", U=1, V=1)
- mask2 = emask.mt_lut("x 3 <= x x 1 - 5 << ?", U=1, V=1)
- mask3 = emask.mt_lut("x 6 <= x x 4 - 5 << ?", U=1, V=1)
- dbmask = mask1.Trim(0,OP1+134)+mask2.Trim(OP1+135,OP1+235)+mask1.Trim(OP1+236,ED1+240)+mask2.Trim(ED1+241,ED1+492)+mask3.Trim(ED1+493,ED1+604)+mask1.Trim(ED1+605,0)
- db = Dither_merge16_8( addgrain, sclp.U16(), dbmask, luma=true)
- final = downscale ? db.Dither_y_gamma_to_linear(curve="709").Dither_resize16(dw, dh, kernel="Spline36").Dither_y_linear_to_gamma(curve="709") : db
- final.Down10(tvRange=true, stack=false)
- """)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement