changeset 10172:3241b7ca2b2c

non-x86 support
author alex
date Fri, 23 May 2003 20:12:44 +0000
parents 92adc6f5c00c
children 5c3a8881adc4
files postproc/swscale-example.c
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/swscale-example.c	Fri May 23 19:41:37 2003 +0000
+++ b/postproc/swscale-example.c	Fri May 23 20:12:44 2003 +0000
@@ -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;