[MPlayer-dev-eng] [PATCH] EOSD support for VDPAU
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 22 17:21:03 CET 2009
On Sun, Feb 22, 2009 at 05:04:06PM +0100, Grigori G wrote:
> Thus I think an approach like in vo_gl might be a lot better. Something like
> a) allocating a big surface at output_surface resolution (or more, POT
> might be a better idea here)
> b) fitting glyphs into this surface with a simple greedy algorithm
> c) if it runs out of free space, a)
Yes, that was mostly my estimation for vo_gl, but with 2 points:
1) texture size is sometimes limited to 1024x1024
2) even rather simple greed fitting algorithms can be quite complex
I decided just to make a special case for really small images, reasoning
that if there are many large ones transfer times will start to get more
relevant compared to creating a new texture.
> > if (!found) {
> > j = eosd_max_surfaces;
> > eosd_surfaces = realloc(eosd_surfaces, eosd_max_surfaces * sizeof(*eosd_surfaces));
> > eosd_targets = realloc(eosd_targets, eosd_max_surfaces * sizeof(*eosd_targets));
> > }
>
> But is it really a good idea to realloc for each additional
> surface/target that is required? That'll be a lot of reallocs sometimes.
> With the new approach this will not be a problem...
Brainfart, after
> j = eosd_max_surfaces;
there was supposed to be
> eosd_max_surfaces *= 2;
More information about the MPlayer-dev-eng
mailing list