[MPlayer-dev-eng] Re: [MPlayer-users] color of subtitles

Michael Niedermayer michaelni at gmx.at
Sat Nov 2 19:10:16 CET 2002


Hi

On Saturday 02 November 2002 18:11, Jindrich Makovicka wrote:
> ?? wrote:
> >Hi,
> >
> >>That's great as I don't know much about spudec. It would be useful to
> >>coordinate our work a bit. The approach I am using is just adding
> >>another buffer which will contain the palette indices, so we'll have
> >>8-bit alpha, luma, and palette. The palette lookups will be done in the
> >>osd.c. This means that the other layers don't have to care much about
> >>the various colorspaces.
> >
> >but planar mode like YUV have different resolution for U,V planes, now
> > MPlayer only use Y. If we want to use color subs, we need to scale image
> > for different colorspaces, or we can change the structure of subtitle
> > code to detect colorspace before scale/generate subtitles.
>
> Actually I have the code almost working, at least for xv, x11 and sdl,
> and yv12, yuy2 and rgb. Of course the U&V planes need rescaling but I
> think ot can be done in osd_template.c (and I currently do it this way).
[...]

IMHO using a palete for color subs is a bad idea
1. it cant be done in MMX
2. no true-color pixmaps :((

i would suggest the following approch for color subs:
1. generate pictures of all chars & colors in RGB32
2. convert these to the same colorspace as the output buffer
3. simply render them (the nice sideeffect is that all formats except 
RGB15/16) can be handled by the same osd render function, so there is less 
code to optimize and its simpler & faster IMHO

Michael



More information about the MPlayer-dev-eng mailing list