[MPlayer-dev-eng] Colored subtitles

Alban Bedel albeu at free.fr
Wed Nov 6 17:15:29 CET 2002


Hi Jindrich Makovicka,

on Tue, 05 Nov 2002 19:21:19 +0100 you wrote:

> Hello,

Hi,
first note that i didn't tried the patch nor studied it deeply. So if i'm wrong excuse me.

> here is a patch for 24-bit color subtitles. Current version is broken 
> but I am sending it to allow coordination with the color support for spudec.
> The subtitles are first rendered in 24-bit RGB+A into obj->rgb_buffer & 
> obj->alpha_buffer and then converted from RGB to destination colorspace 
> into obj->dest_buffer using vo_convert_osd_format(). Spudec currently 
> uses some other way of buffering but IMO it'll be reasonable to make it 
> use the buffering code from sub.c too.
Imho color space conversion should be done only once. Converting all the time
is a waste of cpu time (even if you have too much idle time there's some better way
to use it ;)

> Stuff that (probably) works: xv (YV12) x11 (tested with 32bit), sdl (32bit)
> Stuff that surely doesn't work: spudec, aalib, anything yuy2 & uyvy
> 
> Interface changes: vo_draw_text and vo_remove_text now have one more 
> argument for desired image format, vo_draw_alpha_yv12 has additional 
> args for more layers.
I think that it must be done in some other way. First I still want the old osd that
only use the Y plane as it's faster. And i don't think that it's a good idea to modify
the existing vo_draw_alpha_* funcs as most of them (all ?) are optimized for x86.

Imho we should keep the existing stuff in the vo as is. Write some _new_ drawing
funcs that support colors, etc. Use this in the expand filter as an alternative osd
mode. Then it could be added to the vo wich really need a special osd support
via control.

	Albeu




More information about the MPlayer-dev-eng mailing list