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 /libavcodec/mimic.c | |
parent | 7570c9e04f010c9b3bfdeb4338d330f2cdd25278 (diff) |
lavu: add AV_CEIL_RSHIFT and use it in various places
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r-- | libavcodec/mimic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index b8b3285050..6f43723ef6 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -392,8 +392,8 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, avctx->height = height; avctx->pix_fmt = AV_PIX_FMT_YUV420P; for (i = 0; i < 3; i++) { - ctx->num_vblocks[i] = -((-height) >> (3 + !!i)); - ctx->num_hblocks[i] = width >> (3 + !!i); + ctx->num_vblocks[i] = AV_CEIL_RSHIFT(height, 3 + !!i); + ctx->num_hblocks[i] = width >> (3 + !!i); } } else if (width != ctx->avctx->width || height != ctx->avctx->height) { avpriv_request_sample(avctx, "Resolution changing"); |