[Mplayer-cvslog] CVS: main/postproc swscale-example.c,1.3,1.4

Alex Beregszaszi alex at mplayerhq.hu
Fri May 23 22:13:20 CEST 2003


Update of /cvsroot/mplayer/main/postproc
In directory mail:/var/tmp.root/cvs-serv2565

Modified Files:
	swscale-example.c 
Log Message:
non-x86 support

Index: swscale-example.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale-example.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- swscale-example.c	25 Apr 2003 17:16:55 -0000	1.3
+++ swscale-example.c	23 May 2003 20:12:44 -0000	1.4
@@ -22,6 +22,8 @@
 #include <inttypes.h>
 #include <stdarg.h>
 
+#include "../config.h"
+
 #include "swscale.h"
 #include "../libvo/img_format.h"
 
@@ -101,7 +103,10 @@
 	sws_scale(srcContext, ref, refStride, 0, h   , src, srcStride);
 	sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);
 	sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);
-asm volatile ("emms\n\t");
+
+#ifdef ARCH_X86
+	asm volatile ("emms\n\t");
+#endif
 	     
 	ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);
 	ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1);
@@ -194,9 +199,17 @@
 			rgb_data[ x + y*4*W]= random();
 		}
 	}
+#ifdef ARCH_X86
 	sws_rgb2rgb_init(SWS_CPU_CAPS_MMX*0);
+#else
+	sws_rgb2rgb_init(0);
+#endif
 	sws_scale(sws, rgb_src, rgb_stride, 0, H   , src, stride);
-asm volatile ("emms\n\t");
+
+#ifdef ARCH_X86
+	asm volatile ("emms\n\t");
+#endif
+
 	selfTest(src,  stride, W, H);
 
         return 123;



More information about the MPlayer-cvslog mailing list