[FFmpeg-devel] [PATCH 16/28] dvdsub hacks
Wed Jun 30 17:38:56 CEST 2010
On 06/30/2010 04:08 AM, Joakim Plate wrote:
> Mans Rullgard <mans <at> mansr.com> writes:
>> From: Cory Fields <theuni-nospam- <at> xbmc.org>
>> libavcodec/dvdsubdec.c | 99 ++++++++++++++++++++++++++++++++++++++++++-----
>> 1 files changed, 88 insertions(+), 11 deletions(-)
>> diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
>> index 75b5256..a75aae0 100644
>> --- a/libavcodec/dvdsubdec.c
>> +++ b/libavcodec/dvdsubdec.c
>> @@ -25,6 +25,14 @@
> Some clearification could be in order. This is to make sure we use the palette
> as given by the extradata (which happens to be grabbed from the vobsub idx file
> in the matroska case) for vobsubs.
> Dvd's have the palette stored in their ifo files, not in the actual subtitle
> stream. So to get the colors right this is required.
> I suspect I've sent this one before, but i'm not sure.
This works for matroska. But not for mp4 which only has the palette data
in a binary format in decoder specific info. libavformat puts this in
extradata. The values are stored in exactly the format they came from
the VTS (i.e. byte order 0, Y, Cb, Cr).
More information about the ffmpeg-devel