[FFmpeg-devel] [PATCH] lavf/rawutils: Make ff_reshuffle_raw_rgb() somewhat more future-proof

Mats Peterson matsp888 at yahoo.com
Sat Feb 27 14:03:40 CET 2016


Currently the only palettized pixel format in FFmpeg is AV_PIX_FMT_PAL8. 
In case there will be other palettized formats in the future, I have 
"guarded" myself by using 1 << bits_per_coded_sample in avienc.c and 
movenc.c for calculating the number of palette entries in packets 
containing a palette at the end, rather than just assuming 256 entries.

If we can agree on using this 1 << bits_per_coded_sample logic overall 
for packets containing a palette, in the same way as it is done in AVI 
and QuickTime, here's a patch of ff_reshuffle_raw_rgb() that makes it 
somewhat more future-proof.

Mats

-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-rawutils-Make-ff_reshuffle_raw_rgb-somewhat-mor.patch
Type: text/x-patch
Size: 1199 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160227/2a9f84d0/attachment.bin>


More information about the ffmpeg-devel mailing list