27 const uint8_t **poutbuf,
int *poutbuf_size,
28 const uint8_t *buf,
int buf_size)
31 uint8_t
flags, depth, chroma_format, alpha_channel_type;
34 *poutbuf_size = buf_size;
43 if (bytestream2_get_be32(&gb) != buf_size)
47 if (bytestream2_get_le32(&gb) !=
MKTAG(
'i',
'c',
'p',
'f'))
51 if (bytestream2_get_be16(&gb) < 20)
59 s->width = bytestream2_get_be16(&gb);
60 s->height = bytestream2_get_be16(&gb);
64 flags = bytestream2_get_byte(&gb);
67 switch (
flags >> 2 & 3) {
88 case MKTAG(
'a',
'p',
'c',
'o'):
89 case MKTAG(
'a',
'p',
'c',
's'):
90 case MKTAG(
'a',
'p',
'c',
'n'):
91 case MKTAG(
'a',
'p',
'c',
'h'):
94 case MKTAG(
'a',
'p',
'4',
'h'):
95 case MKTAG(
'a',
'p',
'4',
'x'):
102 chroma_format =
flags >> 6 & 3;
103 if (chroma_format < 2)
106 alpha_channel_type = bytestream2_get_byte(&gb) & 0xf;
108 switch (depth | (chroma_format << 4) | (alpha_channel_type << 8)) {
110 case 10 | (2 << 4) | (1 << 8):
113 case 10 | (3 << 4) | (1 << 8):
116 case 12 | (2 << 4) | (1 << 8):
119 case 12 | (3 << 4) | (1 << 8):
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Libavcodec external API header.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define flags(name, subs,...)
@ AV_FIELD_TT
Top coded_first, top displayed first.
@ AV_FIELD_BB
Bottom coded first, bottom displayed first.
@ AV_PICTURE_STRUCTURE_FRAME
coded as frame
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
coded as bottom field
@ AV_PICTURE_STRUCTURE_TOP_FIELD
coded as top field
@ AV_PICTURE_TYPE_I
Intra.
#define MKTAG(a, b, c, d)
#define PARSER_CODEC_LIST(...)
const FFCodecParser ff_prores_parser
#define AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P12
#define AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUV444P10
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').