# HG changeset patch # User diego # Date 1225321669 0 # Node ID 1fe764a5c33ed99f64d88b01dcf85a1b53d50593 # Parent 75d40b4b28ed3b1939105d7a2e178272d3a4a99d Fix av_picture_copy missing pixels on packed planar AVPictures with odd size. patch by Art Clarke, aclarke vlideshow com diff -r 75d40b4b28ed -r 1fe764a5c33e imgconvert.c --- a/imgconvert.c Wed Oct 29 21:08:14 2008 +0000 +++ b/imgconvert.c Wed Oct 29 23:07:49 2008 +0000 @@ -870,7 +870,7 @@ break; case FF_PIXEL_PLANAR: if (plane == 1 || plane == 2) - width >>= pf->x_chroma_shift; + width= -((-width)>>pf->x_chroma_shift); return (width * pf->depth + 7) >> 3; break; @@ -900,7 +900,7 @@ h = height; if (i == 1 || i == 2) { w >>= pf->x_chroma_shift; - h >>= pf->y_chroma_shift; + h= -((-height)>>pf->y_chroma_shift); } ff_img_copy_plane(dst->data[i], dst->linesize[i], src->data[i], src->linesize[i],