aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/deshake_opencl.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/deshake_opencl.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
downloadffmpeg-570d63eef3f911869672cd20fa9c2abedb11093d.tar.gz
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libavfilter/deshake_opencl.c')
-rw-r--r--libavfilter/deshake_opencl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/deshake_opencl.c b/libavfilter/deshake_opencl.c
index adca5ea2cb..eea873ea4a 100644
--- a/libavfilter/deshake_opencl.c
+++ b/libavfilter/deshake_opencl.c
@@ -135,7 +135,8 @@ int ff_opencl_deshake_process_inout_buf(AVFilterContext *ctx, AVFrame *in, AVFra
int ret = 0;
AVFilterLink *link = ctx->inputs[0];
DeshakeContext *deshake = ctx->priv;
- int chroma_height = -((-link->h) >> av_pix_fmt_desc_get(link->format)->log2_chroma_h);
+ const int hshift = av_pix_fmt_desc_get(link->format)->log2_chroma_h;
+ int chroma_height = FF_CEIL_RSHIFT(link->h, hshift);
if ((!deshake->opencl_ctx.cl_inbuf) || (!deshake->opencl_ctx.cl_outbuf)) {
deshake->opencl_ctx.in_plane_size[0] = (in->linesize[0] * in->height);