37 #define DIRAC_PARSE_INFO_PREFIX 0x42424344
57 const uint8_t *buf,
int buf_size)
63 for (
i = 0;
i < buf_size;
i++) {
77 for (;
i < buf_size;
i++) {
105 static const uint8_t valid_pu_types[] = {
106 0x00, 0x10, 0x20, 0x30, 0x08, 0x48, 0xC8, 0xE8, 0x0A, 0x0C, 0x0D, 0x0E,
107 0x4C, 0x09, 0xCC, 0x88, 0xCB
120 for (
i = 0;
i < 17;
i++)
121 if (valid_pu_types[
i] == pu->
pu_type)
138 int next,
const uint8_t **buf,
int *buf_size)
149 if (*buf_size == 0 && pc->
buffer[4] == 0x10) {
151 *buf_size = pc->
index;
191 *buf_size = next - 9;
205 if ((pu.
pu_type & 0x08) != 0x08) {
216 if (
s->last_pts == 0 &&
s->last_dts == 0)
219 s->dts =
s->last_dts + 1;
239 const uint8_t **poutbuf,
int *poutbuf_size,
240 const uint8_t *buf,
int buf_size)
251 *poutbuf_size = buf_size;
264 *poutbuf_size = buf_size;
#define PARSER_FLAG_COMPLETE_FRAMES
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
static void dirac_parse_close(AVCodecParserContext *s)
AVCodecParser ff_dirac_parser
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)
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.
Memory handling functions.
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.
static const uint8_t offset[127][2]