I attached the full porting to VapourSynth of FRED film restore
I included the call to DepanEstimate and DepanStabilise
I added also the script for the function UnsharpMask (unsharpmask.py) -> It is safe to add it in Hybrid
This script should be copied in ".\Hybrid\64bit\vsscripts"
It is quite annoying the fact that Vapoursynth display the message:
Avisynth Compat: requested frame ... not prefetched, using slow method
I think that the addins ColorYUV2.dll and AutoLevels_x64.dll could be added to the whitelist in avisynth_compat.cpp
Dan
@Selur: I think that script FRED_Restoring_Blending_Cleaning.vpy with the necessary changes to include only the FRED restoring part could be added in ".\Hybrid\64bit\vsscripts"
Quote:@Selur: I think that script FRED_Restoring_Blending_Cleaning.vpy with the necessary changes to include only the FRED restoring part could be added in ".\Hybrid\64bit\vsscripts"
The whole FRED part should be put in a function, with proper parameters and documentation.
Also, not adding a script that requires Avisynths dlls (here: ColorYUV2 and AutoLevels) Hybrids Vapoursynth scripts.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
I’ve just completed a new test today, trying to faithfully reproduce Fred’s 2017 script — the one he described in detail on Doom9 but never published fully.
I used the same filter chain as he mentioned:
RemoveDirtSMC()
GamMac()
DePanStabilize()
Several passes of Tweak() (with starthue and endhue) to isolate specific color bands
McDegrainSharp()
And his sharpening technique: UnsharpMask, blur, UnsharpMask again, then Sharpen()
The goal was to stay as close as possible to Fred's 2017 workflow.
Let me know what you think of the results — I’ll be happy to refine it further based on your suggestions.
# FUNCTION RemoveDirtSMC
#============================================================================================================================================.
function RemoveTempGrain(clip clp, int "_mode")
{
_mode = Default(_mode, 17)
rg = RemoveGrain(clp, mode=_mode)
return TemporalRepair(rg, clp)
}
function RemoveDirtS(clip clp, int "limit", bool "_grey")
{
_grey = Default(_grey, false)
limit = Default(limit, 6)
clensed = clp.Clense(grey=_grey, cache=4)
alt = clp.RemoveGrain(10)
function McDegrainSharp(clip c, int "frames", int"strenght",float "bblur", float "csharp", bool "bsrch")
{ # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
# Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580
# "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
# In areas where MAnalyse cannot find good matches, the blur() will be dominant.
# In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
# when the pixel averaging is performed.
frames = default(frames, 2)
strenght = default(strenght,400)
bblur = default(bblur, 1.0)
csharp = default(csharp, 1.0)
bsrch = default(bsrch, true)
if gpu:
import ChangeFPS
block_over = 0 if block_over == 0 else 1 if block_over == 2 else 2 if block_over == 4 else 3
Super = core.svp1.Super(clip, "{gpu:1,pel:4}")
bvec = core.svp1.Analyse(Super['clip'], Super['data'], clip, "{ gpu:1, block:{w:"+str(block_size)+", h:"+str(block_size)+",overlap:"+str(block_over)+"} }")
fvec = core.svp1.Analyse(Super['clip'], Super['data'], clip, "{ gpu:1, block:{w:"+str(block_size)+", h:"+str(block_size)+",overlap:"+str(block_over)+",special:{delta: 1}} }")
backw = core.svp2.SmoothFps(clip,Super['clip'], Super['data'],bvec['clip'],bvec['data'],"{}") # here the frame rate is doubled
forw = core.svp2.SmoothFps(clip,Super['clip'], Super['data'],fvec['clip'],fvec['data'],"{}") # here the frame rate is doubled
# since backw and forw now have twice the frame count I drop half the frames
backw = ChangeFPS.ChangeFPS(backw,clip.fps_num,clip.fps_den)
forw = ChangeFPS.ChangeFPS(forw,clip.fps_num,clip.fps_den)
else:
#block size of MAnalyze, blksize 8 is much better for 720x576 noisy source than blksize=16
#block overlapping of MAnalyze 0! 2 or 4 is not good for my noisy b&w 8mm film source
i = core.mv.Super(clip, pel=2, sharp=2) # avs: i=MSuper(clip,pel=2, isse=false)
bvec = core.mv.Analyse(super=i,isb=True, blksize=block_size,overlap=block_over, delta=1, truemotion=True, chroma=True)
fvec = core.mv.Analyse(super=i,isb=False, blksize=block_size,overlap=block_over, delta=1, truemotion=True, chroma=True)
backw = core.mv.Flow(clip=clip,super=i,vectors=[bvec])
forw = core.mv.Flow(clip=clip,super=i,vectors=[fvec])
Quote:@Selur: I think that script FRED_Restoring_Blending_Cleaning.vpy with the necessary changes to include only the FRED restoring part could be added in ".\Hybrid\64bit\vsscripts"
The whole FRED part should be put in a function, with proper parameters and documentation.
Also, not adding a script that requires Avisynths dlls (here: ColorYUV2 and AutoLevels) Hybrids Vapoursynth scripts.
Cu Selur
Unfortunately I was unable to find any Vapoursynth substitute for ColorYUV and AutoLevels do you have any idea if they are available ?
Afaik. they do not exist.
They are listed them in my 'Things missing in Vapoursynth'-thread over in Doom9s forum.
Since these are missing for years, my hope to get a proper port for these is slim.
For ColorYUV, the old Vapoursynth doc stated that one should 'Do the adjustment yourself' with 'std.Lut/std.Expr'.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.