summaryrefslogtreecommitdiff
path: root/libavfilter/vsrc_mptestsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vsrc_mptestsrc.c')
-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;