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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon May 2 19:52:21 CEST 2011


On Mon, May 02, 2011 at 08:57:29AM +0200, Alexandre Colucci wrote:
> 
> On 1 mai 2011, at 20:25, Michael Niedermayer wrote:
> 
> > 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?
> 
> I find my patch simpler but both patches are equivalent, so I am ok to apply both of them.

Since for now I'll probably be closest to a maintainer for it I'll
consider my preferences more important :-)
Pushed.


More information about the ffmpeg-devel mailing list