[MPlayer-dev-eng] [Patch] Subtitles colors problem.

salvador salvador at inti.gov.ar
Fri Apr 26 18:04:34 CEST 2002


½ Ȼ wrote:

> I don't know if the alpha[4] in spudec.c will always not change in a single
> movie. but seems like in many movie it does, so I think the code can
> generate palette just once, then it can just use it. just guessing, maybe
> I'm wrong.

The streams I tested ever set the same values, so I also thinked about
computing it just once.  But I think the overhead of computing this palette is
really small and subtitles frequency is in the order of seconds.
I never saw a stream that changed subtitles colors on the fly, but the fact
that all the streams I tested sets the colors and alpha all the time makes me
think this is a feature in the standard that we can't overlook.
Maybe I can add code to check if the new alpha/colormap really changed, if no
change was found I can keep the old palette.
BTW: I'm doing a risky guess: I compute the palette only after an alpha
change. I don't know the format, but maybe a stream can set the colormap and
not the alpha ...

A question: what data type should I use to get a 32 bits value in all
architectures? (is u32 defined?)

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set at computer.org set at ieee.org
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013






More information about the MPlayer-dev-eng mailing list