diff options
Diffstat (limited to 'libavformat/qtpalette.h')
-rw-r--r-- | libavformat/qtpalette.h | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/libavformat/qtpalette.h b/libavformat/qtpalette.h index ecc85d3408..016e91f1b3 100644 --- a/libavformat/qtpalette.h +++ b/libavformat/qtpalette.h @@ -3,51 +3,59 @@ * Automatically generated from a utility derived from XAnim: * http://xanim.va.pubnix.com/home.html * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVFORMAT_QTPALETTE_H #define AVFORMAT_QTPALETTE_H -#include <inttypes.h> +#include <stdint.h> +#include "avformat.h" +static const uint8_t ff_qt_default_palette_2[2 * 3] = { + 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00 +}; + +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ static const uint8_t ff_qt_default_palette_4[4 * 3] = { - 0x93, 0x65, 0x5E, 0xFF, 0xFF, 0xFF, - 0xDF, 0xD0, 0xAB, + 0xAC, 0xAC, 0xAC, + 0x55, 0x55, 0x55, 0x00, 0x00, 0x00 }; +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ static const uint8_t ff_qt_default_palette_16[16 * 3] = { - 0xFF, 0xFB, 0xFF, - 0xEF, 0xD9, 0xBB, - 0xE8, 0xC9, 0xB1, - 0x93, 0x65, 0x5E, - 0xFC, 0xDE, 0xE8, - 0x9D, 0x88, 0x91, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, - 0x47, 0x48, 0x37, - 0x7A, 0x5E, 0x55, - 0xDF, 0xD0, 0xAB, - 0xFF, 0xFB, 0xF9, - 0xE8, 0xCA, 0xC5, - 0x8A, 0x7C, 0x77, + 0xFC, 0xF3, 0x05, + 0xFF, 0x64, 0x02, + 0xDD, 0x08, 0x06, + 0xF2, 0x08, 0x84, + 0x46, 0x00, 0xA5, + 0x00, 0x00, 0xD4, + 0x02, 0xAB, 0xEA, + 0x1F, 0xB7, 0x14, + 0x00, 0x64, 0x11, + 0x56, 0x2C, 0x05, + 0x90, 0x71, 0x3A, + 0xC0, 0xC0, 0xC0, + 0x80, 0x80, 0x80, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00 }; @@ -310,4 +318,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 */ |