Advertisement
Guest User

VHSHaloremover

a guest
May 8th, 2016
1,167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # VHSHaloremover http://forum.doom9.org/showpost.php?p=1758184&postcount=14
  2. Function VHSHaloremover(clip input, int "xradius", int "yradius", int "darkthr", int "brightthr", float "blurmix")
  3. {
  4. input
  5. h   = Height ()
  6. w   = Width ()
  7. xradius = Default(xradius, 8)
  8. yradius = Default(yradius, 1)
  9. darkthr = Default(darkthr, 122)
  10. brightthr = Default(brightthr, 134)
  11. blurmix = Default(blurmix, 0.8)
  12. cy  = BicubicResize (w / xradius, h / yradius, 1, 0).BicubicResize (w, h, 1, 0)
  13. cmd = mt_makediff (cy)
  14. cm  = cmd.mt_lut ("x "+String(brightthr)+" > 255 x "+String(darkthr)+" < 255 0 ? ?")
  15. cr  = last.Merge (cy, blurmix)
  16. mt_merge (last, cr, cm, y=3, u=2, v=2)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement