summaryrefslogtreecommitdiffstats
path: root/libavfilter/deshake_opencl.c
diff options
context:
space:
mode:
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 adca5ea..eea873e 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);
OpenPOWER on IntegriCloud