lavfi/mptestsrc: fix chroma subsampling with odd sizes.

This makes no difference in practice since w & h are hardcoded to 512.
This commit is contained in:
Clément Bœsch 2013-05-16 18:58:35 +02:00
parent 7ba04b3c48
commit 1fb52bf920

View File

@ -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;