39#define DIRAC_PARSE_INFO_PREFIX 0x42424344
59 const uint8_t *buf,
int buf_size)
65 for (
i = 0;
i < buf_size;
i++) {
79 for (;
i < buf_size;
i++) {
107 static const uint8_t valid_pu_types[] = {
108 0x00, 0x10, 0x20, 0x30, 0x08, 0x48, 0xC8, 0xE8, 0x0A, 0x0C, 0x0D, 0x0E,
109 0x4C, 0x09, 0xCC, 0x88, 0xCB
122 for (
i = 0;
i < 17;
i++)
123 if (valid_pu_types[
i] == pu->
pu_type)
140 int next,
const uint8_t **buf,
int *buf_size)
151 if (*buf_size == 0 && pc->
buffer[4] == 0x10) {
153 *buf_size = pc->
index;
193 *buf_size = next - 9;
207 if ((pu.
pu_type & 0x08) != 0x08) {
215 uint8_t *cur_pu = pc->
buffer +
218 if (
s->last_pts == 0 &&
s->last_dts == 0)
221 s->dts =
s->last_dts + 1;
241 const uint8_t **poutbuf,
int *poutbuf_size,
242 const uint8_t *buf,
int buf_size)
253 *poutbuf_size = buf_size;
266 *poutbuf_size = buf_size;
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static av_cold void close(AVCodecParserContext *s)
Libavcodec external API header.
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
static int find_frame_end(DiracParseContext *pc, const uint8_t *buf, int buf_size)
static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc, int offset)
#define DIRAC_PARSE_INFO_PREFIX
const FFCodecParser ff_dirac_parser
static av_cold void dirac_parse_close(AVCodecParserContext *s)
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx, int next, const uint8_t **buf, int *buf_size)
static int dirac_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static struct @346255127015250356166251341105367306144006377143 state
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given buffer if it is not large enough, otherwise do nothing.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
#define AV_NOPTS_VALUE
Undefined timestamp value.
Macro definitions for various function/variable attributes.
Memory handling functions.
#define PARSER_CODEC_LIST(...)
main external API structure.
int has_b_frames
Size of the frame reordering buffer in the decoder.
Find the end of the current frame in the bitstream.