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 if (start < pc->
buffer || (start + 13 > end))
130 if (*buf_size == 0 && pc->
buffer[4] == 0x10) {
132 *buf_size = pc->
index;
172 *buf_size = next - 9;
186 if ((pu.
pu_type & 0x08) != 0x08) {
193 if (parse_timing_info) {
220 const uint8_t **poutbuf,
int *poutbuf_size,
232 *poutbuf_size = buf_size;
245 *poutbuf_size = buf_size;
memory handling functions
static av_cold int end(AVCodecContext *avctx)
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.
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given block if it is not large enough, otherwise do nothing.
#define PARSER_FLAG_COMPLETE_FRAMES
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]
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
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.