# HG changeset patch # User stefano # Date 1275848979 0 # Node ID 3c812305443bd4301a3672517a8512a450bc7e09 # Parent 37c2c2afd349a127e9ee333331af015cbf308472 Fix width computation for nv12/nv21 in ff_get_plane_bytewidth(). diff -r 37c2c2afd349 -r 3c812305443b imgconvert.c --- a/imgconvert.c Sun Jun 06 15:27:37 2010 +0000 +++ b/imgconvert.c Sun Jun 06 18:29:39 2010 +0000 @@ -948,7 +948,8 @@ 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;