[FFmpeg-devel] [PATCH] av_picture_copy misses pixels on packed planar AVPictures with odd width or height

Art Clarke aclarke
Wed Oct 29 20:15:28 CET 2008

On Wed, Oct 29, 2008 at 9:38 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> 1) Create a AVPicture with an odd width and height (e.g. 503w x 251h)
>> in a packed pixel format (e.g. YUV_420P).
> P stands for planar
Yeah... realized I mistyped packed after I sent that.

> width= -((-width)>>pf->x_chroma_shift);
See attached diff.  By the way, if you care about the original code I
used, I snagged it from the much hotter (usually) ff_fill_* methods.
I'm not going to patch those methods because the old code does the
right thing, just not as elegantly.

> this seems to contain an unrelated change
Yup, it was removing an unused variable (as I documented).  New patch
now no longer removes that variable, but also doesn't fix the
incorrect calculation the unused variable does.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081029/72cd376e/attachment.txt>

More information about the ffmpeg-devel mailing list