Log in

View Full Version : Looking for some filters,..


Selur
23rd March 2020, 09:49
Looking into what filters I'm missing to switch to Hybrid from using Avisynth+ 32bit to Avisynth+ 64bit I got quite a list of filters I could not find over at http://avisynth.nl/index.php/AviSynth%2B_x64_plugins and https://www.mediafire.com/folder/x6f7yqjufdg7c/Groucho%27s_Avisynth_Stuff

Here's the list:

AGC.dll <- HDRAG AGC (High Dynamic Range Automatic Gain Control) https://forum.doom9.org/showthread.php?t=93571
amDCT.dll <- amDCT (adaptive multipurpose DCT video filter) https://sites.google.com/site/amdctfilter/
asharp.dll <- aSharp http://www.avisynth.nl/users/warpenterprises/files/asharp_5F25_dll_20030118.zip
assrender.dll <- AssRender https://forum.doom9.org/showthread.php?t=148926
BucketMedian.dll <- BucketMedian https://github.com/chikuzen/BucketMedian/
channelmixer.dll <- Channel Mixer http://avisynth.nl/index.php/ChannelMixer
ColorBalance.dll <- Color Balance https://forum.doom9.org/showthread.php?t=139361
deblock_pp7.dll <- MPlayer PP7 Deblocking https://forum.doom9.org/showthread.php?t=172498
Decrawl.dll <- DeCrawl http://avisynth.nl/index.php/DeCrawl
Deen.dll && deen1b1.dll <- Deen http://avisynth.nl/index.php/Deen (Deen.dll used in EdgeCleaner)
DeVeed.dll <- DeVeed http://www.avisynth.nl/users/warpenterprises/files/deveed_20061226.zip
FanFilter.dll <- FanFilter http://www.avisynth.nl/users/vcmohan/FanFilter/FanFilter_src.zip
frfun7.dll <- FrFun7 http://avisynth.nl/index.php/Frfun7
ImageSequence.dll <- ImageSequence (http://avisynth.nl/index.php/ImageSequence) (I use this in Logo.avs)
LoadPluginEx.dll <- LoadPluginEx http://avisynth.nl/index.php/LoadOldPlugins (I use this to use PeachSmoother)
medianblur.dll <- MedianBlur https://forum.doom9.org/showthread.php?t=84636 (I need this for SuperToon.avs)
Motion_12Dec05.dll <- I need this for SalFps3 (http://avisynth.nl/index.php/SalFPS3)
NLMeansCL2.dll <- okay, I can drop this one for KNLMeansCL
nnedi.dll <- NNEDI https://forum.doom9.org/showthread.php?t=147695 (QTGMC dependency)
nnedi2.dll <- NNEDI2 https://forum.doom9.org/showthread.php?t=147695 (QTGMC dependency)
NoiseGenerator.dll <- Noise Generator http://www.avisynth.nl/index.php/NoiseGenerator
PeachSmoother.dll <- PeachSmoother https://www.avisynth.org.ru/docs/english/externalfilters/peachsmoother.htm
QTSource.dll <- QT Source http://www.avisynth.nl/index.php/QTSource (used to read pseudo MXF structure with a .mov pointer file)
Toon-v1.1.dll <- Toon http://avisynth.nl/index.php/Toon
unblock.dll <- UnBlock https://avisynth.org.ru/unblock/unblock.html
UnFilter.dll <- UnFilter http://avisynth.nl/index.php/UnFilter
Waifu2xAvisynth.dll <- Waifu2x https://github.com/sunnyone/Waifu2xAvisynth
warpsharp.dll <- WarSharp http://www.avisynth.nl/index.php/WarpSharp (for LimitedSharpenFaster with Smode=1)


Does anyone have 64bit compiles of one of these filters?

Thanks!

Cu Selur

Sharc
23rd March 2020, 10:11
Some are available from Groucho2002:

https://forum.doom9.org/showthread.php?t=173259

https://www.mediafire.com/folder/x6f7yqjufdg7c/Groucho%27s_Avisynth_Stuff

StainlessS
23rd March 2020, 10:46
This is what I've got


x64 plugs I've got [and so are available], there will be duplicates

system32:
fftw3.dll
libfftw3f-3.dll

C v2.5:
AvsInPaint.dll

v2.5:
avstp.dll
colormatrix.dll
decomb.dll
degrainmedian.dll
dither.dll
nicaudio.dll
removegrainhd.dll
tdeint.dll
vaguedenoiser.dll
variableblur.dll
viewaudio.dll

v2.6:
autoadjust.dll
autolevels.dll
average.dll
aviinfo.dll
avss.dll
awarpsharpmt.dll
cnr2.dll
colormatrix.dll
dctfilter.dll
deblock.dll
deflicker.dll
depan.dll
depanestimate.dll
descratch.dll
despot.dll
exactdedup.dll
fastblur.dll
fft3dfilter.dll
fillmargins.dll
flash3kyuu_deband.dll
fluxsmooth.dll
getsystemenv.dll
grid.dll
grunt.dll
imageseq.dll
mpeg2decplus64.dll
msharpen.dll
nnedi3.dll
pixelscope.dll
rawsourceplus.dll
remapframes.dll
requestlinear.dll
rgtools.dll
rotate.dll
showchannels.dll
smoothadjust.dll
sysinfo64.dll
tivtc.dll
tunsharp.dll
warp.dll
waveform.dll
yadifmod2.dll
yrangeaverage.dll

Plugins:
apparentfps.dll
autolevels.dll
average.dll
avsinit.avsi
avstp.dll
callcmd.dll
clipclop.dll
ddigittest.dll
deblock.dll
dfttest.dll
dither.avsi
dither.dll
fastblur.dll
fft3dfilter.dll
framesel.dll
grid.dll
grunt.dll
mdec2.dll
nicaudio.dll
nnedi3.dll
prune.dll
rgbadapt.dll
rgtools.dll
robocrop.dll
rt_stats.dll
showchannels.dll
subtitleex.dll
sysinfo64.dll
uglarm.dll
vaguedenoiser.dll
vsfilter64.dll
warp.dll
waveform.dll
yadifmod2.dll

MyPlugs: (probably a number missing, I just aint used them recently)
apparentfps.dll
callcmd.dll
clipblend.dll
clipboard.dll
clipclop.dll
demosaiccpp.dll
exactdedup.dll
example.dll
exblend.dll
framesel.dll
framestore.dll
fredaverage.dll
gammac.dll
gammatch.dll
mdec2.dll
prune.dll
qcombed.dll
randomsource.dll
rgbadapt.dll
rgbamplifier.dll
robocrop.dll
rt_stats.dll
scsc.dll
shuffle.dll
strfmt.dll
titlebar.dll
uglarm.dll
zebra.dll

Below from AvsInit MACHINE dll Load Conditional (on OS, AVS version, CPU intructions set) Folders

MACHINE_W7:
ffms2.dll
lsmashsource.dll
masktools2.dll
mvtools2.dll
removedirt.dll

MACHINE_XP_Avs+26:
masktools2.dll
mvtools2.dll

MACHINE_XP_Avs26Std:
ffms2.dll
masktools2.dll
removedirt.dll

MACHINE_XP_Avs25:
dgdecode.dll
ffms2.dll
lsmashsource.dll
masktools2.dll


I probably have a number more, but have never used, not tried [Think PeachSmoother is gonna be a no-go].

EDIT: Snapshot of my plugs[x64 only] as standing right now (~35MB, may need 7zip 19.0, Ultra Compression):- http://www.mediafire.com/file/7xh726u9o0i7we2/SSS_plugins_x64_20200323.7z/file
The MACHINE directory is part of avsInit.avsi

Selur
23rd March 2020, 11:21
@Sharc: thanks, I already checked Grouchos files
@Stainless: Thanks for sharing, sadly none of the filters I mentioned above is in your list. :/
-> Correction! descratch&desport are there. :)
Think PeachSmoother is gonna be a no-go
Yeah, PeachSmoother and CCD are probably no-gos. :/


Cu Selur

StainlessS
23rd March 2020, 11:30
Think Ydifmod2 is reccomended over yadif.

ChaosKing
23rd March 2020, 11:57
You can find some filters, like yadif, on some of the websites linked in http://avisynth.nl/index.php/AviSynth%2B_x64_plugins (scroll at the very bottom)

Selur
23rd March 2020, 14:24
@ChaosKing: There's only YadifMod, don't see any of the filters I listed there.
@Stainless: Hmm,... might have to settle with yadifmod

pinterf
23rd March 2020, 15:15
fturn-26.dll <- FTurn https://github.com/tp7/fturn
Fast turn was integrated into Avisynth+ core at the very beginning

MaskTools.dll <- MaskTools (I need it to use mftoon which uses MaskedMerge)
masktools2 has masked merge in mt_merge. If mftoon still uses old masktools, script has to be modded.


SplineResize.dll <- SplineResize http://www.wilbertdijkhof.com/SplineResize_v02.zip
Spline resizers are in Avisynth, what is it used for

VerticalCleaner.dll <- VerticalCleaner (QTGMC dependency)
I think it's in RgTools

SeregaDS
23rd March 2020, 15:25
CCD for VirtualDub (Camcorder color denoise) here is version 1.8 (32bit+64bit) (04.03.2018) : http://acobw.narod.ru/file/ccd.zip
Thanx for author.

ChaosKing
23rd March 2020, 15:44
@ChaosKing: There's only YadifMod, don't see any of the filters I listed there.
@Stainless: Hmm,... might have to settle with yadifmod

https://sites.google.com/site/avisynth64bitplugin/download
=> yadif_1.7_x64_asm.zip

Selur
23rd March 2020, 16:33
Nice!
Fast turn was integrated into Avisynth+ core at the very beginning
+
VerticalCleaner.dll <- VerticalCleaner (QTGMC dependency)
I think it's in RgTools

didn't know that! :)

MaskTools.dll <- MaskTools (I need it to use mftoon which uses MaskedMerge)
masktools2 has masked merge in mt_merge. If mftoon still uses old masktools, script has to be modded.
good, to know will look at the script.

CCD for VirtualDub (Camcorder color denoise) here is version 1.8 (32bit+64bit) (04.03.2018) : http://acobw.narod.ru/file/ccd.zip
Thanks!

https://sites.google.com/site/avisyn...lugin/download
=> yadif_1.7_x64_asm.zip
Thanks!

Cu Selur

Selur
24th March 2020, 21:11
btw for those interested:
##############################
##############################
## ##
## mfToon v0.52 by mf ^^; ##
## ##
## I would claim copyright, ##
## but as I do not give my ##
## real identity, I can't. ##
## So as netizen to net- ##
## izen, I ask you, please ##
## don't do lame stuff ##
## with my script, like ##
## claiming you made it. ##
## Thank you. ##
## ##
##############################
##############################
##
##
################################
################################
## ##
## Usage: ##
## ##
## Import("mfToon-v0.52.avs") ##
## mfToon() or mfToonLite() ##
## ##
################################
################################

# modified by Selur to use masktools2 instead of old masktools (1)

## substitute for MaskTools' missing /YV12Layer/, as used in mftoon
#see: https://forum.doom9.org/showthread.php?t=170439
function YV12Layer(clip A, clip B, string s, int i, bool "chroma", int "Y", int "V", int "U")
{
return A.Overlay(B, mode="multiply")
}

####
##
## New maskbuilding ("cartoon" edgedetection), and mfToon-lite to use in realtime in your
## ffdshow "AVISynth" section. It's not meant for encoding, only playback.
##
##

function mfToon(clip orig, int "twidth", int "theight", int "ssw", int "ssh", int "xstren", \
int "xthresh", bool "cwarp", bool "sharpen", int "strength", float "wdepth", int "wblur", \
float "wthresh", int "drange", float "dboost", int "dlimit", bool "debug", bool "doutput", \
string "dclip", bool "show", int "scolor") {

# normal params

strength = Default(strength, 255) # line darkening strength, 0-255
sharpen = Default(sharpen, true) # sharpening on/off
cwarp = Default(cwarp, true) # chroma warp on/off
cwarp2 = cwarp ? 1 : 0
wdepth = Default(wdepth, 16.0) # warping depth, ?-?
wblur = Default(wblur, 1) # warping blur level, ?-?
wthresh = Default(wthresh, 0.5) # warping threshold, 0.0-1.0
ssw = Default(ssw, 4) # supersample factor horizontally, 0-inf
ssh = Default(ssh, 4) # supersample factor vertically, 0-inf
twidth = Default(twidth, orig.width) # target width (useful for cropping), 0-inf
theight = Default(theight, orig.height) # target height (useful for cropping), 0-inf
show = Default(show, false) # show which lines are being darkened
scolor = Default(scolor, $FF00FF) # which color to show lines in

# advanced params

xstren = Default(xstren, 255) # xsharpening strength, 0-255
xthresh = Default(xthresh, 255) # xsharpening threshold, 0-255

## Where have all the params gone?! - They were useless as of 0.5, but I forgot to clean them.

drange = Default(drange, 64) # detail range, 0-255
dboost = Default(dboost, 1.0) # detail boost, 0.1-10.0
dlimit = Default(dlimit, 30) # detail limiter, 0-255
debug = Default(debug, false) # debug mode on/off
doutput = Default(doutput, true) # print debug info on processed image
dclip = Default(dclip, "rclip1") # which stage of the processing to show

ssw2 = twidth * ssw
ssh2 = theight * ssh
sharpen2 = show ? false : sharpen


orig.Unsharpmask(300, 4, 0)
sharp = last
mt_merge(sharp, orig.GreyScale(), orig)
sharp1 = last
mt_merge(sharp1, orig.GreyScale(), orig)
sharp2 = last

greymask = orig.Greyscale().Invert()

detailmaskpre0 = orig.mt_edge("cartoon", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate().mt_deflate().mt_deflate().mt_deflate()
detailmaskpre1 = orig.mt_edge("roberts", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate()
detailmaskpre2 = YV12Layer(detailmaskpre0, detailmaskpre1, "mul", 255, chroma=false, Y=3, V=1, U=1).Blur(1.0)
YV12Layer(detailmaskpre2, detailmaskpre2, "mul", 255, chroma=false, Y=3, V=1, U=1).Levels(0, 1.0, 190, 0, 255)
ConvertToYV12().Invert().mt_inflate().Invert()
detailmask = last
white = orig.mt_binarize(Y=-255,U=-128,V=-128)
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemask = (strength == 255) ? linemask1 : linemask1.levels(0, 1.0, 255, 0, strength)

color = BlankClip(orig, color=scolor)
sharp3 = show ? color : sharp2

dark = mt_merge(orig.Greyscale(), sharp3, linemask, Y=3, U=2, V=2)
darkmerged = dark.MergeChroma(orig)
finaldark = show ? dark : darkmerged

semifinal=orig.BicubicResize(twidth, theight, 0, 0.75)

final = dark.BicubicResize(ssw2, ssh2, 0, 0.75).XSharpen(xstren, xthresh) \
.BicubicResize(twidth, theight, 0, 0.75).MergeChroma(semifinal) \
.aWarpSharp(cm=cwarp2, depth=wdepth, blurlevel=wblur, thresh=wthresh)

rclip1 = sharpen2 ? final : finaldark
Eval("dclip1 = doutput ? "+dclip+" : orig")

dstring1 = "mfToon v0.52 by mf - Debug mode ;p"
dstring2 = "Pointsized: DisabledxDisabled"
dstring3 = "Bicubicsized: " + String(ssw2) + "x" + String(ssh2)
dstring4 = "Outputsize: " + String(twidth) + "x" + String(theight)
dstring5 = "Debug image: " + dclip
clipstring = sharpen2 ? "final" : "finaldark"
dstring6 = "Output image: " + clipstring

dclip2 = dclip1.Subtitle(dstring1).Subtitle(dstring2, y=33).Subtitle(dstring3, y=48) \
.Subtitle(dstring4, y=63).Subtitle(dstring5, y=78).Subtitle(dstring6, y=93)
rclip2 = debug ? dclip2 : rclip1

return rclip2
}

function mfToonLite(clip orig, int "twidth", int "theight", int "strength", int "dstren", int \
"drange", float "dboost", int "dlimit", string "mask") {

# normal params

strength = Default(strength, 255) # line darkening strength, 0-255
mask = Default(mask, "fastest") # quality of the mask

# advanced params

dstren = Default(dstren, 255) # detail strength, 0-255
drange = Default(drange, 64) # detail range, 0-255
dboost = Default(dboost, 1.0) # detail boost, 0.1-10.0
dlimit = Default(dlimit, 30) # detail limiter, 0-255

orig.Unsharpmask(200, 4, 0)
sharp = last
mt_merge(sharp, orig.GreyScale(), orig)
sharp1 = last
mt_merge(sharp1, orig.GreyScale(), orig)
sharp2 = last

greymask = orig.Greyscale().Invert()
white = orig.mt_binarize(Y=-255,U=-128,V=-128)

## slowest

detailmaskpre = orig.mt_edge("sobel", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate()
detailmaskpre2 = YV12Layer(detailmaskpre, detailmaskpre, "mul", 255, chroma=false, Y=3, V=1, U=1).Blur(1.0)
YV12Layer(detailmaskpre2, detailmaskpre2, "mul", 255, chroma=false, Y=3, V=1, U=1).Levels(0, 1.0, 190, 0, 255)
ConvertToYV12().Invert().mt_inflate().Invert()
detailmask = last
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemaskslowest = (strength == 255) ? linemask1 : linemask1.levels(0,1.0,255,0,dstren)

## fastest

orig.Unsharpmask(100).mt_edge("sobel", 3, 255, 255, 255, Y=3, V=1, U=1) \
.GreyScale().mt_inflate().Invert().mt_inflate().Invert()
detailmask = last
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemaskfastest = (strength == 255) ? linemask1 : linemask1.levels(0,1.0,255,0,dstren)

linemask = (mask == "fastest") ? linemaskfastest : linemaskslowest

dark = mt_merge(orig, sharp2, linemask, Y=3, U=2, V=2)

return dark
}


Cu Selur

Reel.Deel
24th March 2020, 21:31
btw for those interested:


Selur, that script still uses YV12Layer which is part of the MaskTools V1.

BTW, a version that uses MaskTools2 has been up on the wiki for a while: http://avisynth.nl/index.php/MfToon

ChaosKing
24th March 2020, 22:25
btw for those interested:
##############################
##############################
## ##
## mfToon v0.52 by mf ^^; ##
## ##
## I would claim copyright, ##
## but as I do not give my ##
## real identity, I can't. ##
## So as netizen to net- ##
## izen, I ask you, please ##
## don't do lame stuff ##
## with my script, like ##
## claiming you made it. ##
## Thank you. ##
## ##
##############################
##############################
##
##
################################
################################
## ##
## Usage: ##
## ##
## Import("mfToon-v0.52.avs") ##
## mfToon() or mfToonLite() ##
## ##
################################
################################

# modified by Selur to use masktools2 instead of old masktools (1)

## substitute for MaskTools' missing /YV12Layer/, as used in mftoon
#see: https://forum.doom9.org/showthread.php?t=170439
function YV12Layer(clip A, clip B, string s, int i, bool "chroma", int "Y", int "V", int "U")
{
return A.Overlay(B, mode="multiply")
}

####
##
## New maskbuilding ("cartoon" edgedetection), and mfToon-lite to use in realtime in your
## ffdshow "AVISynth" section. It's not meant for encoding, only playback.
##
##

function mfToon(clip orig, int "twidth", int "theight", int "ssw", int "ssh", int "xstren", \
int "xthresh", bool "cwarp", bool "sharpen", int "strength", float "wdepth", int "wblur", \
float "wthresh", int "drange", float "dboost", int "dlimit", bool "debug", bool "doutput", \
string "dclip", bool "show", int "scolor") {

# normal params

strength = Default(strength, 255) # line darkening strength, 0-255
sharpen = Default(sharpen, true) # sharpening on/off
cwarp = Default(cwarp, true) # chroma warp on/off
cwarp2 = cwarp ? 1 : 0
wdepth = Default(wdepth, 16.0) # warping depth, ?-?
wblur = Default(wblur, 1) # warping blur level, ?-?
wthresh = Default(wthresh, 0.5) # warping threshold, 0.0-1.0
ssw = Default(ssw, 4) # supersample factor horizontally, 0-inf
ssh = Default(ssh, 4) # supersample factor vertically, 0-inf
twidth = Default(twidth, orig.width) # target width (useful for cropping), 0-inf
theight = Default(theight, orig.height) # target height (useful for cropping), 0-inf
show = Default(show, false) # show which lines are being darkened
scolor = Default(scolor, $FF00FF) # which color to show lines in

# advanced params

xstren = Default(xstren, 255) # xsharpening strength, 0-255
xthresh = Default(xthresh, 255) # xsharpening threshold, 0-255

## Where have all the params gone?! - They were useless as of 0.5, but I forgot to clean them.

drange = Default(drange, 64) # detail range, 0-255
dboost = Default(dboost, 1.0) # detail boost, 0.1-10.0
dlimit = Default(dlimit, 30) # detail limiter, 0-255
debug = Default(debug, false) # debug mode on/off
doutput = Default(doutput, true) # print debug info on processed image
dclip = Default(dclip, "rclip1") # which stage of the processing to show

ssw2 = twidth * ssw
ssh2 = theight * ssh
sharpen2 = show ? false : sharpen


orig.Unsharpmask(300, 4, 0)
sharp = last
mt_merge(sharp, orig.GreyScale(), orig)
sharp1 = last
mt_merge(sharp1, orig.GreyScale(), orig)
sharp2 = last

greymask = orig.Greyscale().Invert()

detailmaskpre0 = orig.mt_edge("cartoon", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate().mt_deflate().mt_deflate().mt_deflate()
detailmaskpre1 = orig.mt_edge("roberts", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate()
detailmaskpre2 = YV12Layer(detailmaskpre0, detailmaskpre1, "mul", 255, chroma=false, Y=3, V=1, U=1).Blur(1.0)
YV12Layer(detailmaskpre2, detailmaskpre2, "mul", 255, chroma=false, Y=3, V=1, U=1).Levels(0, 1.0, 190, 0, 255)
ConvertToYV12().Invert().mt_inflate().Invert()
detailmask = last
white = orig.mt_binarize(Y=-255,U=-128,V=-128)
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemask = (strength == 255) ? linemask1 : linemask1.levels(0, 1.0, 255, 0, strength)

color = BlankClip(orig, color=scolor)
sharp3 = show ? color : sharp2

dark = mt_merge(orig.Greyscale(), sharp3, linemask, Y=3, U=2, V=2)
darkmerged = dark.MergeChroma(orig)
finaldark = show ? dark : darkmerged

semifinal=orig.BicubicResize(twidth, theight, 0, 0.75)

final = dark.BicubicResize(ssw2, ssh2, 0, 0.75).XSharpen(xstren, xthresh) \
.BicubicResize(twidth, theight, 0, 0.75).MergeChroma(semifinal) \
.aWarpSharp(cm=cwarp2, depth=wdepth, blurlevel=wblur, thresh=wthresh)

rclip1 = sharpen2 ? final : finaldark
Eval("dclip1 = doutput ? "+dclip+" : orig")

dstring1 = "mfToon v0.52 by mf - Debug mode ;p"
dstring2 = "Pointsized: DisabledxDisabled"
dstring3 = "Bicubicsized: " + String(ssw2) + "x" + String(ssh2)
dstring4 = "Outputsize: " + String(twidth) + "x" + String(theight)
dstring5 = "Debug image: " + dclip
clipstring = sharpen2 ? "final" : "finaldark"
dstring6 = "Output image: " + clipstring

dclip2 = dclip1.Subtitle(dstring1).Subtitle(dstring2, y=33).Subtitle(dstring3, y=48) \
.Subtitle(dstring4, y=63).Subtitle(dstring5, y=78).Subtitle(dstring6, y=93)
rclip2 = debug ? dclip2 : rclip1

return rclip2
}

function mfToonLite(clip orig, int "twidth", int "theight", int "strength", int "dstren", int \
"drange", float "dboost", int "dlimit", string "mask") {

# normal params

strength = Default(strength, 255) # line darkening strength, 0-255
mask = Default(mask, "fastest") # quality of the mask

# advanced params

dstren = Default(dstren, 255) # detail strength, 0-255
drange = Default(drange, 64) # detail range, 0-255
dboost = Default(dboost, 1.0) # detail boost, 0.1-10.0
dlimit = Default(dlimit, 30) # detail limiter, 0-255

orig.Unsharpmask(200, 4, 0)
sharp = last
mt_merge(sharp, orig.GreyScale(), orig)
sharp1 = last
mt_merge(sharp1, orig.GreyScale(), orig)
sharp2 = last

greymask = orig.Greyscale().Invert()
white = orig.mt_binarize(Y=-255,U=-128,V=-128)

## slowest

detailmaskpre = orig.mt_edge("sobel", 3, 255, 255, 255, Y=3, V=1, U=1) \
.Tweak(0.0, 1.0, drange, 1.0).Levels(60, dboost, 255, 0, 255) \
.Levels(0, dboost, dlimit, 255, 0).GreyScale().mt_inflate()
detailmaskpre2 = YV12Layer(detailmaskpre, detailmaskpre, "mul", 255, chroma=false, Y=3, V=1, U=1).Blur(1.0)
YV12Layer(detailmaskpre2, detailmaskpre2, "mul", 255, chroma=false, Y=3, V=1, U=1).Levels(0, 1.0, 190, 0, 255)
ConvertToYV12().Invert().mt_inflate().Invert()
detailmask = last
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemaskslowest = (strength == 255) ? linemask1 : linemask1.levels(0,1.0,255,0,dstren)

## fastest

orig.Unsharpmask(100).mt_edge("sobel", 3, 255, 255, 255, Y=3, V=1, U=1) \
.GreyScale().mt_inflate().Invert().mt_inflate().Invert()
detailmask = last
linemask1 = mt_merge(white.ConvertToYV12(), detailmask, orig.Invert().ConvertToYV12()).Invert()
linemaskfastest = (strength == 255) ? linemask1 : linemask1.levels(0,1.0,255,0,dstren)

linemask = (mask == "fastest") ? linemaskfastest : linemaskslowest

dark = mt_merge(orig, sharp2, linemask, Y=3, U=2, V=2)

return dark
}


Cu Selur
I will quote myself

I also noticed something... there is detailmaskpre0, detailmaskpre1, detailmaskpre2 in mftoon, but it is not used anywhere in the script later and slows down by a factor of 10
When I uncomment the lines -> 13fps vs 150fps, same output. That's why the dboost parameter did nothing for me xD
see https://forum.doom9.org/showthread.php?t=174502

latest VS version here https://github.com/theChaosCoder/lostfunc if you want to fix mftoon

Selur
25th March 2020, 09:21
Thanks for the info, will look into it. :)

StainlessS
1st July 2020, 15:51
Yeah, PeachSmoother and CCD are probably no-gos. :/
Not any more.
https://forum.doom9.org/showthread.php?p=1917197#post1917197

Selur
2nd July 2020, 15:38
Nice! Thanks for the info!