45 result = (result + 2048) / 4096 * 4096;
47 return FFMAX(result, 8192);
59 for (i = 0; i < buf_size; i++) {
60 state = (state << 8) | buf[i];
74 for (; i < buf_size; i++) {
76 state = (state << 8) | buf[i];
79 dctx->
h = (state >> 32) & 0xFFFF;
81 dctx->
w = (state >> 32) & 0xFFFF;
83 int cid = (state >> 32) & 0xFFFFFFFF;
96 if (buf_size - i + 47 >= dctx->
remaining) {
109 }
else if (pic_found) {
129 const uint8_t **poutbuf,
int *poutbuf_size,
147 *poutbuf_size = buf_size;
static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix)
const CIDEntry ff_dnxhd_cid_table[]
static int dnxhd_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int dnxhd_get_hr_frame_size(int cid, int w, int h)
int avpriv_dnxhd_get_frame_size(int cid)
int ff_dnxhd_get_cid_table(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