[FFmpeg-devel] [PATCH] Fix colors for DVD subtitles
Reimar.Doeffinger at gmx.de
Sat Apr 23 22:10:52 CEST 2011
On Sat, Apr 23, 2011 at 12:46:09PM -0700, Baptiste Coudurier wrote:
> On 4/23/11 8:41 AM, Reimar Döffinger wrote:
> > On Thu, Apr 21, 2011 at 11:25:33AM +0200, Alexandre Colucci wrote:
> >> Hi,
> >> This patch fixes the DVD subtitle colors/alpha info. See screenshots for before and after the patch.
> > I don't think that is correct.
> > First, the yellow colour was chosen on purpose, and a lot of DVDs
> > use yellow but in principle one is as good as the other.
> > Secondly the function is called guess_palette for a reason:
> > It is a guess. It will be wrong. But so will yours.
> > Unless you have very good data to believe that yours actually
> > works better significantly more often I don't think there's a
> > good reason to change the code.
> Well, I think yellow is ugly personally, I like the patch if it works in
> a lot of cases.
Well, I don't particularly mind that part, but it definitely shouldn't
be committed as a "fix", it does not fix anything it just changes the
For the other part I definitely want a bit more proof of usefulness,
there is no value in it if we end up mindlessly switching back and
forth between equally bad solutions just depending on which broken
DVD images someone has.
Note that in most cases after decoding the first subtitle it should
be possible to guess quite reliably by analyzing the image, but it
is going to be non-trivial.
E.g. fully transparent should be most frequent, fully opaque second-most.
Finding gradients between those should allow figuring out the other two.
More information about the ffmpeg-devel