22 #ifndef AVCODEC_DNXHDDATA_H
23 #define AVCODEC_DNXHDDATA_H
31 #define DNXHD_INTERLACED (1<<0)
32 #define DNXHD_MBAFF (1<<1)
33 #define DNXHD_444 (1<<2)
36 #define DNXHD_HEADER_INITIAL 0x000002800100
37 #define DNXHD_HEADER_444 0x000002800200
40 #define DNXHD_VARIABLE 0
70 uint64_t data_offset = prefix >> 16;
71 if ((prefix & 0xFFFF0000FFFFLL) == 0x0300 &&
72 data_offset >= 0x0280 && data_offset <= 0x2170 &&
73 (data_offset & 3) == 0)
90 prefix = (prefix << 16) | buf[4] << 8;
101 result = ((h + 15) / 16) * ((w + 15) / 16) * (int64_t)ff_dnxhd_cid_table[i].packet_scale.num / ff_dnxhd_cid_table[i].
packet_scale.
den;
102 result = (result + 2048) / 4096 * 4096;
104 return FFMAX(result, 8192);
109 #if LIBAVCODEC_VERSION_MAJOR < 58
static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix)
AVRational frame_rates[5]
#define DNXHD_HEADER_INITIAL
Frame headers, extra 0x00 added to end for parser.
attribute_deprecated uint64_t avpriv_dnxhd_parse_header_prefix(const uint8_t *buf)
const uint8_t * luma_weight
int avpriv_dnxhd_get_interlaced(int cid)
const uint16_t * run_codes
int avpriv_dnxhd_get_frame_size(int cid)
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
unsigned int coding_unit_size
const uint16_t * ac_codes
static av_always_inline uint64_t ff_dnxhd_parse_header_prefix(const uint8_t *buf)
const uint8_t * chroma_weight
common internal API header
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel)
static av_always_inline int ff_dnxhd_get_hr_frame_size(int cid, int w, int h)
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
Libavcodec external API header.
main external API structure.
Rational number (pair of numerator and denominator).
static av_always_inline uint64_t ff_dnxhd_check_header_prefix_hr(uint64_t prefix)
#define attribute_deprecated
const CIDEntry ff_dnxhd_cid_table[]
int bit_rates[5]
Helper to choose variants, rounded to nearest 5Mb/s.
int ff_dnxhd_get_cid_table(int cid)