FFmpeg
Functions | Variables
qtpalette.c File Reference
#include <stdio.h>
#include <stdint.h>
#include "libavcodec/codec_id.h"
#include "avio.h"
#include "qtpalette.h"

Go to the source code of this file.

Functions

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, or from the default Macintosh palette. More...
 

Variables

static const uint8_t qt_default_palette_2 [2 *3]
 
static const uint8_t qt_default_palette_4 [4 *3]
 
static const uint8_t qt_default_palette_16 [16 *3]
 
static const uint8_t qt_default_palette_256 [256 *3]
 

Function Documentation

◆ ff_get_qtpalette()

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, 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).

Definition at line 323 of file qtpalette.c.

Referenced by mov_parse_stsd_video().

Variable Documentation

◆ qt_default_palette_2

const uint8_t qt_default_palette_2[2 *3]
static
Initial value:
= {
0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00
}

Definition at line 31 of file qtpalette.c.

Referenced by ff_get_qtpalette().

◆ qt_default_palette_4

const uint8_t qt_default_palette_4[4 *3]
static
Initial value:
= {
0xFF, 0xFF, 0xFF,
0xAC, 0xAC, 0xAC,
0x55, 0x55, 0x55,
0x00, 0x00, 0x00
}

Definition at line 37 of file qtpalette.c.

Referenced by ff_get_qtpalette().

◆ qt_default_palette_16

const uint8_t qt_default_palette_16[16 *3]
static
Initial value:
= {
0xFF, 0xFF, 0xFF,
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
}

Definition at line 45 of file qtpalette.c.

Referenced by ff_get_qtpalette().

◆ qt_default_palette_256

const uint8_t qt_default_palette_256[256 *3]
static

Definition at line 64 of file qtpalette.c.

Referenced by ff_get_qtpalette().