diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-05-07 18:37:27 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-09 18:59:43 +0400 |
commit | 4db84bac1353247dc7585cb78859c8085d9c556e (patch) | |
tree | e52d9ce6acc785a574dbebef0aa5dc909266afd8 /libavfilter/unsharp_opencl.c | |
parent | f0250cc4636619fc00406f520a02c36efc24c5e2 (diff) |
lavfi/opencl: replace SHIFTUP with FF_CEIL_RSHIFT.
Diffstat (limited to 'libavfilter/unsharp_opencl.c')
-rw-r--r-- | libavfilter/unsharp_opencl.c | 7 |
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); |