bilditup1
20th May 2014, 20:34
The past two days I've been diving into avs in order to clean up a DVD I just bought (DBZ Rock the Dragon Edition). It's been fun tweaking this and that, and I'm pretty much amazed at how powerful avs filters can be, but I seem to have hit a snag.
In order to use InterFrame (which I didn't actually use just yet) I switched to AviSynth MT. All seems to be well in my filter-chain, until the very end, when I try to apply sharpening with Didée's LimitedSharpenFaster. Alone, this seems to work, but if I upscale using nnedi3 just before it, I'll get some weird warping and missing pieces of frames (like blips). The same thing happens if I try to apply LSF twice in a row, or add an anti-aliasing script call right after (just to try, doesn't appear to be necessary).
I managed to avoid this problem when using nnedi3_rpow2 and one instance of LSF by changing MTMode to (3,8) just before LSF. But adding another LSF call right after it brings the issue back - not as pronounced as before, but still clearly unacceptable.
So it's clear that whatever LSF is doing, it is not thread-safe, at least not in this script. Manau's MaskTools2 and Kassandro's RemoveGrain are previously used by AnimeIVTC. But that doesn't seem to be the issue (at least I don't think so?) since switching to a single function from TIVTC.dll doesn't seem to help matters. In sum, I don't know what's going on here, or if it's fixable. If it is - great! If not - what should I use for sharpening instead?
My other question (for now) - I get some weird pixelation at the beginning, on the outermost parts of the Eternal Dragon's eyes. Doesn't appear to be in the source. Artifact doesn't happen anywhere else, but I have no idea what to make of it. Can post screens if that would be helpful.
Other notes - I am using Set's 32-bit AviSynthMT 2.6 from this past September. My CPU is a 4770K @ 4.6Ghz, and I've got 32GB of RAM. Most probably I'm denoising a bit too much, so I'll likely pull back on that, but I don't think that has anything to do with my issues. I'd be grateful for any other comments or suggestions though.
For those who can help, here's the latest version of my script:
##
## DBZ_d1_mk7s
##
##
## Set memory size and multithreading mode
##
SetMemoryMax(4096)
SetMTMode(3,8)
##
## Load plugin dependencies for AnimeIVTC2
##
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\dup230\Dup.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\fizick\mvtools2.dll")
LoadCPlugin("C:\blu\MeGUI\tools\avisynth_plugin\fizick\yadif.dll") # CPlugin
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\RemoveGrainSSE3.dll") # Also for LSF
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\ReduceFlickerSSE3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\RepairSSE3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\manau\MaskTools.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\manau\MaskTools2.dll") # Also for LSF
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\MarcFD\SangNom.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\mg262\Average.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\set\aWarpSharp.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\set\Toon-v1.1.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\eedi2.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\nnedi2.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\nnedi3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TDeint.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TIVTC.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TMM.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\yadifmod.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tsp\medianblur.dll")
##
## Load source plugins
##
LoadPlugin("C:\blu\MeGUI\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\ColorMatrix.dll")
##
## Load denoising/degraining plugins
##
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\DeGrainMedian.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\FFT3DFilter.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\VagueDenoiser.dll")
##
## Load Anti-aliasing plugins
##
#LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tp7\SangNom2.dll")
#LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tp7\fturn.dll")
##
## Load script dependencies for AnimeIVTC2
##
Import("C:\blu\MeGUI\tools\avisynth_plugin\Lato\LSFmod.v1.9.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\MOmonster\srestore.avs")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\MCBob.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\Vinverse.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\VinverseD.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\VinverseD.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\thetoof\TGMCmod.avsi")
##
## Load scripts
##
Import("C:\blu\MeGUI\tools\avisynth_plugin\thetoof\AnimeIVTC2.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\LimitedSharpenFaster.avsi")
#Import("C:\blu\MeGUI\tools\avisynth_plugin\line0\maa2_mod.avsi")
##
## Load video
##
SetMTMode(5)
DGDecode_mpeg2source("I:\rip\DBZ\D1\video.d2v", cpu=4, info=3) # Load video
ColorMatrix(hints=true, interlaced=true, threads=8) # Fix colors
##
## IVTC
##
AnimeIVTC(mode=4, omode=1)
##
## Denoising/degraining
##
SetMTMode(2,8)
DeGrainMedian(limitY=2,limitUV=3,mode=1)
DeGrainMedian(limitY=2,limitUV=3,mode=1)
FFT3DFilter(sigma=3.0, bt=5, plane=4, bw=64, bh=64, ow=32, oh=32, wintype=1, ncpu=8)
VagueDenoiser(threshold=0,method=3, nsteps=5, chromaT=0)
##
## Resizing
##
nnedi3_rpow2(rfactor=2,cshift="spline64resize",fwidth=1280,fheight=936,nsize=0,nns=3,qual=2)
##
## Sharpening
##
SetMTMode(3,8) # Or else awful things happen
LimitedSharpenFaster(strength=255, ss_x=2, ss_y=2)
LimitedSharpenFaster() # awful things happen anyway with this line
##
## Anti-aliasing
##
#maa2(threads=8)
##
## END OF FILE
##
Thanks a lot!
In order to use InterFrame (which I didn't actually use just yet) I switched to AviSynth MT. All seems to be well in my filter-chain, until the very end, when I try to apply sharpening with Didée's LimitedSharpenFaster. Alone, this seems to work, but if I upscale using nnedi3 just before it, I'll get some weird warping and missing pieces of frames (like blips). The same thing happens if I try to apply LSF twice in a row, or add an anti-aliasing script call right after (just to try, doesn't appear to be necessary).
I managed to avoid this problem when using nnedi3_rpow2 and one instance of LSF by changing MTMode to (3,8) just before LSF. But adding another LSF call right after it brings the issue back - not as pronounced as before, but still clearly unacceptable.
So it's clear that whatever LSF is doing, it is not thread-safe, at least not in this script. Manau's MaskTools2 and Kassandro's RemoveGrain are previously used by AnimeIVTC. But that doesn't seem to be the issue (at least I don't think so?) since switching to a single function from TIVTC.dll doesn't seem to help matters. In sum, I don't know what's going on here, or if it's fixable. If it is - great! If not - what should I use for sharpening instead?
My other question (for now) - I get some weird pixelation at the beginning, on the outermost parts of the Eternal Dragon's eyes. Doesn't appear to be in the source. Artifact doesn't happen anywhere else, but I have no idea what to make of it. Can post screens if that would be helpful.
Other notes - I am using Set's 32-bit AviSynthMT 2.6 from this past September. My CPU is a 4770K @ 4.6Ghz, and I've got 32GB of RAM. Most probably I'm denoising a bit too much, so I'll likely pull back on that, but I don't think that has anything to do with my issues. I'd be grateful for any other comments or suggestions though.
For those who can help, here's the latest version of my script:
##
## DBZ_d1_mk7s
##
##
## Set memory size and multithreading mode
##
SetMemoryMax(4096)
SetMTMode(3,8)
##
## Load plugin dependencies for AnimeIVTC2
##
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\dup230\Dup.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\fizick\mvtools2.dll")
LoadCPlugin("C:\blu\MeGUI\tools\avisynth_plugin\fizick\yadif.dll") # CPlugin
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\RemoveGrainSSE3.dll") # Also for LSF
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\ReduceFlickerSSE3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\kassandro\RepairSSE3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\manau\MaskTools.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\manau\MaskTools2.dll") # Also for LSF
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\MarcFD\SangNom.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\mg262\Average.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\set\aWarpSharp.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\set\Toon-v1.1.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\eedi2.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\nnedi2.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\nnedi3.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TDeint.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TIVTC.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\TMM.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\yadifmod.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tsp\medianblur.dll")
##
## Load source plugins
##
LoadPlugin("C:\blu\MeGUI\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tritical\ColorMatrix.dll")
##
## Load denoising/degraining plugins
##
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\DeGrainMedian.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\FFT3DFilter.dll")
LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\VagueDenoiser.dll")
##
## Load Anti-aliasing plugins
##
#LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tp7\SangNom2.dll")
#LoadPlugin("C:\blu\MeGUI\tools\avisynth_plugin\tp7\fturn.dll")
##
## Load script dependencies for AnimeIVTC2
##
Import("C:\blu\MeGUI\tools\avisynth_plugin\Lato\LSFmod.v1.9.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\MOmonster\srestore.avs")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\MCBob.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\Vinverse.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\VinverseD.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\tritical\VinverseD.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\thetoof\TGMCmod.avsi")
##
## Load scripts
##
Import("C:\blu\MeGUI\tools\avisynth_plugin\thetoof\AnimeIVTC2.avsi")
Import("C:\blu\MeGUI\tools\avisynth_plugin\LimitedSharpenFaster.avsi")
#Import("C:\blu\MeGUI\tools\avisynth_plugin\line0\maa2_mod.avsi")
##
## Load video
##
SetMTMode(5)
DGDecode_mpeg2source("I:\rip\DBZ\D1\video.d2v", cpu=4, info=3) # Load video
ColorMatrix(hints=true, interlaced=true, threads=8) # Fix colors
##
## IVTC
##
AnimeIVTC(mode=4, omode=1)
##
## Denoising/degraining
##
SetMTMode(2,8)
DeGrainMedian(limitY=2,limitUV=3,mode=1)
DeGrainMedian(limitY=2,limitUV=3,mode=1)
FFT3DFilter(sigma=3.0, bt=5, plane=4, bw=64, bh=64, ow=32, oh=32, wintype=1, ncpu=8)
VagueDenoiser(threshold=0,method=3, nsteps=5, chromaT=0)
##
## Resizing
##
nnedi3_rpow2(rfactor=2,cshift="spline64resize",fwidth=1280,fheight=936,nsize=0,nns=3,qual=2)
##
## Sharpening
##
SetMTMode(3,8) # Or else awful things happen
LimitedSharpenFaster(strength=255, ss_x=2, ss_y=2)
LimitedSharpenFaster() # awful things happen anyway with this line
##
## Anti-aliasing
##
#maa2(threads=8)
##
## END OF FILE
##
Thanks a lot!