[MPlayer-users] color of subtitles
Jindrich Makovicka
makovick at kmlinux.fjfi.cvut.cz
Sat Nov 2 11:00:03 CET 2002
?? wrote:
>I'm trying to do the same thing these days ;) if you want color subs, you need
>to change libvo/sub.c and spudec.c to give the subs color, I'm working on
>spudec.c now, what I'm worry about is if you add color, the subs must be
>scaled 3 times, every plane need rescale. I don't know if the speed is fast
>enough to do this. but text subs seems don't have scaled problem :).
>
>
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.
The draw_alpha prototype will then look like
static void draw_alpha( int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, unsigned char *srcp, int stride)
where srcp is the palette buffer. srcp[x] = 0 means no chroma change,
srcp[x] != 0 means the corresponding palette entry
Regards,
--
Jindrich Makovicka
More information about the MPlayer-users
mailing list