[FFmpeg-cvslog] r20202 - trunk/libavcodec/imgconvert.c

reimar subversion
Sun Oct 11 09:05:26 CEST 2009


Author: reimar
Date: Sun Oct 11 09:05:26 2009
New Revision: 20202

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

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sun Oct 11 07:36:59 2009	(r20201)
+++ trunk/libavcodec/imgconvert.c	Sun Oct 11 09:05:26 2009	(r20202)
@@ -897,7 +897,7 @@ int avpicture_layout(const AVPicture* sr
 
     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;



More information about the ffmpeg-cvslog mailing list