33 #define DIRAC_PARSE_INFO_PREFIX 0x42424344
53 const uint8_t *buf,
int buf_size)
59 for (i = 0; i < buf_size; i++) {
60 state = (state << 8) | buf[i];
73 for (; i < buf_size; i++) {
83 state = (state << 8) | buf[i];
100 uint8_t *start = pc->
buffer + offset;
102 if (start < pc->
buffer || (start+13 > end))
116 int next,
const uint8_t **buf,
int *buf_size)
127 if (*buf_size == 0 && pc->
buffer[4] == 0x10) {
129 *buf_size = pc->
index;
137 pc->
index + (*buf_size -
177 if ((pu.
pu_type&0x08) != 0x08) {
184 if (parse_timing_info) {
185 uint8_t *cur_pu = pc->
buffer +
187 int pts =
AV_RB32(cur_pu + 13);
211 const uint8_t **poutbuf,
int *poutbuf_size,
212 const uint8_t *buf,
int buf_size)
223 *poutbuf_size = buf_size;
238 *poutbuf_size = buf_size;
AV_WL32 AV_WL24 AV_WL16 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_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static void dirac_parse_close(AVCodecParserContext *s)
static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc, int offset)
struct DiracParseUnit DiracParseUnit
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)
struct DiracParseContext DiracParseContext
Find the end of the current frame in the bitstream.
#define DIRAC_PARSE_INFO_PREFIX
#define PARSER_FLAG_COMPLETE_FRAMES
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.
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.