Go to the documentation of this file.
40 greyscale =
tmp & 0x20;
51 uint32_t color_count, color_start, color_end;
56 if (greyscale &&
bit_depth > 1 && color_table_id) {
57 int color_index, color_dec;
61 color_dec = 256 / (color_count - 1);
62 for (
i = 0;
i < color_count;
i++) {
63 r =
g =
b = color_index;
64 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
65 color_index -= color_dec;
69 }
else if (color_table_id) {
83 for (
i = 0;
i < color_count;
i++) {
87 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
95 if ((color_start <= 255) && (color_end <= 255)) {
96 for (
i = color_start;
i <= color_end;
i++) {
107 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
unsigned int avio_rb32(AVIOContext *s)
static const uint8_t ff_qt_default_palette_4[4 *3]
static const uint8_t ff_qt_default_palette_16[16 *3]
int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
Retrieve the palette (or "color table" in QuickTime terms), either from the video sample description,...
int avio_r8(AVIOContext *s)
#define i(width, name, range_min, range_max)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
unsigned int avio_rb16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static const ColorEntry color_table[]
static const uint8_t ff_qt_default_palette_2[2 *3]
static const uint8_t ff_qt_default_palette_256[256 *3]