Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MP_Pipeline("""
- ### platform: win32
- SetMemoryMax(300)
- src="D:\Steins Gate\01.mkv"
- cf = src + ".ffindex"
- #FFIndex(src, cachefile=cf, demuxer="lavf")
- #FFVideoSource(src, cachefile=cf, seekmode=-1, threads=1)
- DSS2(src)
- mask=last.tcanny(sigma=1.0, mode=1, plane=1)
- mask2=mask.mt_lut("x 2 > x 2 - 6 << 0 ?",Y=3,U=1,V=1)#.mt_expand.mt_deflate
- lumamask2=last.mt_lut("x 55 > 0 56 x - 2 << ?",Y=3,U=1,V=1).RemoveGrain(19,-1)
- dbmask=mt_logic(mask2,lumamask2,"max")
- ### export clip: dbmask
- ### prefetch: 6,3
- ### lock threads to cores
- ### ###
- SetMemoryMax(1200)
- s_str = 1.2
- s_reverse = s_str + 0.25
- s_divisor = 1.5
- s_indexR = 1.281
- sstring = "x 128 - abs "+String(s_divisor)+" / 1 "+String(s_indexR)+" / ^ "+String(s_str)+" * x 128 - x 128 - abs 0.001 + / * x 128 - 2 ^ x 128 - 2 ^ "+String(s_reverse)+" + / * 128 +"
- aaed=last
- aaed16=aaed.U16
- pre_nr = aaed.RemoveGrain(11).RemoveGrain(4)
- dif_nr = aaed.mt_makediff(pre_nr, Y=3, U=3, V=3)
- nr=pre_nr.U16.Dither_resize16(aaed16.width, aaed16.height/2, kernel="Gauss", a1=1, fh=-1, fv=-1)
- noise=makediff16(aaed16, nr, Y=3, U=3, V=3)
- db1=nr.GradFun3( smode=2, thr=0.35, elast=2.5, ampn=0, radius=20, ampo=0.8, dthr=0.011, lsb=true, lsb_in=true, mask=0 )
- db2=db1.f3kdb(range=12, Y=52, Cb=42, Cr=42, grainY=0, grainC=0, dither_algo=3, dynamic_grain=true, keep_tv_range=false, input_mode=1, output_mode=1, output_depth=16)
- db=Dither_add16(db2, noise, Y=3, U=3, V=3, dif=true)
- db8 = db.DitherPost(mode=0)
- sharp8 = dif_nr.mt_lut(sstring)
- dif_db = mt_makediff(pre_nr, db8).mt_lut(sstring)
- shfx8 = sharp8.Repair(dif_db, 1, -1)
- shfx8 = mt_lutxy(sharp8, shfx8, "x 128 - abs y 128 - abs < x y ?")
- shfx16 = shfx8.U16
- sharp16 = sharp8.U16.Dither_limit_dif16(shfx8.U16, thr=2.5, U=1, V=1)
- d_lm8 = mt_lutxy(sharp8, shfx8, "x y != 255 0 ?")
- shpFin = shfx16.Dither_merge16_8(sharp16, d_lm8, U=1, V=1)
- dbfinal = db.Dither_add16(shpFin, Y=3, U=2, V=2, dif=true)
- np=dbfinal#.GrainFL(lsb_in=true, lsb=true, th1=16, th2=24, th3=64, th4=112, 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)
- Dither_merge16_8(np, aaed16, dbmask, luma=true)
- Interleave(aaed.Dither_convert_yuv_to_rgb(lsb_in=false,mode=8),last.Dither_convert_yuv_to_rgb(lsb_in=true,mode=8))
- """)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement