Commit f2e34be1 authored by reimar's avatar reimar

100l in avpicture_layout: width of chroma planes depends on format depth, too.

Fixes issue 1465


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20202 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3b875e2e
...@@ -897,7 +897,7 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, ...@@ -897,7 +897,7 @@ 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 >> pf->x_chroma_shift; w = ((width >> pf->x_chroma_shift) * pf->depth + 7) / 8;
h = height >> pf->y_chroma_shift; h = height >> pf->y_chroma_shift;
} else if (i == 3) { } else if (i == 3) {
w = ow; w = ow;
......
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