View difference between Paste ID: s24mSgJ5 and LMD1cMYy
SHOW: | | - or go back to the newest paste.
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 brightthr > 255 x darkthr < 255 0 ? ?")
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
}