[MPlayer-cvslog] CVS: main/postproc swscale_template.c,1.122,1.123
    Alan Curry CVS 
    syncmail at mplayerhq.hu
       
    Sat Feb 18 01:41:31 CET 2006
    
    
  
CVS change done by Alan Curry CVS
Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv1331
Modified Files:
	swscale_template.c 
Log Message:
don't call altivec_yuv2packedX() with a dstFormat that it doesn't support;
instead fall back on yuv2packedXinC
Index: swscale_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale_template.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- swscale_template.c	13 Jan 2006 00:23:32 -0000	1.122
+++ swscale_template.c	18 Feb 2006 00:41:28 -0000	1.123
@@ -967,14 +967,19 @@
 #endif
 	default:
 #ifdef HAVE_ALTIVEC
-		altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize,
-			    chrFilter, chrSrc, chrFilterSize,
-			    dest, dstW, dstY);
-#else
-		yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
-			    chrFilter, chrSrc, chrFilterSize,
-			    dest, dstW, dstY);
+		/* The following list of supported dstFormat values should
+		   match what's found in the body of altivec_yuv2packedX() */
+		if(c->dstFormat==IMGFMT_ABGR  || c->dstFormat==IMGFMT_BGRA  ||
+		   c->dstFormat==IMGFMT_BGR24 || c->dstFormat==IMGFMT_RGB24 ||
+		   c->dstFormat==IMGFMT_RGBA  || c->dstFormat==IMGFMT_ARGB)
+			altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize,
+				    chrFilter, chrSrc, chrFilterSize,
+				    dest, dstW, dstY);
+		else
 #endif
+			yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
+				    chrFilter, chrSrc, chrFilterSize,
+				    dest, dstW, dstY);
 		break;
 	}
 }
    
    
More information about the MPlayer-cvslog
mailing list