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

stefano subversion
Sun Jun 6 20:29:39 CEST 2010


Author: stefano
Date: Sun Jun  6 20:29:39 2010
New Revision: 23507

Log:
Fix width computation for nv12/nv21 in ff_get_plane_bytewidth().

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sun Jun  6 18:50:18 2010	(r23506)
+++ trunk/libavcodec/imgconvert.c	Sun Jun  6 20:29:39 2010	(r23507)
@@ -948,7 +948,8 @@ int ff_get_plane_bytewidth(enum PixelFor
         return (width * bits + 7) >> 3;
         break;
     case FF_PIXEL_PLANAR:
-            if (plane == 1 || plane == 2)
+            if ((pix_fmt != PIX_FMT_NV12 && pix_fmt != PIX_FMT_NV21) &&
+                (plane == 1 || plane == 2))
                 width= -((-width)>>desc->log2_chroma_w);
 
             return (width * pf->depth + 7) >> 3;



More information about the ffmpeg-cvslog mailing list