summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.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/ffv1enc.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 41848ec5da..828ed9b6e0 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -973,8 +973,8 @@ static int encode_slice(AVCodecContext *c, void *arg)
}
if (f->colorspace == 0) {
- const int chroma_width = -((-width) >> f->chroma_h_shift);
- const int chroma_height = -((-height) >> f->chroma_v_shift);
+ const int chroma_width = FF_CEIL_RSHIFT(width, f->chroma_h_shift);
+ const int chroma_height = FF_CEIL_RSHIFT(height, f->chroma_v_shift);
const int cx = x >> f->chroma_h_shift;
const int cy = y >> f->chroma_v_shift;