diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2010-03-05 20:04:24 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2010-03-05 20:04:24 +0000 |
commit | 09ab885975982a9605c26b285f4409bf3383990a (patch) | |
tree | 07f552ad6dc6bf30b1bd500674ec86d5c8249cc4 | |
parent | 5301a05d3ea208c140b41515468f98f5d94ddab9 (diff) | |
download | ffmpeg-09ab885975982a9605c26b285f4409bf3383990a.tar.gz |
Round correctly chroma picture height.
Fix issue 956.
Originally committed as revision 22223 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/imgconvert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index e1dde8146d..0fb2fe6c46 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -760,8 +760,8 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, for (i=0; i<data_planes; i++) { if (i == 1) { - w = ((width >> desc->log2_chroma_w) * pf->depth + 7) / 8; - h = height >> desc->log2_chroma_h; + w = (- ((-width) >> desc->log2_chroma_w) * pf->depth + 7) / 8; + h = -((-height) >> desc->log2_chroma_h); if (pix_fmt == PIX_FMT_NV12 || pix_fmt == PIX_FMT_NV21) w <<= 1; } else if (i == 3) { |