git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ba04b3
)
lavfi/mptestsrc: fix chroma subsampling with odd sizes.
author
Clément Bœsch
<ubitux@gmail.com>
Thu, 16 May 2013 16:58:35 +0000
(18:58 +0200)
committer
Clément Bœsch
<ubitux@gmail.com>
Sat, 1 Jun 2013 10:05:55 +0000
(12:05 +0200)
This makes no difference in practice since w & h are hardcoded to 512.
libavfilter/vsrc_mptestsrc.c
patch
|
blob
|
history
diff --git
a/libavfilter/vsrc_mptestsrc.c
b/libavfilter/vsrc_mptestsrc.c
index
e931c76
..
fe07140
100644
(file)
--- 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;