[FFmpeg-devel] [PATCH] Fix colors for DVD subtitles

Michael Niedermayer michaelni at gmx.at
Sun May 1 20:25:13 CEST 2011


On Sun, May 01, 2011 at 07:06:59PM +0200, Reimar Döffinger wrote:
> On Sun, May 01, 2011 at 06:45:34PM +0200, Alexandre Colucci wrote:
> > It's good but since you mention "simpler" the table is not needed at all, you can remove it entirely and replace the line:
> > 
> > level = (0xff * j) / nb_opaque_colors;
> > 
> > with:
> > 
> > level = (nb_opaque_colors > 1) ? (0xff * j) / (nb_opaque_colors - 1) : 0xff;
> 
> Well, that's exactly the part that I wanted to "simplify", it took
> me quite a long time to figure out with values this actually results in,
> the table seemed a rather obvious (and simpler to tweak, e.g. concerning
> rounding, though with the currently possible values rounding doesn't seem to matter)
> way.

maybe time to paint a coin blue on one side and green on the other
and flip it to decide what should be applied?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110501/d4b4962d/attachment.asc>


More information about the ffmpeg-devel mailing list