[FFmpeg-devel] [PATCH] lavf/rawutils: Make ff_reshuffle_raw_rgb() somewhat more future-proof
Mats Peterson
matsp888 at yahoo.com
Sat Feb 27 15:36:43 CET 2016
On 02/27/2016 03:11 PM, Reimar Döffinger wrote:
> On Sat, Feb 27, 2016 at 02:58:39PM +0100, Mats Peterson wrote:
>> And yes, QuickTime has a "default palette" for each bit depth that it can
>> use, and no palette will be stored in the video sample description in that
>> case. But that's only sensible to use for 1 bpp black & white or 8 bpp
>> grayscale (and that's what I'm doing in movenc.c), since in other cases
>> comparing each color of the current palette with the default Macintosh
>> palette is a bit of overkill in my book.
>
> It's 256 comparisons to save 1 kB.
> It's not a big deal, but it seems like fairly cheap optimization to do.
> _______________________________________________
Perhaps so. But it's no big deal to include the palette either, I think.
1 kb isn't a humonguous amount nowadays. To each his own, of course :)
Most of the time the palette won't be the default Macintosh palette
either, when converting from AVI or from other sources and pixel formats.
Mats
More information about the ffmpeg-devel
mailing list