X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdnxhddata.c;h=7d935a3f317ec897b37680ec8c409de12480d6a4;hb=ebf648d490448d511b5fe970d76040169e65ef74;hp=82fbfdfa70431a790acab4e6acdee4b113b509a4;hpb=de3a33784cb79c35fadb6fc22a0b406450bdef7c;p=ffmpeg diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index 82fbfdfa704..7d935a3f317 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -22,6 +22,7 @@ #include "avcodec.h" #include "dnxhddata.h" #include "libavutil/common.h" +#include "libavutil/intreadwrite.h" /* The quantization tables below are in zigzag order! */ @@ -1102,6 +1103,13 @@ int avpriv_dnxhd_get_interlaced(int cid) return ff_dnxhd_cid_table[i].flags & DNXHD_INTERLACED ? 1 : 0; } +uint64_t avpriv_dnxhd_parse_header_prefix(const uint8_t *buf) +{ + uint64_t prefix = AV_RB32(buf); + prefix = (prefix << 16) | buf[4] << 8; + return ff_dnxhd_check_header_prefix(prefix); +} + int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) { int i, j;