Mercurial > libavcodec.hg
changeset 9070:87f496299f09 libavcodec
Fix avpicture_layout to not chroma shift the alpha plane when outputting YUVA420P
author | sdrik |
---|---|
date | Sat, 28 Feb 2009 07:31:36 +0000 |
parents | 8a74ab19d224 |
children | 24d0633a5248 |
files | imgconvert.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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<data_planes; i++) { if (i == 1) { w = width >> 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<h; j++) {