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

Nicolas George nicolas.george
Tue Mar 3 10:22:14 CET 2009


Le duodi 12 vent?se, an CCXVII, Michael Niedermayer a ?crit?:
> the way i understand it it should reject it if any of the 4 colors have a
> palette entry that cant be represented

As I favour offensive programming over defensive programming?, I agree that a
real error would be better than just a warning. That was just a change of
behavior I was not ready to make without advice.

But in that case, I think both warnings should be errors, as they are two
manifestations of the same problem: anything that is not 4 colors out of 16
can not be coded as a DVD subpicture.

> should be a seperate patch ...

Ok. I will resubmit as soon as I get advice about the rest.


As for the testing issue: testing on a real DVD player would clearly be the
best option. Unfortunately, I think there are no DVD authoring tools that
use libavcodec to encode the subtitles. And writing new code to produce a
test sample would be no good, as that new code itself would not have been
properly tested.

Under these circumstances, I think it is reasonably safe to assume that if
mplayer displayed DVD subtitles black with white outline when they should be
white with black outline, we would have noticed by now.

Regards,

-- 
  Nicolas George


1?: I'm not sure the terms are completely standard. For me:
- offensive programming: assert(x > 0);
- defensive programming: if (x <= 0) x = 1;
-------------- 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/20090303/be0fe52c/attachment.pgp>



More information about the ffmpeg-devel mailing list