46 for (i = 0; i < buf_size; i++) {
47 state = (state << 8) | buf[i];
61 for (; i < buf_size; i++) {
63 state = (state << 8) | buf[i];
66 dctx->
h = (state >> 32) & 0xFFFF;
68 dctx->
w = (state >> 32) & 0xFFFF;
70 int cid = (state >> 32) & 0xFFFFFFFF;
83 if (buf_size - i + 47 >= dctx->
remaining) {
96 }
else if (pic_found) {
116 const uint8_t **poutbuf,
int *poutbuf_size,
134 *poutbuf_size = buf_size;
static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix)
static int dnxhd_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int avpriv_dnxhd_get_frame_size(int cid)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
AVCodecParser ff_dnxhd_parser
void ff_parse_close(AVCodecParserContext *s)
static int dnxhd_find_frame_end(DNXHDParserContext *dctx, const uint8_t *buf, int buf_size)
main external API structure.
uint64_t state64
contains the last 8 bytes in MSB order
#define PARSER_FLAG_COMPLETE_FRAMES
int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h)