Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-07 18:31:02 +0400
committerClément Bœsch <ubitux@gmail.com>2013-05-09 18:59:42 +0400
commit570d63eef3f911869672cd20fa9c2abedb11093d (patch)
tree2b993b08de62362e2e59e8049e28a92e6c2bb0af /libavfilter/deshake_opencl.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
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);