MadRat
1st July 2010, 09:22
Now that I have a processor with 6 cores and threads, I've starting trying to use MT, the multi-threading plug-in and version of avisynth. My usual script template looks something like this but without the SetMTMode line:
SetMTmode(2,0)
MPEG2Source("E:\MyVideos\300.d2v")
# Inverse Telecine
interp = nnedi2(field=-2)
tdeint(mode=2,edeint=interp)
TDecimate()
# Restore the color pallet, resize & crop
ColorMatrix(mode="Rec.709->Rec.601")
BilinearResize(704,480,24,2,-4,-6)
# Denoise
#~ vf=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,overlap=4,sharp=2,truemotion=true)
#~ vb=last.mvanalyse(pel=2,blksize=8,isb=true,idx=1,overlap=4,sharp=2,truemotion=true)
#~ vf2=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,delta=2,overlap=4,sharp=2,truemotion=true)
#~ interleave(\
#~ mvcompensate(last,vf2,idx=1,thSCD1=600)\
#~ , mvcompensate(last,vf,idx=1,thSCD1=600)\
#~ , last\
#~ , mvcompensate(last,vb,idx=1,thSCD1=600))
#~ FFT3DFilter(sigma=1.7, bt=5, bw=8, bh=8, ow=4, oh=4, sharpen=1.0)
#~ selectevery(4,2)
# Derainbow
strength = 1 # <-- 1 through 10
FFT3DFilter(plane=3, bt=3, sigma=3, sigma2=3, sigma3=strength, sigma4=3)
mergechroma(AddBorders(4, 0, 4, 0).awarpsharp(depth=20.0, thresh=0.75, blurlevel=2, cm=1).Crop(4,0,-4,0))
# Sharpen
LSFmod()
# Dehalo & remove edge noise
dehalo_alpha(darkstr=0)
EdgeCleaner(64)
# Deband
gradfunkmirror()
I use it on Hauphauge WinTV-PVR 150 TV captures (which are supposed to be directly compatible with DVD) because I get lots of noise, rainbowing and color bleeds. As it is above, it works. If I uncomment the denoise section I get a crash. If I comment out the inverse telecine and derainbow, then I can uncomment denoise and it's fine.
Why doesn't it work? Is there a way to get it all to work all at the same time? I've already tried taking out the fft3dfilter type of derainbow and using tcomb right after mpeg2source but that crashed. I've tried other setMTmode settings (2,3,4 and 5) and it still crashed. I tried using fft3dfilter denoise without motion compensation but that crashed too. I'm open to using other filters and any suggestions on how this script could be improved, speed and/or quality wise would also be appreciated.
:thanks:
SetMTmode(2,0)
MPEG2Source("E:\MyVideos\300.d2v")
# Inverse Telecine
interp = nnedi2(field=-2)
tdeint(mode=2,edeint=interp)
TDecimate()
# Restore the color pallet, resize & crop
ColorMatrix(mode="Rec.709->Rec.601")
BilinearResize(704,480,24,2,-4,-6)
# Denoise
#~ vf=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,overlap=4,sharp=2,truemotion=true)
#~ vb=last.mvanalyse(pel=2,blksize=8,isb=true,idx=1,overlap=4,sharp=2,truemotion=true)
#~ vf2=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,delta=2,overlap=4,sharp=2,truemotion=true)
#~ interleave(\
#~ mvcompensate(last,vf2,idx=1,thSCD1=600)\
#~ , mvcompensate(last,vf,idx=1,thSCD1=600)\
#~ , last\
#~ , mvcompensate(last,vb,idx=1,thSCD1=600))
#~ FFT3DFilter(sigma=1.7, bt=5, bw=8, bh=8, ow=4, oh=4, sharpen=1.0)
#~ selectevery(4,2)
# Derainbow
strength = 1 # <-- 1 through 10
FFT3DFilter(plane=3, bt=3, sigma=3, sigma2=3, sigma3=strength, sigma4=3)
mergechroma(AddBorders(4, 0, 4, 0).awarpsharp(depth=20.0, thresh=0.75, blurlevel=2, cm=1).Crop(4,0,-4,0))
# Sharpen
LSFmod()
# Dehalo & remove edge noise
dehalo_alpha(darkstr=0)
EdgeCleaner(64)
# Deband
gradfunkmirror()
I use it on Hauphauge WinTV-PVR 150 TV captures (which are supposed to be directly compatible with DVD) because I get lots of noise, rainbowing and color bleeds. As it is above, it works. If I uncomment the denoise section I get a crash. If I comment out the inverse telecine and derainbow, then I can uncomment denoise and it's fine.
Why doesn't it work? Is there a way to get it all to work all at the same time? I've already tried taking out the fft3dfilter type of derainbow and using tcomb right after mpeg2source but that crashed. I've tried other setMTmode settings (2,3,4 and 5) and it still crashed. I tried using fft3dfilter denoise without motion compensation but that crashed too. I'm open to using other filters and any suggestions on how this script could be improved, speed and/or quality wise would also be appreciated.
:thanks: