aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-16 18:58:35 +0200
committerClément Bœsch <ubitux@gmail.com>2013-06-01 12:05:55 +0200
commit1fb52bf9207689f35b2b5ba58b9938d25df9c82e (patch)
treee0872d5de7776bd3f110ffa7bf187aad90fd8a8d
parent7ba04b3c4835085514580abf4e10136b77505f63 (diff)
downloadffmpeg-1fb52bf9207689f35b2b5ba58b9938d25df9c82e.tar.gz
lavfi/mptestsrc: fix chroma subsampling with odd sizes.
This makes no difference in practice since w & h are hardcoded to 512.
-rw-r--r--libavfilter/vsrc_mptestsrc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index e931c76842..fe071402ab 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;