summaryrefslogtreecommitdiff
path: root/libavfilter/unsharp_opencl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/unsharp_opencl.c')
-rw-r--r--libavfilter/unsharp_opencl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/unsharp_opencl.c b/libavfilter/unsharp_opencl.c
index 91a1292367..b373b66116 100644
--- a/libavfilter/unsharp_opencl.c
+++ b/libavfilter/unsharp_opencl.c
@@ -24,6 +24,7 @@
*/
#include "unsharp_opencl.h"
+#include "libavutil/common.h"
#include "libavutil/opencl_internal.h"
#define PLANE_NUM 3
@@ -152,8 +153,8 @@ int ff_opencl_apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
AVFilterLink *link = ctx->inputs[0];
UnsharpContext *unsharp = ctx->priv;
cl_int status;
- int cw = SHIFTUP(link->w, unsharp->hsub);
- int ch = SHIFTUP(link->h, unsharp->vsub);
+ int cw = FF_CEIL_RSHIFT(link->w, unsharp->hsub);
+ int ch = FF_CEIL_RSHIFT(link->h, unsharp->vsub);
const size_t global_work_size = link->w * link->h + 2 * ch * cw;
FFOpenclParam opencl_param = {0};
@@ -245,7 +246,7 @@ int ff_opencl_unsharp_process_inout_buf(AVFilterContext *ctx, AVFrame *in, AVFra
int ret = 0;
AVFilterLink *link = ctx->inputs[0];
UnsharpContext *unsharp = ctx->priv;
- int ch = SHIFTUP(link->h, unsharp->vsub);
+ int ch = FF_CEIL_RSHIFT(link->h, unsharp->vsub);
if ((!unsharp->opencl_ctx.cl_inbuf) || (!unsharp->opencl_ctx.cl_outbuf)) {
unsharp->opencl_ctx.in_plane_size[0] = (in->linesize[0] * in->height);