matfra
14th August 2012, 02:46
Hi,
I found a fonction call BlockKiller on this thread. Its working very well to remove block and smooth shadow.
I made a ASVI of it, with all the function needed.
I cannot have it work in Mt mode. Its really slow by itself. Can someone help me to tweak it please.
BlockKiller ()
function BlockKiller(clip source)
{
y=source.greyscale()
y=y.ChannelBlockKiller()
u=source.utoy()
u=u.ChannelBlockKiller()
v=source.vtoy()
v=v.ChannelBlockKiller()
return ytouv(u, v, y)
}
function ChannelBlockKiller(clip source)
{
source
""" spline36resize(source.width*16,source.height*16)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width*8,source.height*8)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror() """
spline36resize(source.width*4,source.height*4)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width*2,source.height*2)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width,source.height)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
return last
}
# Border processing fix for GrandFun by MugFunky and Alain2
# Edit by Soulhunter: Changed strength from int -> float
Function GradFunkMirror( clip c, float "strength" )
{
strength = default( strength, 1.1)
w = c.width()
h = c.height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()
stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
\ stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) ),
\ hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
gradfun2db( strength )
crop( 16, 16, -16, -16 )
Return last
}
I found a fonction call BlockKiller on this thread. Its working very well to remove block and smooth shadow.
I made a ASVI of it, with all the function needed.
I cannot have it work in Mt mode. Its really slow by itself. Can someone help me to tweak it please.
BlockKiller ()
function BlockKiller(clip source)
{
y=source.greyscale()
y=y.ChannelBlockKiller()
u=source.utoy()
u=u.ChannelBlockKiller()
v=source.vtoy()
v=v.ChannelBlockKiller()
return ytouv(u, v, y)
}
function ChannelBlockKiller(clip source)
{
source
""" spline36resize(source.width*16,source.height*16)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width*8,source.height*8)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror() """
spline36resize(source.width*4,source.height*4)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width*2,source.height*2)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
spline36resize(source.width,source.height)
gradfunkmirror()
gradfunkmirror()
gradfunkmirror()
return last
}
# Border processing fix for GrandFun by MugFunky and Alain2
# Edit by Soulhunter: Changed strength from int -> float
Function GradFunkMirror( clip c, float "strength" )
{
strength = default( strength, 1.1)
w = c.width()
h = c.height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()
stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
\ stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) ),
\ hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
gradfun2db( strength )
crop( 16, 16, -16, -16 )
Return last
}