WarpDeRing faster source

From Avisynth wiki
Jump to: navigation, search

source: http://web.archive.org/web/20131123001006/http://pastebin.com/y5xnHUuv

function warpdering_faster(clip c, int "strength", int "tmax", int "tmin") {
strength = default(strength,6)
tmax = default(tmax,10)
tmin = default(tmin,7)
c
addborders(4,4,4,4)
fillmargins(4,4,4,4)
warp = awarp4(nnedi3_rpow2(rfactor=2).Spline36Resize(width*4, height*4, 0.25, 0.25),asobel(thresh=255).ablur(),depth=strength, chroma=1)
owarp = mt_merge(last,warp,TEMmod(threshY=0,chroma=0).mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().blur(1),true,u=1,v=1)
mt_merge(owarp,last,mt_hysteresis(TEMmod(threshy=tmax,chroma=0),TEMmod(threshy=tmin,chroma=0)).blur(1),true,u=1,v=1)
crop(4,4,-4,-4)
Mergechroma(c)
}
Personal tools