aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mimic.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-07 16:31:02 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-09 16:59:42 +0200
commit570d63eef3f911869672cd20fa9c2abedb11093d (patch)
tree2b993b08de62362e2e59e8049e28a92e6c2bb0af /libavcodec/mimic.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
downloadffmpeg-570d63eef3f911869672cd20fa9c2abedb11093d.tar.gz
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r--libavcodec/mimic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 85c6a1a96b..8985f6b470 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -388,8 +388,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] = FF_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");