Advertisement
mawen1250

Steins Gate BDrip test4 by mawen1250

May 7th, 2012
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MP_Pipeline("""
  2.  
  3. ### platform: win32
  4.  
  5. SetMemoryMax(300)
  6.  
  7. src="D:\Steins Gate\01.mkv"
  8. cf = src + ".ffindex"
  9. #FFIndex(src, cachefile=cf, demuxer="lavf")
  10. #FFVideoSource(src, cachefile=cf, seekmode=-1, threads=1)
  11. DSS2(src)
  12. mask=last.tcanny(sigma=1.0, mode=1, plane=1)
  13.  
  14. mask2=mask.mt_lut("x 2 > x 2 - 6 << 0 ?",Y=3,U=1,V=1)#.mt_expand.mt_deflate
  15. lumamask2=last.mt_lut("x 55 > 0 56 x - 2 << ?",Y=3,U=1,V=1).RemoveGrain(19,-1)
  16. dbmask=mt_logic(mask2,lumamask2,"max")
  17.  
  18. ### export clip: dbmask
  19.  
  20. ### prefetch: 6,3
  21. ### lock threads to cores
  22.  
  23. ### ###
  24.  
  25. SetMemoryMax(1200)
  26.  
  27. s_str     = 1.2
  28. s_reverse = s_str + 0.25
  29. s_divisor = 1.5
  30. s_indexR  = 1.281
  31. 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 +"
  32.  
  33. aaed=last
  34. aaed16=aaed.U16
  35.  
  36. pre_nr  = aaed.RemoveGrain(11).RemoveGrain(4)
  37. dif_nr  = aaed.mt_makediff(pre_nr, Y=3, U=3, V=3)
  38.  
  39. nr=pre_nr.U16.Dither_resize16(aaed16.width, aaed16.height/2, kernel="Gauss", a1=1, fh=-1, fv=-1)
  40. noise=makediff16(aaed16, nr, Y=3, U=3, V=3)
  41. 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 )
  42. 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)
  43. db=Dither_add16(db2, noise, Y=3, U=3, V=3, dif=true)
  44.  
  45. db8     = db.DitherPost(mode=0)
  46.  
  47. sharp8  = dif_nr.mt_lut(sstring)
  48. dif_db  = mt_makediff(pre_nr, db8).mt_lut(sstring)
  49. shfx8   = sharp8.Repair(dif_db, 1, -1)
  50. shfx8   = mt_lutxy(sharp8, shfx8, "x 128 - abs y 128 - abs < x y ?")
  51. shfx16  = shfx8.U16
  52. sharp16 = sharp8.U16.Dither_limit_dif16(shfx8.U16, thr=2.5, U=1, V=1)
  53.  
  54. d_lm8   = mt_lutxy(sharp8, shfx8, "x y != 255 0 ?")
  55. shpFin  = shfx16.Dither_merge16_8(sharp16, d_lm8, U=1, V=1)
  56.  
  57. dbfinal = db.Dither_add16(shpFin, Y=3, U=2, V=2, dif=true)
  58.  
  59. 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)
  60.  
  61. Dither_merge16_8(np, aaed16, dbmask, luma=true)
  62.  
  63. Interleave(aaed.Dither_convert_yuv_to_rgb(lsb_in=false,mode=8),last.Dither_convert_yuv_to_rgb(lsb_in=true,mode=8))
  64.  
  65. """)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement