diff postproc/yuv2rgb_template.c @ 13720:821f464b4d90

adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
author aurel
date Thu, 21 Oct 2004 11:55:20 +0000
parents bc5b87370cd1
children
line wrap: on
line diff
--- a/postproc/yuv2rgb_template.c	Thu Oct 21 11:36:20 2004 +0000
+++ b/postproc/yuv2rgb_template.c	Thu Oct 21 11:55:20 2004 +0000
@@ -143,7 +143,7 @@
 	uint8_t *_py = src[0] + y*srcStride[0];
 	uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 	uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
-	int index= -h_size/2;
+	long index= -h_size/2;
 
 	b5Dither= dither8[y&1];
 	g6Dither= dither4[y&1];
@@ -204,8 +204,8 @@
 
 		     MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */
 		     
-		     "addl $16, %1			\n\t"
-		     "addl $4, %0			\n\t"
+		     "add $16, %1			\n\t"
+		     "add $4, %0			\n\t"
 		     " js 1b				\n\t"
 		     
 		     : "+r" (index), "+r" (_image)
@@ -238,7 +238,7 @@
 	uint8_t *_py = src[0] + y*srcStride[0];
 	uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 	uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
-	int index= -h_size/2;
+	long index= -h_size/2;
 
 	b5Dither= dither8[y&1];
 	g6Dither= dither4[y&1];
@@ -295,8 +295,8 @@
 
 		     MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */
 		     
-		     "addl $16, %1			\n\t"
-		     "addl $4, %0			\n\t"
+		     "add $16, %1			\n\t"
+		     "add $4, %0			\n\t"
 		     " js 1b				\n\t"
 		     : "+r" (index), "+r" (_image)
 		     : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
@@ -326,7 +326,7 @@
 	uint8_t *_py = src[0] + y*srcStride[0];
 	uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 	uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
-	int index= -h_size/2;
+	long index= -h_size/2;
 
 	    /* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
 	       pixels in each iteration */
@@ -440,8 +440,8 @@
 			"pxor %%mm4, %%mm4		\n\t"
 #endif
 		     
-		     "addl $24, %1			\n\t"
-		     "addl $4, %0			\n\t"
+		     "add $24, %1			\n\t"
+		     "add $4, %0			\n\t"
 		     " js 1b				\n\t"
 		     
 		     : "+r" (index), "+r" (_image)
@@ -472,7 +472,7 @@
 	uint8_t *_py = src[0] + y*srcStride[0];
 	uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 	uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
-	int index= -h_size/2;
+	long index= -h_size/2;
 
 	    /* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
 	       pixels in each iteration */
@@ -526,8 +526,8 @@
 		     "pxor %%mm4, %%mm4;" /* zero mm4 */
 		     "movq 8 (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
 
-		     "addl $32, %1			\n\t"
-		     "addl $4, %0			\n\t"
+		     "add $32, %1			\n\t"
+		     "add $4, %0			\n\t"
 		     " js 1b				\n\t"
 		     
 		     : "+r" (index), "+r" (_image)