[MPlayer-dev-eng] [PATCH] RFC: xv, composition managers and translucent windows

Ivan Kalvachev ikalvachev at gmail.com
Thu Mar 22 16:49:52 CET 2007


2007/3/22, Paul TT <paultt at hackerjournal.it>:
> On Tue, 20 Mar 2007 10:39:17 +0100
> Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
>
> > Hello,
> > On Tue, Mar 20, 2007 at 02:04:06AM +0100, Paul TT wrote:
> ....
> > > with a blue hue inside, and no video resulting. the patch simply
> > > lights up XV_ALPHA_MODE xv's attribute.
> > >
> ...
> > > what do you think?
> >
> > IMO there is no obviously correct setting for this so it should better
> > be handled by some config tool, e.g. xvattr. Esp. since you seem to
> > only want it because of a driver bug?
> > If the problem becomes widespread this can be explained in the FAQ.
>
> indeed is not a driver bug. wiht other drivers/arch/gpu's, it works the
> same.
> the real question is then: is it correct to let the xv window become
> translucent, then the vieo not visible, or is it better off to tell
> mplayer to fire up that xv attribute???
> i can't test it with a lot of drivers/arch/gpu's to get to a point where
> i could decide which is the 'correct' setting... friends of mine are
> testing this, if i'll get some 'statistic' values, i'll tell....
> thanx
> Pau8l

There are generally 2 types of video output surfaces.

One is called overlay and it operates as second stream. It is produced
from another memory region by another color-creation-engine and is
switched to be visible only if given color (called key-color or
colorkey) is present in the primary memory region.

The second type one is usually referred as blitter. It uses 2D/3D
operations to convert the color format to the desktop one and place it
in the visible primary memory region (aka desktop or framebuffer).


The blue color you are seeing is actually this  key-color. The thing
is that very few (and practically nearly non of the cheap cards)
support alpha-coded key-color. Even these that support it have rather
limited alpha channel.

My guess is that in your case the composite manager operates only in
the primary desktop, when there is transparency it combines the
key-color changing it to another blue color that doesn't trigger the
second stream.

Now, I donno what this attribute "XV_ALPHA_MODE" does, but it is not
visible on my video card (I don't see it with xvinfo). Is it present
only when composite stuff is running or it is available only on you
video card?
A little google search indicates it is something available on Radeon
cards (r300+).
There is also attribute "XV_OVERLAY_ALPHA" (range 0 to 255).

The thing is that this option may make the overlay stay always-on-top,
as it may allow transparency control through  the second attribute,
but without any way to indicate zones, so overlapping non-transparent
windows would look like they are bellow the video.

Oh, well if you have somewhere documentation what these radeon options
do, I'd like to get a URL.

Anyway, the preferred solution seems to be using video bitters because
s 2d/3d operations allow transparency.



More information about the MPlayer-dev-eng mailing list