diff options
author | Clément Bœsch <ubitux@gmail.com> | 2016-01-08 16:16:10 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-11 15:32:56 -0500 |
commit | e8bc642202c10beda1ea4e93ec8492b1e39805e5 (patch) | |
tree | fa974fb54c3d1b8bfb244f7ac0bce6e95e2ccdd6 /libavutil/frame.c | |
parent | 7570c9e04f010c9b3bfdeb4338d330f2cdd25278 (diff) | |
download | ffmpeg-e8bc642202c10beda1ea4e93ec8492b1e39805e5.tar.gz |
lavu: add AV_CEIL_RSHIFT and use it in various places
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r-- | libavutil/frame.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c index e4f6ab3daa..15276fee49 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -111,7 +111,7 @@ static int get_video_buffer(AVFrame *frame, int align) for (i = 0; i < 4 && frame->linesize[i]; i++) { int h = frame->height; if (i == 1 || i == 2) - h = -((-h) >> desc->log2_chroma_h); + h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h); frame->buf[i] = av_buffer_alloc(frame->linesize[i] * h); if (!frame->buf[i]) |