[FFmpeg-cvslog] r28746 - trunk/libswscale/swscale.c

sdrik subversion
Fri Feb 27 23:13:55 CET 2009


Author: sdrik
Date: Fri Feb 27 23:13:55 2009
New Revision: 28746

Log:
Use YUV420P code path for YUVA420P where appropriate

Modified:
   trunk/libswscale/swscale.c

Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c	Fri Feb 27 23:13:39 2009	(r28745)
+++ trunk/libswscale/swscale.c	Fri Feb 27 23:13:55 2009	(r28746)
@@ -2327,12 +2327,12 @@ SwsContext *sws_getContext(int srcW, int
     if (unscaled && !usesHFilter && !usesVFilter && (srcRange == dstRange || isBGR(dstFormat) || isRGB(dstFormat)))
     {
         /* yv12_to_nv12 */
-        if (srcFormat == PIX_FMT_YUV420P && (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21))
+        if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) && (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21))
         {
             c->swScale= PlanarToNV12Wrapper;
         }
         /* yuv2bgr */
-        if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
+        if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P || srcFormat==PIX_FMT_YUVA420P) && (isBGR(dstFormat) || isRGB(dstFormat))
             && !(flags & SWS_ACCURATE_RND) && !(dstH&1))
         {
             c->swScale= sws_yuv2rgb_get_func_ptr(c);
@@ -2383,7 +2383,7 @@ SwsContext *sws_getContext(int srcW, int
         /* LQ converters if -sws 0 or -sws 4*/
         if (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)){
             /* yv12_to_yuy2 */
-            if (srcFormat == PIX_FMT_YUV420P)
+            if (srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P)
             {
                 if (dstFormat == PIX_FMT_YUYV422)
                     c->swScale= PlanarToYuy2Wrapper;
@@ -2406,6 +2406,7 @@ SwsContext *sws_getContext(int srcW, int
 
         /* simple copy */
         if (  srcFormat == dstFormat
+            || (srcFormat == PIX_FMT_YUVA420P && dstFormat == PIX_FMT_YUV420P)
             || (isPlanarYUV(srcFormat) && isGray(dstFormat))
             || (isPlanarYUV(dstFormat) && isGray(srcFormat)))
         {




More information about the ffmpeg-cvslog mailing list