Advertisement
mawen1250

HybridIVTC v1.2

Oct 21st, 2012
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function HybridIVTC24(clip input)
  2. {
  3.  
  4. sw     = input.width()
  5. sh     = input.height()
  6.  
  7. left   = 0
  8. top    = 908
  9. right  = 1439
  10. bottom = 980
  11.  
  12. lc     = int((     left)/4)*4
  13. tc     = int((      top)/4)*4
  14. rc     = int((sw- right)/4)*4
  15. bc     = int((sh-bottom)/4)*4
  16.  
  17. mspal  = input.mt_lutspa(mode="absolute",
  18. \                        expr="x " + string(left-1) + " >= x " + string(right +1) + " <= & y "
  19. \                                  + string(top -1) + " >= y " + string(bottom+1) + " <= & & 255 0 ?", Y=3, U=1, V=1)
  20. \             .RemoveGrain(11, -1)
  21. mspac  = mspal.ConvertToY8().Spline36Resize(sw/2, sh/2, -0.50).ConvertToYV12()
  22. mspa   = YtoUV(mspac, mspac, mspal)
  23.  
  24. pa24   = input
  25. pa30   = input.Crop(lc, tc, -rc, -bc)
  26.  
  27. TFM30  = pa24.TFM(mode=5, PP=6, slow=2, scthresh=12.0, cthresh=9, MI=80)
  28. TFM30b = mt_merge(TFM30, TFM30.BlankClip(), mspa.mt_binarize(255, Y=3, U=3, V=3), luma=false, Y=3, U=3, V=3)
  29. IVTC24 = TFM30b.TDecimate(mode=1, hybrid=0, clip2=TFM30)
  30.  
  31. Bob60  = pa30.QTGMC(Preset="Very Slow").FrameCache(3)
  32.  
  33. super  = Bob60.SVSuper    ("{pel:2, gpu:1, scale:{up:2, down:4}}")
  34. vector = super.SVAnalyse  ("{gpu:1, block:{w:16, h:16, overlay:2}, main:{levels:0, search:{type:4, coarse:{distance:-10}, bad:{sad:1500}}}, refine:[{thsad:250}]}")
  35. Bob120 = Bob60.SVSmoothFps(super, vector, "{rate:{num:2, den:1, abs:false}, cubic:1, scene:{blend:false}}", url="www.svp-team.com", mt=GetMTMode(True))
  36.  
  37. Bob24  = Bob120.SelectEvery(5, 0).PointResize(sw, sh, -lc, -tc, sw, sh)
  38.  
  39. return mt_merge(IVTC24, Bob24, mspa.ChangeFPS(24000, 1001), luma=false, Y=3, U=3, V=3)
  40.  
  41. }
  42.  
  43.  
  44. Function HybridIVTC120(clip input)
  45. {
  46.  
  47. Bob60  = input.QTGMC(Preset="Slower").FrameCache(3)
  48. #Bob60  = input.nnedi3(field=-2)
  49.  
  50. super  = Bob60.SVSuper    ("{pel:2, gpu:1, scale:{up:2, down:4}}")
  51. vector = super.SVAnalyse  ("{gpu:1, block:{w:16, h:16, overlay:2}, main:{levels:0, search:{type:4, coarse:{distance:-10}, bad:{sad:1500}}}, refine:[{thsad:250}]}")
  52. Bob120 = Bob60.SVSmoothFps(super, vector, "{rate:{num:2, den:1, abs:false}, cubic:1, scene:{blend:false}}", url="www.svp-team.com", mt=GetMTMode(True))
  53.  
  54. Bob24  = Bob120.SelectEvery(5, 0)
  55.  
  56. return Bob24
  57.  
  58. }
  59.  
  60. /*
  61.  1t                  2t                  3t                  4t
  62.            1b                  2b                  3b                  4b
  63.  
  64.  1t              2t              2t              3t              4t
  65.          1b              2b              3b              4b              4b
  66.  
  67.  1t      1b      2t      2b      2t      3b      3t      4b      4t      4b
  68.  
  69.  1t1 1t2 1b1 1b2 2t1 2t2 2b1 2b2 2t1 2t2 3b1 3b2 3t1 3t2 4b1 4b2 4t1 4t2 4b1 4b2
  70.  
  71.  1t1                 2t2                 3b1                 4b2
  72. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement