X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fqtpalette.h;h=b2bd3600c5392a31d5c4c2f3235c460b01171a3b;hb=6711aa21e263a270ecd2d6a6ee1b673e665ce98a;hp=7d6802f73c6d5add5b1e6e77a6ef5f9f748a01c3;hpb=8076711d4cf9f66b74ac8af37f36c7fc7582b102;p=ffmpeg diff --git a/libavformat/qtpalette.h b/libavformat/qtpalette.h index 7d6802f73c6..b2bd3600c53 100644 --- a/libavformat/qtpalette.h +++ b/libavformat/qtpalette.h @@ -23,7 +23,13 @@ #ifndef AVFORMAT_QTPALETTE_H #define AVFORMAT_QTPALETTE_H -#include +#include +#include "avformat.h" + +static const uint8_t ff_qt_default_palette_2[2 * 3] = { + 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00 +}; static const uint8_t ff_qt_default_palette_4[4 * 3] = { 0x93, 0x65, 0x5E, @@ -310,4 +316,15 @@ static const uint8_t ff_qt_default_palette_256[256 * 3] = { /* 255, 0xFF */ 0x00, 0x00, 0x00 }; +/** + * Retrieve the palette (or "color table" in QuickTime terms), either + * from the video sample description, or from the default Macintosh + * palette. + * + * The file offset of the AVIOContext pointed to by the 'pb' variable + * should be the start of the video sample description (the sample + * description size and the data format). + */ +int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette); + #endif /* AVFORMAT_QTPALETTE_H */