aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_mpdecimate.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-09 17:59:38 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-10 17:20:06 +0200
commit50e66726a237e07f6557eaca1da2e9eb18ee7fda (patch)
treeeb080502558818b6e623309776e254d4be88beed /libavfilter/vf_mpdecimate.c
parentd751a2526f9be0e8aa72cb2ebf9b8686c8888e89 (diff)
downloadffmpeg-50e66726a237e07f6557eaca1da2e9eb18ee7fda.tar.gz
lavfi: use ceil right shift for chroma width/height.
This should fix several issues with odd dimensions inputs. lut, vflip, pad and crop video filters also need to be checked for such issues. It's possible sws is also affected.
Diffstat (limited to 'libavfilter/vf_mpdecimate.c')
-rw-r--r--libavfilter/vf_mpdecimate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c
index 2e386f7df6..45d510ba40 100644
--- a/libavfilter/vf_mpdecimate.c
+++ b/libavfilter/vf_mpdecimate.c
@@ -122,7 +122,8 @@ static int decimate_frame(AVFilterContext *ctx,
int hsub = plane == 1 || plane == 2 ? decimate->hsub : 0;
if (diff_planes(ctx,
cur->data[plane], ref->data[plane], ref->linesize[plane],
- ref->width>>hsub, ref->height>>vsub))
+ FF_CEIL_RSHIFT(ref->width, hsub),
+ FF_CEIL_RSHIFT(ref->height, vsub)))
return 0;
}