View Full Version : Xlogo - HowTo ?


lupus11
1st September 2005, 09:33
Hello,

I try to use the Xlogo filter in my avisynth (2.5) script.
As the homepage of the filter is currently not available I
have some trouble in setting it up, because I do not have any
manual.

Can anybody give me any hints about how to setup the
filter bmp ?

Thank You
lupus

iradic
1st September 2005, 10:56
The best is to get xlogo filter version for VDub and read the docs!

Text bellow comes with xlogo avs version ... don't know is anything changed in recent versions.

--xlogoavs.txt
Syntax:

Xlogo(Clip, filename, X, Y, ALPHA, T1, T2, T3, B1, B2, B3, WHITE,
SIDE, SCENE, FEATHER, NOISE, BLEND, FADEIN, FADEOUT)

filename:
Filename of the first logo bitmap. Uses same naming
convention as vdub version. The first file must
end in 0.bmp or 2.bmp

X:
Horizontal position of left edge of the bitmap

Y:
Vertical position of top edge of bitmap

ALPHA:
Transparency over range 0-255.0 gives all interpolated
result, 255 gives all transparent processing result.
Default is 255.

T1:
On the first interpolation pass any pixel for which the
difference of the two source pixels exceed this threshold
will not be processed. Default is 10.

T2:
Same as T1 but for the second pass. Default is 25.

T3:
The third pass is done 4 way, unless the 2 pixels differ by
more than T3, in which case it reverts back to 2 way.
Default is 40.

B1:
Number of blur passes done on the interpolated pixels that
pass the first two thresholds. Default is 5.

B2:
Number of blur passes done on the remainder of the
interpolated pixels. Default is 20.

B3:
Number of blur passes done on the entire bitmap area.
Default is 10.

WHITE:
White level, used only for white transparent processing
(see vdub docs) Default is 230.

SIDE:
Pre-Interpolates one side of the image (see vdub docs)
0 for no side, 1 top, 2 right, 3 bottom, 4 left.
Default is 0.

SCENE:
If fewer than this percentage of border pixels have changed
by T1 then the previous frame is used instead of
calculating the new frame. Helps reduce flicker and
decreases processing time.

FEATHER:
Feathers edges of bitmap blur this number of pixels. Your
bitmap should be this number of pixels larger than the logo.
Default is 8.

NOISE:
Adds random noise of this magnitude after blurring to try
to make the blurring less obvious. Default is 0.

BLEND:
(BOOL) Blends interpolated pixels with the previous frame
between 0 and 50% depending on amount of change in the
border pixels from the previous frame.The greater the
change the less influence the previous pixel has. Setting
SCENE=0 and BLEND=TRUE should give more natural results but
increase encoding time. Default is true.

FADEIN:
Forces ALPHA=0 starting at frame 0 for this duration.

FADEOUT:
Forces ALPHA=0 from last frame for this duration.

Sample usage:

Use "c:/logo_0.bmp" at x=300, y=200, alpha=180 with all others default:

LoadPlugin("c:/avisynth/xlogo.dll")
AviSource("c:/foo.avi")
Xlogo("c:/logo_0.bmp",300,200,180)


Notes:
For YUY2 and YV12 clips X-Logo internally processes as RGB
by invoking crop, converttoRGB32(), processing as RGB,
converting back to YUY2 or YV12, and then overlaying the
result back on the source. This is much faster than
converting the entire frame. However, if you were going to
convert to RGB later anyway you aren't going to get any
speed improvements from delaying it.

When making your bitmaps for transparent processing if the
source is not RGB then consider loading it with avisynth
and converttoRGB32() to be sure than the bitmap and the
frames fed to X-Logo have been decoded from the source in
the same way.

Didée
1st September 2005, 11:35
@ lupus11

Won't hold you back from using Xlogo, but still ...

This (http://forum.gleitz.info/showthread.php?t=15004) is the thread for you.

A guide is located in this (http://forum.gleitz.info/showpost.php?p=169341&postcount=130) post. (But read on, some updates were posted later in that thread.)

Some result examples are here (http://forum.doom9.org/showthread.php?s=&postid=518035#post518035) (in the iiP thread) - and these are even old ;)

Pretty much to read, yes ... but surely worth the effort. :)

lupus11
1st September 2005, 14:19
@iradic: I tried to find the VD version, however it seems to be hosted on the same not reachable URL. But thanks for posting the readme, this will definitely help.

@Didée: I have been using DeLogo for several years already (in fact I started with a guide from you). I just wanted to give Xlogo a try for speed reasons. As far as I could read the main part of the frame stays in YV12 only the logo part is converted to RGB and back. This sounds promising to me. I read about the color shift concerns for just converting a part of the color space, however I would like to give it a try myself. Thanks anyway.

lupus

Didée
1st September 2005, 15:05
I just wanted to give Xlogo a try for speed reasons. As far as I could read the main part of the frame stays in YV12 only the logo part is converted to RGB and back. This sounds promising to me.
Coincidentially, that's exactly how my guided method is working. If Xlogo still is faster, it can't be much. Perhaps it's even slower ... I never compared their speedwise performance, though.


I read about the color shift concerns for just converting a part of the color space
... for which we already came up with a solution in the mentioned thread (read from here (http://forum.gleitz.info/showpost.php?p=211834&postcount=479). I just haven't come round yet to implement it :(

lupus11
1st September 2005, 16:53
@Didée

Sorry, I forgot rule #1 : Read before write. I just had a quick look over your guide, thinking it
was the one I knew already. But after having a closer look at your methods I understand, you do it exactly the way xlogo does it, just by the use of scripting. Well, I have been using avisynth for ages (since I bought my first DVB card sevaral years ago) however I had never been too deep into scripting. I was watching your thread about LimitedSharpen and was amazed by the results but never got time to really dig deeper.

So again, with your new guide and the help of the mentioned theard (Man: What a monster thread, 53 pages) I will give Delogo another try.

Thanks again for you quick help

lupus