1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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;