[FFmpeg-cvslog] swscale: use yuv2packed1() functions for unscaled chroma also.
Ronald S. Bultje
git at videolan.org
Tue Feb 14 02:18:51 CET 2012
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Feb 12 15:48:24 2012 -0800| [9d9c84649178468241a65e7e99c095ef192803c0] | committer: Ronald S. Bultje
swscale: use yuv2packed1() functions for unscaled chroma also.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d9c84649178468241a65e7e99c095ef192803c0
---
libswscale/swscale.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index ddfafbe..d05e681 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);
More information about the ffmpeg-cvslog
mailing list