diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-13 03:48:24 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-13 19:14:04 +0400 |
commit | 9d9c84649178468241a65e7e99c095ef192803c0 (patch) | |
tree | 9187bca8410aef8cd412ae2117ba1a5e1d77c83b /libswscale | |
parent | d63b7d8c37e6d18c36d6e95f76efd934beb704c0 (diff) |
swscale: use yuv2packed1() functions for unscaled chroma also.
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index ddfafbe530..d05e6819a8 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -589,8 +589,8 @@ static int swScale(SwsContext *c, const uint8_t* src[], } else { assert(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2); assert(chrUSrcPtr + vChrFilterSize - 1 < chrUPixBuf + vChrBufSize*2); - if (c->yuv2packed1 && vLumFilterSize == 1 && vChrFilterSize == 2) { //unscaled RGB - int chrAlpha = vChrFilter[2 * dstY + 1]; + if (c->yuv2packed1 && vLumFilterSize == 1 && vChrFilterSize <= 2) { //unscaled RGB + int chrAlpha = vChrFilterSize == 1 ? 0 : vChrFilter[2 * dstY + 1]; yuv2packed1(c, *lumSrcPtr, chrUSrcPtr, chrVSrcPtr, alpPixBuf ? *alpSrcPtr : NULL, dest[0], dstW, chrAlpha, dstY); |