diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 17:47:04 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-25 12:09:48 -0500 |
commit | 4709f72115e4028a1cb43e916925678bfceef870 (patch) | |
tree | 3959683cdc265f20a167601ef7094fc2e0ded8b4 /libavfilter/vf_gradfun.c | |
parent | e80307140f736f593ee643affa015333d7c5e27f (diff) | |
download | ffmpeg-4709f72115e4028a1cb43e916925678bfceef870.tar.gz |
lavfi: Use AV_CEIL_RSHIFT where needed
Diffstat (limited to 'libavfilter/vf_gradfun.c')
-rw-r--r-- | libavfilter/vf_gradfun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index f7c4372dd3..ce79329b61 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -172,8 +172,8 @@ static int config_input(AVFilterLink *inlink) if (!s->buf) return AVERROR(ENOMEM); - s->chroma_w = -((-inlink->w) >> hsub); - s->chroma_h = -((-inlink->h) >> vsub); + s->chroma_w = AV_CEIL_RSHIFT(inlink->w, hsub); + s->chroma_h = AV_CEIL_RSHIFT(inlink->h, vsub); s->chroma_r = av_clip(((((s->radius >> hsub) + (s->radius >> vsub)) / 2 ) + 1) & ~1, 4, 32); return 0; |