All pastes #1492443 Raw Edit

LetDaddyHaveALittleLick.avsi

public text v1 · immutable
#1492443 ·published 2009-07-12 08:11 UTC
rendered paste body
#####################################################################
#                                                                   #
# Required plugins: aWarpSharp.avsi /  AAA.avsi / Deblock.dll       #
#                   deen.dll / dftest.dll / DeHalo_Alpha.avsi       #
#                   LimitedSharpenFaster.avsi / Toon.dll /          #
#                   gradfun2dbmod                                   #
#                                    Because PandoraHearts sucks.   #
#                                                                   #
#####################################################################
#####################################################################
#####################################################################



function LetDaddyHaveALittleLick ( clip input, int "Xres", int "Yres", float "scale", float "linestr", 
 \                  int "dQuant", int "bOffset", int "dBlur", int "qBlur", float "thBlur", 
 \                  int "shrpstr",  bool "Deblock",  bool "AA", bool "Sharp", bool "Dehalo" ) 
{
o       = input
Xres    = default( Xres,     1280 ) # Output width
Yres    = default( Yres,      720 ) # Output height
scale   = default( scale,     1.5 ) # Scales resolution for filtering
linestr = default( linestr,  0.15 ) # Line darken strength
dQuant  = default( dQuant,     33 ) # Deblock strength
bOffset = default( bOffset,     0 ) # Deblock Offset
dBlur   = default( dBlur,      12 ) # Blur strength
qBlur   = default( qBlur,       4 ) # Blur "quality"
thBlur  = default( thBlur,    0.3 ) # Blur threshold
shrpstr = default( shrpstr,   200 ) # Sharpen strength
Deblock = default( deblock,  true ) # Toggle deblock
AA      = default( AA,       true ) # Toggle AA
Sharp   = default( Sharp,    true ) # Toggle Sharpening
Dehalo  = default( Dehalo,   true ) # Toggle Dehaloing
Xres2   = Floor(m2(Xres*scale))
Yres2   = Floor(m2(Yres*scale))

i = (linestr > 0) ? o.Toon(linestr) : o
i = (Deblock==true) ? o.Deblock(quant=dQuant, bOffset=bOffset) : o


i = i.dfttest()


i = (AA==true) ? o.AAA(Chroma=true) : o
i = i.Spline64Resize(Xres2,Yres2)


i = i.aWarpSharp(depth=dBlur,blurlevel=qBlur,thresh=thBlur,cm=1)
i = (Sharp==true) ? o.LimitedSharpenFaster(edgemode=1,strength=shrpstr) : o

i = i.deen("a2d",3,6,6)
i = i.Dehalo_alpha()


i = i.Spline36Resize(Xres,Yres)
i = i.gradfun2dbmod()
Return(i)
}

function m2(float num)
{
 return int(num / 2) * 2
}