diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-04-14 16:09:07 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-04-14 16:09:07 +0200 |
commit | 5dedb2afd64e27ad08308487e185f7e3a5bea1b9 (patch) | |
tree | f434c549995c0bd63aa7e0e401df4f13168114c9 /libavcodec/dnxhd_parser.c | |
parent | 34c2eea3d8ec85de4f4e5a9085c174e4b09387b9 (diff) | |
download | ffmpeg-5dedb2afd64e27ad08308487e185f7e3a5bea1b9.tar.gz |
avcodec/dnxhd*: add ff_dnxhd_get_hr_frame_size()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/dnxhd_parser.c')
-rw-r--r-- | libavcodec/dnxhd_parser.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c index d5844dffda..de1cf5a041 100644 --- a/libavcodec/dnxhd_parser.c +++ b/libavcodec/dnxhd_parser.c @@ -36,19 +36,6 @@ typedef struct { int w, h; } DNXHDParserContext; -static int 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); -} - static int dnxhd_find_frame_end(DNXHDParserContext *dctx, const uint8_t *buf, int buf_size) { @@ -93,7 +80,7 @@ static int dnxhd_find_frame_end(DNXHDParserContext *dctx, dctx->remaining = avpriv_dnxhd_get_frame_size(cid); if (dctx->remaining <= 0) { - dctx->remaining = dnxhd_get_hr_frame_size(cid, dctx->w, dctx->h); + dctx->remaining = ff_dnxhd_get_hr_frame_size(cid, dctx->w, dctx->h); if (dctx->remaining <= 0) return dctx->remaining; } |