lavfi/yadif: fix chroma subsampling with odd sizes.

This commit is contained in:
Clément Bœsch 2013-05-16 19:02:32 +02:00
parent 61b268eeda
commit f3962c6264

View File

@ -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,