[FFmpeg-devel] [PATCH 4/5] lavfi/yadif: fix chroma subsampling with odd sizes.
Clément Bœsch
ubitux at gmail.com
Thu May 16 19:15:16 CEST 2013
---
libavfilter/vf_yadif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 5d8934b..cc7c3e2 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,
--
1.8.2.3
More information about the ffmpeg-devel
mailing list