[FFmpeg-cvslog] lavfi/mptestsrc: fix chroma subsampling with odd sizes.

Clément Bœsch git at videolan.org
Sat Jun 1 12:15:22 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu May 16 18:58:35 2013 +0200| [1fb52bf9207689f35b2b5ba58b9938d25df9c82e] | committer: Clément Bœsch

lavfi/mptestsrc: fix chroma subsampling with odd sizes.

This makes no difference in practice since w & h are hardcoded to 512.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1fb52bf9207689f35b2b5ba58b9938d25df9c82e
---

 libavfilter/vsrc_mptestsrc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index e931c76..fe07140 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -301,7 +301,8 @@ static int request_frame(AVFilterLink *outlink)
 {
     MPTestContext *test = outlink->src->priv;
     AVFrame *picref;
-    int w = WIDTH, h = HEIGHT, cw = w>>test->hsub, ch = h>>test->vsub;
+    int w = WIDTH, h = HEIGHT,
+        cw = FF_CEIL_RSHIFT(w, test->hsub), ch = FF_CEIL_RSHIFT(h, test->vsub);
     unsigned int frame = test->frame_nb;
     enum test_type tt = test->test;
     int i;



More information about the ffmpeg-cvslog mailing list