summaryrefslogtreecommitdiff
path: root/libavutil/imgutils.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2016-01-08 16:16:10 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-11 15:32:56 -0500
commite8bc642202c10beda1ea4e93ec8492b1e39805e5 (patch)
treefa974fb54c3d1b8bfb244f7ac0bce6e95e2ccdd6 /libavutil/imgutils.c
parent7570c9e04f010c9b3bfdeb4338d330f2cdd25278 (diff)
lavu: add AV_CEIL_RSHIFT and use it in various places
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r--libavutil/imgutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 4fb7a9b0aa..6c581396a3 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -291,7 +291,7 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
int h = height;
int bwidth = av_image_get_linesize(pix_fmt, width, i);
if (i == 1 || i == 2) {
- h= -((-height)>>desc->log2_chroma_h);
+ h = AV_CEIL_RSHIFT(height, desc->log2_chroma_h);
}
av_image_copy_plane(dst_data[i], dst_linesizes[i],
src_data[i], src_linesizes[i],