From 42d622fab31dbcae91fd4b0810e0ac07027e2df1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 8 Jul 2011 14:52:52 -0700 Subject: swscale: fix 16-bit scaling when output is 8-bits. We would use the second half of the U plane buffer, rather than the V plane buffer, to output the V plane pixels. --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale/utils.c') diff --git a/libswscale/utils.c b/libswscale/utils.c index 9f0bb7a8b9..fd10fa03fb 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1053,7 +1053,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) for (i=0; ivChrBufSize; i++) { FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+1, fail); c->chrUPixBuf[i] = c->chrUPixBuf[i+c->vChrBufSize]; - c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + dst_stride_px; + c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + (dst_stride >> 1); } if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) for (i=0; ivLumBufSize; i++) { -- cgit v1.2.3