Go to the documentation of this file.
332 greyscale =
tmp & 0x20;
343 uint32_t color_count, color_start, color_end;
348 if (greyscale &&
bit_depth > 1 && color_table_id) {
349 int color_index, color_dec;
353 color_dec = 256 / (color_count - 1);
354 for (
i = 0;
i < color_count;
i++) {
355 r =
g =
b = color_index;
356 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
357 color_index -= color_dec;
361 }
else if (color_table_id) {
375 for (
i = 0;
i < color_count;
i++) {
379 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
387 if ((color_start <= 255) && (color_end <= 255)) {
388 for (
i = color_start;
i <= color_end;
i++) {
399 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
static const uint8_t qt_default_palette_2[2 *3]
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
static const uint8_t qt_default_palette_4[4 *3]
unsigned int avio_rb32(AVIOContext *s)
static const uint8_t qt_default_palette_16[16 *3]
static const uint8_t qt_default_palette_256[256 *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[]