X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdnxhddata.h;h=898079cffc2d08bce725b189438b7620336d230c;hb=7c4287b27628346321981b2529bff028f119c870;hp=f80ce18f3c43db0da51ff599fb6610128df41320;hpb=9a88a47be4da9cd25a582feec7cc36790500b481;p=ffmpeg diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h index f80ce18f3c4..898079cffc2 100644 --- a/libavcodec/dnxhddata.h +++ b/libavcodec/dnxhddata.h @@ -58,9 +58,7 @@ typedef struct CIDEntry { AVRational packet_scale; } CIDEntry; -extern const CIDEntry ff_dnxhd_cid_table[]; - -int ff_dnxhd_get_cid_table(int cid); +const CIDEntry *ff_dnxhd_get_cid_table(int cid); int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth); void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel); @@ -90,20 +88,8 @@ static av_always_inline uint64_t ff_dnxhd_parse_header_prefix(const uint8_t *buf return ff_dnxhd_check_header_prefix(prefix); } -static av_always_inline int ff_dnxhd_get_hr_frame_size(int cid, int w, int h) -{ - int result, i = ff_dnxhd_get_cid_table(cid); - - if (i < 0) - return i; - - 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; - result = (result + 2048) / 4096 * 4096; - - return FFMAX(result, 8192); -} - int avpriv_dnxhd_get_frame_size(int cid); +int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h); int avpriv_dnxhd_get_interlaced(int cid); #endif /* AVCODEC_DNXHDDATA_H */