Browse Source

lavfi/mptestsrc: fix chroma subsampling with odd sizes.

This makes no difference in practice since w & h are hardcoded to 512.
tags/n2.0
Clément Bœsch 12 years ago
parent
commit
1fb52bf920
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavfilter/vsrc_mptestsrc.c

+ 2
- 1
libavfilter/vsrc_mptestsrc.c 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;


Loading…
Cancel
Save