Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-16 20:58:35 +0400
committerClément Bœsch <ubitux@gmail.com>2013-06-01 14:05:55 +0400
commit1fb52bf9207689f35b2b5ba58b9938d25df9c82e (patch)
treee0872d5de7776bd3f110ffa7bf187aad90fd8a8d /libavfilter/vsrc_mptestsrc.c
parent7ba04b3c4835085514580abf4e10136b77505f63 (diff)
lavfi/mptestsrc: fix chroma subsampling with odd sizes.
This makes no difference in practice since w & h are hardcoded to 512.
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;