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

vitor subversion
Fri Mar 5 21:04:25 CET 2010


Author: vitor
Date: Fri Mar  5 21:04:24 2010
New Revision: 22223

Log:
Round correctly chroma picture height.

Fix issue 956.

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Fri Mar  5 18:26:34 2010	(r22222)
+++ trunk/libavcodec/imgconvert.c	Fri Mar  5 21:04:24 2010	(r22223)
@@ -760,8 +760,8 @@ int avpicture_layout(const AVPicture* sr
 
     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) {



More information about the ffmpeg-cvslog mailing list