[MPlayer-dev-eng] Re: [MPlayer-users] color of subtitles
Michael Niedermayer
michaelni at gmx.at
Sat Nov 2 20:07:29 CET 2002
Hi
On Saturday 02 November 2002 19:42, Jindrich Makovicka wrote:
> Michael Niedermayer wrote:
> >IMHO using a palete for color subs is a bad idea
> >1. it cant be done in MMX
> >2. no true-color pixmaps :((
>
> you mean fonts as 24-bit pixmaps?
yes
> isn't it overkill?
perhaps, but it could look really nice :)))
>
> >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
>
> maybe it would be enough to do these two in draw_alpha_buf
yes, good idea, it seems the osd/sub/font stuff is different now relative to
the last time i looked at it ...
btw, note, 2. can be done easiely with the swscaler
>
> >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
>
> what do you mean by "simply" ? in yv12 and yuy2 you still have to deal
> with the chroma subsampling (it can't be done sooner because chroma
> depends on the x&y position).
?!
if u have a font in YV12 and render it into an YV12 buffer then the operation
is identical to 3 gray font + gray buffers, except that the u & v buffers are
1/4 the size
for YUY2 font & YUY2 buffer its just 1 buffer with 2 bytes per pixel
Michael
More information about the MPlayer-dev-eng
mailing list