Commit 1fb52bf9 authored by Clément Bœsch's avatar 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.
parent 7ba04b3c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment