diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-11 07:05:26 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-11 07:05:26 +0000 |
commit | 9881d05d805d24d6a3b6158dcf3082a0f6498a5b (patch) | |
tree | 85fce606a84d10bafff034db009fcacc6177bbaf | |
parent | 53b04467ae7d8cbe83f801022e61d8bdac8d84f2 (diff) | |
download | ffmpeg-9881d05d805d24d6a3b6158dcf3082a0f6498a5b.tar.gz |
100l in avpicture_layout: width of chroma planes depends on format depth, too.
Fixes issue 1465
Originally committed as revision 20202 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/imgconvert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 4698fcf82e..9826a6a358 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -897,7 +897,7 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, for (i=0; i<data_planes; i++) { 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; } else if (i == 3) { w = ow; |