# HG changeset patch # User sdrik # Date 1235806296 0 # Node ID 87f496299f0951b7f5e8583156de39a10a76dd93 # Parent 8a74ab19d2240e53e834039aaed8e7f3d55e4148 Fix avpicture_layout to not chroma shift the alpha plane when outputting YUVA420P diff -r 8a74ab19d224 -r 87f496299f09 imgconvert.c --- a/imgconvert.c Fri Feb 27 21:28:41 2009 +0000 +++ b/imgconvert.c Sat Feb 28 07:31:36 2009 +0000 @@ -721,7 +721,7 @@ unsigned char *dest, int dest_size) { const PixFmtInfo* pf = &pix_fmt_info[pix_fmt]; - int i, j, w, h, data_planes; + int i, j, w, ow, h, oh, data_planes; const unsigned char* s; int size = avpicture_get_size(pix_fmt, width, height); @@ -751,10 +751,16 @@ h = height; } + ow = w; + oh = h; + for (i=0; i> pf->x_chroma_shift; h = height >> pf->y_chroma_shift; + } else if (i == 3) { + w = ow; + h = oh; } s = src->data[i]; for(j=0; j