Advertisement
mawen1250

Clannad AS BDrip v1 by mawen1250

Jun 23rd, 2012
214
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(400)
  6.  
  7. src = "I:\11\[KUNO-DIY][Love Again][BDMV][CLANNAD AFTER STORY][Blu-ray BOX Disc 1-5 Fin]\CLANNAD_AFTER_STORY_1\BDMV\STREAM\00000.m2ts"
  8. FFIndex(src, demuxer="lavf")
  9. FFVideoSource(src, threads=1, seekmode=-1)
  10. #DSS2(src)
  11.  
  12. emask   = last.tcanny(sigma=0.8, mode=1, plane=1)
  13.  
  14. ### export clip: emask
  15.  
  16. ### prefetch: 32, 8
  17.  
  18. ### ###
  19.  
  20. ### platform: win32
  21.  
  22. SetMemoryMax(800)
  23.  
  24. src     = last
  25. sw      = src.width()
  26. sh      = src.height()
  27. upw4    = Round(sw*0.375)*4
  28. uph4    = Round(sh*0.375)*4
  29.  
  30. aa_clip = src.Spline64Resize(upw4, uph4).Repair(src.GaussResize(upw4, uph4, p=100), 1).SangNom(aa=48).TurnRight().SangNom(aa=48).Spline36Resize(sh, sw).TurnLeft()
  31.  
  32. aacs    = CSmod(aa_clip, src, chroma=false, preblur=true, RGmode=11, Repmode=13, strength=4.0, Slimit=false, Tlimit=false, Soothe=24)
  33.  
  34. aamask  = emask.mt_lutxy(src.mt_inpand(mode=mt_square(1)), "y 96 < x 16 < 0 x 16 - 5 << ? x 32 < 0 x 32 - 3 << ? ?", U=1, V=1).RemoveGrain(20, -1)
  35. aaed8   = mt_merge(src, aacs, aamask, luma=false, U=2, V=2)
  36.  
  37. last    = aaed8.U16()
  38.  
  39. ### export clip: emask
  40.  
  41. ### prefetch: 16, 0
  42.  
  43. ### ###
  44.  
  45. SetMemoryMax(1200)
  46.  
  47. aaed16   = last
  48.  
  49. nr16    = aaed16.Dither_resize16(aaed16.width(), aaed16.height()/2, kernel="Gauss", a1=15, fh=-1, fv=-1)
  50. noise   = makediff16(aaed16, nr16, Y=3, U=3, V=3)
  51.  
  52. db      = nr16.GradFun3( smode=2, thr=0.30, elast=2.5, ampn=0, radius=14, ampo=0.8, dthr=0.011, lsb=true, lsb_in=true, mask=0 )
  53. deband  = Dither_add16(db, noise, Y=3, U=3, V=3, dif=true)
  54. dbmask  = emask.mt_lut("x 3 > x 3 - 6 << 0 ?",Y=3,U=1,V=1)
  55.  
  56. Dither_merge16_8(deband, aaed16, dbmask, luma=true)
  57. #Dither_y_gamma_to_linear(curve="709").Dither_resize16(1280, 720).Dither_y_linear_to_gamma(curve="709")
  58. Down10(stack=false)
  59.  
  60. #""")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement