[FFmpeg-devel] dvdsub encoder: respect palette when it makes sense

Nicolas George nicolas.george
Sun Mar 1 23:52:21 CET 2009

Le primidi 11 vent?se, an CCXVII, Michael Niedermayer a ?crit?:
> your patch looks like a hack ...

I agree, it does look like a hack; the reason is probably that the code it
modifies is itself a hack.

To be more precise, DVD subtitles are four-color pixmaps; the current code
accepts any number of colors and maps them semi-randomly to the four slots;
it then ignores the provided palette.

My patch kicks in when the user provides exactly four colors, and keeps them
as is.

I could submit a patch that makes the encoder fail if the provided number of
colors is not 4; I think it would make much more sense that the current
behavior. But this is a change that may possibly break currently working
code, and I would not do it without advice.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090301/1298aa95/attachment.pgp>

More information about the ffmpeg-devel mailing list