Boffee
2nd January 2014, 11:22
I have been using this script for sometime to clean dirt from 8mm film, but having updated the MVtools2.dll plugin to the most recent version, I find Virtualdub crashes on exit with " out-of-bounds memory access (access violation) occurred in module 'ntdll'". From another thread on this forum it has been suggested that changing MFlow to MCompensate fixes the issue, which it does. Can anyone explain what is going on here and what difference changing this part of the script would make?
#Loadplugin("removegrain.dll") #required by function RemoveDirt
#LoadPlugin("MVTools2.dll") #required by functions RemoveDirt and RemoveNoise
#Loadplugin("warpsharp.dll") #required by function RemoveNoise
#loadplugin("RemoveDirtS.dll") #required by function RemoveDirt
function RemoveDirt(clip input)
{
#parameters which user may usefully tweak if required
dirt_strength=23 #sets amount of dirt removal (big spots)
# create super clip with hierarchical scaled frame data
super1=input.MSuper(pel=2)
#use the super clip to generate forward and reverse vector data
bvec = MAnalyse(super1,isb=false, blksize=8,overlap=0, delta=1, truemotion=true)
fvec = MAnalyse(super1,isb=true, blksize=8,overlap=0, delta=1, truemotion=true)
#create motion estimated forward and reverse versions of the current frame
backw = MFlow(input,super1,bvec)
forw = MFlow(input,super1,fvec)
#combine into a three-frame clip
clp=interleave(backw,input,forw)
#apply heavy cleansing
clensed=clp.Clense(grey=false, cache=4)
#create an alternate clip for the RestoreMotionBlocks filter
alt=clp.RemoveGrain(2) #mode=2 retains fine detail
#create the cleaned clip
clp1=RestoreMotionBlocks(clensed,clp,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=dirt_strength,noisy=4, grey=false)
#and just return the wanted frame
return clp1.SelectEvery(3,1)
}
Thanks
#Loadplugin("removegrain.dll") #required by function RemoveDirt
#LoadPlugin("MVTools2.dll") #required by functions RemoveDirt and RemoveNoise
#Loadplugin("warpsharp.dll") #required by function RemoveNoise
#loadplugin("RemoveDirtS.dll") #required by function RemoveDirt
function RemoveDirt(clip input)
{
#parameters which user may usefully tweak if required
dirt_strength=23 #sets amount of dirt removal (big spots)
# create super clip with hierarchical scaled frame data
super1=input.MSuper(pel=2)
#use the super clip to generate forward and reverse vector data
bvec = MAnalyse(super1,isb=false, blksize=8,overlap=0, delta=1, truemotion=true)
fvec = MAnalyse(super1,isb=true, blksize=8,overlap=0, delta=1, truemotion=true)
#create motion estimated forward and reverse versions of the current frame
backw = MFlow(input,super1,bvec)
forw = MFlow(input,super1,fvec)
#combine into a three-frame clip
clp=interleave(backw,input,forw)
#apply heavy cleansing
clensed=clp.Clense(grey=false, cache=4)
#create an alternate clip for the RestoreMotionBlocks filter
alt=clp.RemoveGrain(2) #mode=2 retains fine detail
#create the cleaned clip
clp1=RestoreMotionBlocks(clensed,clp,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=dirt_strength,noisy=4, grey=false)
#and just return the wanted frame
return clp1.SelectEvery(3,1)
}
Thanks