Advertisement
mawen1250

Steins Gate BDrip final3 by mawen1250

Apr 28th, 2012
259
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="E:\mawen1250\SG\STEINS;GATE 001\BDROM\BDMV\STREAM\00013.m2ts"
  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. ### export clip: mask
  15.  
  16. ### prefetch: 16,8
  17. ### lock threads to cores
  18.  
  19. ### ###
  20.  
  21. ### platform: win32
  22.  
  23. SetMemoryMax(1000)
  24.  
  25. src=last
  26. nr=src.MCTD(settings="medium", radius=3, sigma=4, limit=-1, limit2=0, chroma=false, twopass=false, useTTmpSm=false,
  27. \pp=true, protect=true, deblock=false, useQED=true, enhance=false, GPU=false, fixband=false, sharp=false)
  28. mask1=mask.mt_lut("x 2 > x 2 - 6 << 0 ?",Y=3,U=1,V=1)
  29. lumamask1=src.mt_lut("x 111 > 0 x 63 > 447 x 2 << - x 15 > 192 0 ? ? ?",U=1,V=1).RemoveGrain(19, -1)
  30. nrmask=mt_logic(mask1,lumamask1,"max")
  31. mnr=mt_merge(nr,src,nrmask,luma=false,Y=3,U=2,V=2)
  32.  
  33. ### export clip: mnr, mask, mask1
  34.  
  35. ### prefetch: 8,4
  36. ### lock threads to cores
  37.  
  38. ### ###
  39.  
  40. ### platform: win32
  41.  
  42. SetMemoryMax(400)
  43.  
  44. src=last
  45.  
  46.  w       = width(src)
  47.  h       = height(src)
  48.  upw4    = Round(w*0.375)*4
  49.  uph4    = Round(h*0.375)*4
  50.  dehalo = mnr.Dehalo_Alpha_mt(darkstr=0.0,brightstr=1.0,rx=1.8,ry=1.8,highsens=100,lowsens=30)
  51.  #aa_clip = dehalo.nnedi3_rpow2(rfactor=2, fwidth=upw4, fheight=upw4, nsize=1, nns=3, qual=2).SangNom(aa=48).TurnRight().SangNom(aa=48).binomialBlur(varY=1.0,varC=1.0,usemmx=true).Spline36Resize(h, w, 0.5, -0.5).TurnLeft()
  52.  aa_clip = dehalo.Spline64Resize(upw4, uph4).Repair(dehalo.GaussResize(upw4, uph4, p=100), 1).SangNom(aa=15).TurnRight().SangNom(aa=15).binomialBlur(varY=0.5,varC=0.5,usemmx=true).Spline36Resize(h, w).TurnLeft()
  53.  #aa_clip = dehalo.eedi2(field=1, mthresh=10, lthresh=20, vthresh=20, maxd=24, nt=50).Spline36Resize(w, h, 0, -0.5).TurnRight().eedi2(field=1, mthresh=10, lthresh=20, vthresh=20, maxd=24, nt=50).Spline36Resize(h, w, 0, -0.5).TurnLeft()
  54.  aa_cs = mt_adddiff(aa_clip, mt_makediff(aa_clip, aa_clip.RemoveGrain(20,11), U=3, V=3).Repair(mt_makediff(dehalo, aa_clip, U=3, V=3), 13), U=3,V=3)
  55.  
  56. ### export clip: aa_cs, mnr, mask, mask1
  57.  
  58. ### prefetch: 8,4
  59. ### lock threads to cores
  60.  
  61. ### ###
  62.  
  63. ### platform: win32
  64.  
  65. SetMemoryMax(400)
  66.  
  67. src=last
  68.  
  69.  blurc = src.binomialBlur(varY=0.5,varC=0.5,usemmx=true)
  70.  sharpmask = mask.mt_lut("x 48 < 0 x 144 >= 399 x - x 2 << 188 - ? ?",U=1,V=1)
  71.  postaaC = aa_cs.LSFmod1(defaults="slow",Smode=5,Smethod=3,Lmode=4,strength=50,sharpmask=sharpmask,preblur="OFF",secure=true,edgemode=0,soft=-2,soothe=true,ss_x=1.00,ss_y=1.00,source=blurc)
  72.  aamask = mask.mt_lut("x 20 < 0 x 20 - 3 << ?", U=1, V=1).mt_inflate()#.RemoveGrain(20, -1)
  73.  aaed = mt_merge(mnr, postaaC, aamask, luma=true, U=3, V=3 )
  74. mask2=mask1#mt_lut(mask,"x 2 > x 2 - 6 << 0 ?",Y=3,U=1,V=1)
  75. lumamask2=aaed.mt_lut("x 55 > 0 56 x - 2 << ?",Y=3,U=1,V=1).RemoveGrain(19,-1)
  76. dbmask=mt_logic(mask2,lumamask2,"max")
  77.  
  78. ### export clip: aaed, dbmask
  79.  
  80. ### prefetch: 6,3
  81. ### lock threads to cores
  82.  
  83. ### ###
  84.  
  85. SetMemoryMax(1200)
  86.  
  87. aaed16=aaed.Dither_convert_8_to_16()
  88. db1=aaed16.GradFun3( smode=2, thr=0.40, elast=2.5, ampn=0, radius=20, ampo=0.8, dthr=0.011, lsb=true, lsb_in=true, mask=0 )
  89. nr=db1.Dither_resize16(db1.width, db1.height/2, kernel="Gauss", a1=10, fh=-1, fv=-1)
  90. noise=makediff16(db1, nr, Y=3, U=3, V=3)
  91. db2=nr.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)
  92. db=Dither_add16(db2, noise, Y=3, U=3, V=3, dif=true)
  93. np=db#.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)
  94. Dither_merge16_8(np, aaed16, dbmask, luma=true)
  95.  
  96. f3kdb(range=0, Y=0, Cb=0, Cr=0, grainY=0, grainC=0, dither_algo=3, dynamic_grain=true, keep_tv_range=false, input_mode=1, output_mode=2, output_depth=10)
  97.  
  98. """)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement