aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_gradfun.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 /libavfilter/vf_gradfun.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
downloadffmpeg-570d63eef3f911869672cd20fa9c2abedb11093d.tar.gz
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libavfilter/vf_gradfun.c')
-rw-r--r--libavfilter/vf_gradfun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 48ac378e6a..52c67ffedc 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -172,8 +172,8 @@ static int config_input(AVFilterLink *inlink)
if (!gf->buf)
return AVERROR(ENOMEM);
- gf->chroma_w = -((-inlink->w) >> hsub);
- gf->chroma_h = -((-inlink->h) >> vsub);
+ gf->chroma_w = FF_CEIL_RSHIFT(inlink->w, hsub);
+ gf->chroma_h = FF_CEIL_RSHIFT(inlink->h, vsub);
gf->chroma_r = av_clip(((((gf->radius >> hsub) + (gf->radius >> vsub)) / 2 ) + 1) & ~1, 4, 32);
return 0;