diff options
author | vitor <vitor@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-05-07 20:41:04 +0000 |
---|---|---|
committer | vitor <vitor@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-05-07 20:41:04 +0000 |
commit | 19c12794ad0eb28d0a02a760d2419626763b2eb6 (patch) | |
tree | fb9bb3c15cbc700c875c52acfbd17e397bed5630 /libswscale | |
parent | efaa440083eaa0880cbf3276714c2c7fd79b10c9 (diff) |
Fix sliced yuv410 -> yuv420 conversion
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29272 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 19d93ddacf..a0954ad845 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2108,11 +2108,15 @@ static int yvu9toyv12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int } if (c->dstFormat==PIX_FMT_YUV420P || c->dstFormat==PIX_FMT_YUVA420P){ - planar2x(src[1], dst[1], c->chrSrcW, c->chrSrcH, srcStride[1], dstStride[1]); - planar2x(src[2], dst[2], c->chrSrcW, c->chrSrcH, srcStride[2], dstStride[2]); + planar2x(src[1], dst[1] + dstStride[1]*(srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[1], dstStride[1]); + planar2x(src[2], dst[2] + dstStride[2]*(srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[2], dstStride[2]); }else{ - planar2x(src[1], dst[2], c->chrSrcW, c->chrSrcH, srcStride[1], dstStride[2]); - planar2x(src[2], dst[1], c->chrSrcW, c->chrSrcH, srcStride[2], dstStride[1]); + planar2x(src[1], dst[2] + dstStride[2]*(srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[1], dstStride[2]); + planar2x(src[2], dst[1] + dstStride[1]*(srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[2], dstStride[1]); } if (dst[3]) fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); |