[MPlayer-dev-eng] Re: Should I write Voodoo Banshee VIDIX driver?

Georgi Petrov gogothebee at yahoo.com
Mon Mar 22 08:44:56 CET 2004


Well... I understood everything you said.

When using tdfxfb as well as tdfx_vid YV12 is very slow. Under Windows I get
the same low performance with this format. Even in tdfxfb's source it's said
that one should use -vf yuy2, I quoue:

[***]
Use -vf yuy2 to get yuy2 rendering, *MUCH* faster than yv12
[***]

I just don't know why your Banshee performs faster in YV12. Even in DirectX's
sheets Banshee is said to support only YUY2 and something like e.g. YUYV (the
same). This makes me think that YV12 isn't native. Well, THE ONLY place, where
YV12 is at full speed is XVideo, but again - I'm not sure if it doesn't first
convert it by software to YUY2 and then pass it to video card, because every
other method, which use Banshee's hardware YV12 -> YUY2 seems to be really
slow.

Let's forget for a moment about planar YV12 and behave like it doesn't exist :)
Let's focus on packed YUY2 :)

A little off-topic:
With XFree86 4.3.0 and previous, I got an annoying flickering line (and with
another color: green or blue) in the bottom of the video, when using XVideo. I
used to fix it by -vf crop and giving for height -4 of the original size. This
was really stupid, because I had to check every movie's coordinates and then
apply -vf (Lately I made a script to do it for me :)

Yesterday I installed XFree86 4.4.0 and this bug is fixed :)  

New things, which I know now or want to ask:

Is the same problem with libvo allocating only a single buffer and doing DR on
fewer frames when -double isn't given valid for VIDIX? I mean: with VIDIX
drivers do you have to use -double to get more frames DRed?

Well, well, well, I found a bug in my driver :) Until now I was using the
address in VIDCUROVSTART to write to. I found that it's not 4 bytes aligned!
Now I must use LEFT/RIGHTOVBUF to set new one.

But I have a problem again! Yesterday I tried to fix it all day long, without
asking anyone, but I'm stuck. I understand the procedure like this:

1) Write to LEFTOVBUF the address in the video memory, from where the Banshee
should read to update the overlay. Do you have clever way to find this address?
And it should be just the offset from the 0 MB of it's memory, right? I mean -
if I want to write from the 8th MB, I set LEFTOVBUF to 8*1024*1024. Is it so,
because that's the value I pass to LEFTOVBUF.

2) Issue SWAPPENDING with value 0 (does it tells the video card, that only one
swap should be done on the next Vsync?)
3) Issue SWAPBUFCMD with value 1 and on the next Vsync, Banshee is supposed to
start reading from LEFTOVBUF (in my case - 8th MB)

BUT IT DOES NOT HAPPEND!

Even after waiting sleep(1) for the Vsync, I read VIDCUROVSTART and it's
pointing to the old value (somewhere around 13,3 MB). It should point to
8*1024*1024, right? I don't understand why it's not updated.

Why is there RIGHTOVBUF - what it's used for? When you do double buffering to
flip between LEFT/RIGHT? And how do you set your LEFT/RIGHT offsets? And why do
you set them both, don't you need only LEFT?

Oh, yes - I check wheter something is 4 bytes aligned this way:

if ((something & ~0x3) != something) it's not 4 bytes aligned

Well, that's for now. I'll wait you to answer, bacause I can't handle it myself
:(


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html




More information about the MPlayer-dev-eng mailing list