[SCM] libav/experimental: fixing yuy2 upscaling (use -sws 0 for the faster but uglier variant)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:33:36 UTC 2013


The following commit has been merged in the experimental branch:
commit 2ce486d8505c84bc659357689c96c07b0a9aad66
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Oct 13 19:46:51 2002 +0000

    fixing yuy2 upscaling (use -sws 0 for the faster but uglier variant)
    
    Originally committed as revision 7726 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

diff --git a/postproc/swscale.c b/postproc/swscale.c
index 3b2b8d3..6962443 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -2047,16 +2047,6 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
 					vo_format_name(srcFormat), vo_format_name(dstFormat));
 			return c;
 		}
-		/* yv12_to_yuy2 */
-		if((srcFormat == IMGFMT_YV12||srcFormat==IMGFMT_I420)&&dstFormat == IMGFMT_YUY2)
-		{
-			c->swScale= PlanarToYuy2Wrapper;
-
-			if(flags&SWS_PRINT_INFO)
-				MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n", 
-					vo_format_name(srcFormat), vo_format_name(dstFormat));
-			return c;
-		}
 		/* yuv2bgr */
 		if((srcFormat==IMGFMT_YV12 || srcFormat==IMGFMT_I420) && isBGR(dstFormat))
 		{
@@ -2121,6 +2111,17 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
 			  && (isBGR(dstFormat) || isRGB(dstFormat)) 
 			  && needsDither)
 				c->swScale= rgb2rgbWrapper;
+
+			/* yv12_to_yuy2 */
+			if((srcFormat == IMGFMT_YV12||srcFormat==IMGFMT_I420)&&dstFormat == IMGFMT_YUY2)
+			{
+				c->swScale= PlanarToYuy2Wrapper;
+
+				if(flags&SWS_PRINT_INFO)
+					MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n", 
+						vo_format_name(srcFormat), vo_format_name(dstFormat));
+				return c;
+			}
 		}
 
 		if(c->swScale){

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list