Log in

View Full Version : RemoveDirt plugin crash/error


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

bhershey
3rd January 2014, 20:34
I get the same error. Have you compared the MFlow results using the old dll to MCompensate using the new dll? I have not yet.

Also, using the old DLL MFlow and MCompensate are the same speed on my PC. With the newest mvtools2.dll the MCompensate is 29% faster.

Brian

Boffee
4th January 2014, 12:08
Looks like this is the answer to MFlow v MCompensate quoted from another thread:-

MCompensate and MFlow both create intermediary frames suitable for denoising. Their method of doing so differs slightly: MCompensate uses block based compensation, and MFlow uses pixel based compensation. Because of how they work, you can sometimes get blocking in MCompensate (which can screw up some temporal averaging schemes) but you won't in MFlow.

OK so how do we use this script with MVtools2 v 2.5.11.3 using MFlow without a Virtualdub crash?

bhershey
4th January 2014, 15:29
I'm familiar with how they work, I was just wondering if you compared the results from both on film transfers yet.

Boffee
4th January 2014, 20:17
Yes, can't see any difference between using MCompensate instead of MFlow.