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

陆然 hephooey at fastmail.fm
Sat Nov 2 17:41:26 CET 2002


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.

> 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,

-- 
Best Regard,
LR




More information about the MPlayer-dev-eng mailing list