From 50e66726a237e07f6557eaca1da2e9eb18ee7fda Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Thu, 9 May 2013 17:59:38 +0200 Subject: 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. --- libavfilter/vf_mpdecimate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavfilter/vf_mpdecimate.c') 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; } -- cgit v1.2.3