Skip to content

Instantly share code, notes, and snippets.

@tophf
Last active December 26, 2015 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tophf/7122200 to your computer and use it in GitHub Desktop.
Save tophf/7122200 to your computer and use it in GitHub Desktop.
function fixdupfield( clip c, int "thr" )
{
thr = default(thr,4)
s = c.separatefields()
m = mt_lutxy(s.selecteven, s.selectodd, "x y - abs "+string(thr)+" - 255 *")
\ .removegrain(4,-1).mt_expand.mt_inpand.mt_inpand.removegrain(4,-1)
conditionalfilter(m,c.nnedi3,c,"YPlaneMax","==","0")
mergechroma(c)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment