37 #define DIRAC_PARSE_INFO_PREFIX 0x42424344
63 for (i = 0; i < buf_size; i++) {
64 state = (state << 8) | buf[i];
77 for (; i < buf_size; i++) {
87 state = (state << 8) | buf[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
110 if (offset < 0 || pc->
index - 13 < offset)
120 for (i = 0; i < 17; i++)
121 if (valid_pu_types[i] == pu->
pu_type)
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) {
239 const uint8_t **poutbuf,
int *poutbuf_size,
251 *poutbuf_size = buf_size;
264 *poutbuf_size = buf_size;
Memory handling functions.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
static int find_frame_end(DiracParseContext *pc, const uint8_t *buf, int buf_size)
AVCodecParser ff_dirac_parser
int has_b_frames
Size of the frame reordering buffer in the decoder.
static void dirac_parse_close(AVCodecParserContext *s)
static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc, int offset)
static const uint8_t offset[127][2]
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.
main external API structure.
static int dirac_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int64_t pts
Global timestamp for the audio frames.
#define DIRAC_PARSE_INFO_PREFIX
#define PARSER_FLAG_COMPLETE_FRAMES
Find the end of the current frame in the bitstream.
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx, int next, const uint8_t **buf, int *buf_size)
#define AV_NOPTS_VALUE
Undefined timestamp value.