[MPlayer-dev-eng] [PATCH] Re : Re : Direct3D vo performance increase

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


On Mon, Nov 24, 2008 at 09:47:13PM +0000, Jim Hauxwell wrote:
> > What do you mean by "base layer"?
> > Also, for machines where alpha blending is too slow it is possible to
> > define FAST_OSD, which works without alpha blending.
> 
> The alpha and the color layer are both defined separately, which is not
> much use for a texture unit.  I need to think of a way to merge these
> two layers together to form a texture.

Merging them together into one texture is unlikely to do you any good,
actually I think it will make things harder.
Not that the MPlayer OSD (not EOSD) does not use alpha-blending but
something else:
video * alpha + osd
(note that there is no multiplication with (1-alpha) for the osd part).
While that is mostly to ease computation it actually does allow more
effects.
The bigger issue is that the alpha is stored in a way that the texture
unit can not make any use of, which is why vo_gl has this code:

  char *tmp = malloc(stride * h);
  // convert alpha from weird MPlayer scale.
  // in-place is not possible since it is reused for future OSDs
  for (i = h * stride - 1; i >= 0; i--)
    tmp[i] = -srca[i];

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list