[MPlayer-dev-eng] Direct3D OSD discussion

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Nov 25 08:51:19 CET 2008


On Mon, Nov 24, 2008 at 11:31:21PM +0000, Jim Hauxwell wrote:
> 2) uses a L8A8 texture for the osd, so is correctly alphablended.
> note that even the gl driver has to map the inverted alpha value using
> software memory copy (line ~551 in vo_gl.c).  It should be possible to
> come up with a better way to do this.

I don't think so. Also
+            if(srca[x]){
+                dst[x]=(~srca[x] << 8) | src[x];
+            }
Why ~srca[x]? I think it should be -srca[x] (a quicker way of writing
~srca[x]+1).

> Please be aware that although the
> code may use a glTexSubImage2D() for upload the chances are this is SW
> in the driver.  It will use less memory bandwidth than the gl version as
> the gl version has no alpha test to reduce GPU loads from the
> framebuffer and its a two pass version.

I never really optimized the OSD-update for speed, never seemed relevant
even at fullscreen resolution (at least not compared to the font
rendering).
But, I can say that back when I tested it, it seemed that NVidia could
directly use L8 and A8 textures while it looked like L8A8 was converted
in software before transfer (it caused noticeably higher CPU load).
That was on an ancient TNT2 though...
Note that for blending that matches the other vos, one of your blend
settings should be D3DBLEND_ONE (the one that applies to the OSD
texture).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list