View Full Version : X-Logo ported to Avisynth 2.0.X


Leuf
18th April 2003, 16:15
Finally got round to mucking around with the sdk and simple sample enough to port X-Logo, a filter for removing transparent and solid logos, as I've been requested to do a few times.

So far it's RGB32 only. I hope to get YUY2 support for at least the transparent processing in the near future, but I'm not sure how it will work in another colorspace.

Get it here (http://members.verizon.net/~vze3kkvm/filters.html)

Try not to laugh too much at the source.

poptones
18th April 2003, 16:56
Just for kicks, compare it's execution time to this (which also works in RGB32 only)

function dekafka(clip clip, clip mask, int "Xstart", int "Ystart", int "X",
\ int "Y", int "Amount")
{
ytop = Ystart
ybot = Ystart + Y

topline = clip.Crop(Xstart,ytop,X,1)
bottomline = clip.Crop(Xstart,ybot,X,1)
logosrc = StackVertical(topline,bottomline).Blur(1.5,0).BilinearResize(X,Y)

masklogo = mask.BilinearResize(X,Y)
logo = logosrc.mask(masklogo)

#now cover up that ******** logo...
clip = clip.Layer(logo,"add",Amount,Xstart,Ystart)
return clip
}

Leuf
18th April 2003, 17:42
You'd have to tell me a bit more how to use it.

For transparent logos X-logo is very fast if you use no or minimal blurring, especially for white logos as that just uses a lookup table. The interpolator is pretty slow, as is the bluring routine. It's all very unoptimized, but the saving grace is that logos are usually pretty small. If someone wants to tackle optimizing it I wouldn't say no ;) I'm at the limits (and perhaps a bit beyond) of my programming ability as it's written now.