From f3962c62641d3d73efedf1c15152dfa3d8f8e3b0 Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Thu, 16 May 2013 19:02:32 +0200 Subject: lavfi/yadif: fix chroma subsampling with odd sizes. --- libavfilter/vf_yadif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavfilter/vf_yadif.c') diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 5d8934b3c6..cc7c3e2114 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -187,8 +187,8 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic, if (i == 1 || i == 2) { /* Why is this not part of the per-plane description thing? */ - w >>= yadif->csp->log2_chroma_w; - h >>= yadif->csp->log2_chroma_h; + w = FF_CEIL_RSHIFT(w, yadif->csp->log2_chroma_w); + h = FF_CEIL_RSHIFT(h, yadif->csp->log2_chroma_h); } /* filtering reads 3 pixels to the left/right; to avoid invalid reads, -- cgit v1.2.3