[FFmpeg-devel] [PATCH v9] lavf: palettized QuickTime video in Matroska
Mats Peterson
matsp888 at yahoo.com
Sun Dec 27 21:35:47 CET 2015
Removed the 'stsd' variable from ff_get_qtpalette() in qtpalette.c.
Updated the doxy documentation for ff_get_qtpalette() accordingly.
Description of patch follows:
Palettized QuickTime video in Matroska has hitherto not been recognized
whatsoever, and the "palette" used has been completely random.
The patch for matroskadec.c fixes this issue by adding a palette side
data packet in matroska_deliver_packet(), much in the same way as it's
done in mov.c.
The change to mov.c consists mainly of moving the palette handling from
the mov_parse_stsd_video() function to a new ff_get_qtpalette() function
in the new file qtpalette.c, which is shared by both matroskadec.c and
mov.c.
In matroskadec.c, I'm also putting the palette in 'extradata', like it's
done for V_MS/VFW/FOURCC; this is a requirement in order for MPlayer to
use the correct palette. And why is that, you may wonder. Well, it's
because for some mysterious reason, MPlayer adds *another* palette side
data packet *after* the one added in matroskadec.c. It uses whatever is
in extradata as the palette when adding this packet.
Video samples for testing are available at
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk.
--
Mats Peterson
http://matsp888.no-ip.org/~mats/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-palettized-QuickTime-video-in-Matroska.patch
Type: text/x-patch
Size: 14564 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151227/a59d8d77/attachment.bin>
More information about the ffmpeg-devel
mailing list