Floatingshed
23rd November 2015, 22:53
I use this a fair bit for removing film dirt:
function Dirt(clip clap,int "limit",bool "_grey")
{
LoadPlugin("C:\Program Files (x86)\Avisynth 2.5\xtraplugins\mvtools2.dll")
#_grey=false
_grey=default(_grey, false)
limit = default(limit,6)
prefiltered = RemoveGrain(clap,2)
superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)
super=MSuper(clap, hpad=32, vpad=32,pel=2)
bvec = MAnalyse(superfilt,isb=true, blksize=16, overlap=2,delta=1, truemotion=true)
fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)
bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=100)
fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=100)
backw = MFlow(clap,super,bvec_re)
forw = MFlow(clap,super,fvec_re)
clp=interleave(backw,clap,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)
}
I think it came from John Meyer, I would like to add MDegrain2 to remove some of the smaller grain. Can this be done or does it need a separate script with it's own MAnalyse etc.?
Thanks.
function Dirt(clip clap,int "limit",bool "_grey")
{
LoadPlugin("C:\Program Files (x86)\Avisynth 2.5\xtraplugins\mvtools2.dll")
#_grey=false
_grey=default(_grey, false)
limit = default(limit,6)
prefiltered = RemoveGrain(clap,2)
superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)
super=MSuper(clap, hpad=32, vpad=32,pel=2)
bvec = MAnalyse(superfilt,isb=true, blksize=16, overlap=2,delta=1, truemotion=true)
fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)
bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=100)
fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=100)
backw = MFlow(clap,super,bvec_re)
forw = MFlow(clap,super,fvec_re)
clp=interleave(backw,clap,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)
}
I think it came from John Meyer, I would like to add MDegrain2 to remove some of the smaller grain. Can this be done or does it need a separate script with it's own MAnalyse etc.?
Thanks.