[SCM] libav/experimental: Adds "YUYV422 to YUVA420P" and "UYVY422 to YUVA420P" unscaled convertion
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:42:30 UTC 2013
The following commit has been merged in the experimental branch:
commit 4626ee1a8ce17e93a37dd1c70c63256632cee281
Author: Cédric Schieli <cschieli at gmail.com>
Date: Tue Mar 24 07:11:35 2009 +0000
Adds "YUYV422 to YUVA420P" and "UYVY422 to YUVA420P" unscaled convertion
Originally committed as revision 29048 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index c9e56cc..316f451 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1885,6 +1885,9 @@ static int YUYV2YUV420Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], in
yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
+ if (dstParam[3])
+ fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);
+
return srcSliceH;
}
@@ -1907,6 +1910,9 @@ static int UYVY2YUV420Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], in
uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
+ if (dstParam[3])
+ fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);
+
return srcSliceH;
}
@@ -2582,9 +2588,9 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
c->swScale= PlanarToUyvyWrapper;
}
}
- if(srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV420P)
+ if(srcFormat == PIX_FMT_YUYV422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P))
c->swScale= YUYV2YUV420Wrapper;
- if(srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV420P)
+ if(srcFormat == PIX_FMT_UYVY422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P))
c->swScale= UYVY2YUV420Wrapper;
if(srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV422P)
c->swScale= YUYV2YUV422Wrapper;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list