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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Apr 29 19:25:02 CEST 2011


On Fri, Apr 29, 2011 at 10:11:55AM +0200, Alexandre Colucci wrote:
> 
> On 27 avr. 2011, at 22:57, Reimar Döffinger wrote:
> 
> > On Wed, Apr 27, 2011 at 12:31:14PM +0200, Alexandre Colucci wrote:
> >> On 26 avr. 2011, at 22:08, Reimar Döffinger wrote:
> >>>> Just compare the attached screenshots attached to the patch, they speak for themselves. The screenshots are from Con Air btw, not from some handmade source.
> >>> 
> >>> I don't doubt that it works for your case, I just don't believe it
> >>> works for all (even just all commercial) DVDs.
> >> 
> >> I haven't seen it not working ever but I am addressing that issue in the attached new patch.
> > 
> > Ok, I really should have done this earlier but I decided to
> > get some actual data.
> > Below is the list for different DVDs, alpha and brightness (Y),
> > all 4 entries:
> > 
> > f 10 f 10 f d1 0 28
> > f 10 f eb f 51 0 10
> > f 10 f 80 f b0 0 10
> > f 10 f 10 f eb 0 eb
> > f 10 f 80 f b0 0 10
> > f 10 f 10 f d1 0 28
> > f 10 f ea f ea 0 ea
> > f d7 f 62 f 24 0 b4
> > f 10 f 7d f d9 0 10
> > f 10 f eb f 5d 0 5d
> > f 10 f 7e f eb 0 eb
> > f 10 f 80 f b0 0 10
> > f 62 f d7 f 24 0 ea
> > f 10 f 7b f d1 0 ea
> > f 7b f 1e f dc 0 10
> > f 10 f 7b f ea 0 ea
> > f 10 f 7b f ea 0 ea
> > f 10 f ea f ea 0 ea
> > 
> > General conclusion: Nobody uses alpha.
> 
> 
> The above table is incomplete, I would need the following values for my tests:
> 
> - Cr and Cb values

Almost all are 0x80, 0x80 (i.e. some gray).

> - colormap values (4 values in the range 0-15)

I can see if I can dig them up.

> > Clear exception where the previous code worked better is
> > f d7 f 62 f 24 0 b4 (from German version of Hellboy).
> 
> It is not clear at all, you are comparing Y with RGB. Again the counter example needs to be backed by real values.

I really don't care about white vs. yellow here so I don't
think anything but the Y value really matters.
But anyway, here's alpha, colormap and associated color
for this:
f 3 d78080 f 2 628080 f 1 248080 0 0 b48080

> One last note: if your source of DVDsubs is ripped idx/sub that you downloaded, a lot of it is generated by various tools and are quite different from the originals.

It's all original DVDs, so I did have a good reason to be too lazy
to do this.


More information about the ffmpeg-devel mailing list