Commit f7fe1cff authored by vitor's avatar vitor

Round correctly chroma picture height.

Fix issue 956.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22223 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b0923b3f
...@@ -760,8 +760,8 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, ...@@ -760,8 +760,8 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
for (i=0; i<data_planes; i++) { for (i=0; i<data_planes; i++) {
if (i == 1) { if (i == 1) {
w = ((width >> desc->log2_chroma_w) * pf->depth + 7) / 8; w = (- ((-width) >> desc->log2_chroma_w) * pf->depth + 7) / 8;
h = height >> desc->log2_chroma_h; h = -((-height) >> desc->log2_chroma_h);
if (pix_fmt == PIX_FMT_NV12 || pix_fmt == PIX_FMT_NV21) if (pix_fmt == PIX_FMT_NV12 || pix_fmt == PIX_FMT_NV21)
w <<= 1; w <<= 1;
} else if (i == 3) { } else if (i == 3) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment