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_transpose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavfilter/vf_transpose.c') diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index bd66a613fd..c949e07e5c 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -163,8 +163,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) int vsub = plane == 1 || plane == 2 ? trans->vsub : 0; int pixstep = trans->pixsteps[plane]; int inh = in->height >> vsub; - int outw = out->width >> hsub; - int outh = out->height >> vsub; + int outw = FF_CEIL_RSHIFT(out->width, hsub); + int outh = FF_CEIL_RSHIFT(out->height, vsub); uint8_t *dst, *src; int dstlinesize, srclinesize; int x, y; -- cgit v1.2.3