lavfi: Use AV_CEIL_RSHIFT where needed

This commit is contained in:
Vittorio Giovara
2016-01-21 17:47:04 -05:00
parent e80307140f
commit 4709f72115
3 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -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;