[MPlayer-dev-eng] [PATCH] fix scaler on 64 bit

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri May 5 11:04:46 CEST 2006


Hi,
the current scaler code stores the esp register in a 32 bit variable -
baaad idea for 64 bit machine.
Please comment on the attached patch, I intend to apply soon.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: postproc/swscale_internal.h
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale_internal.h,v
retrieving revision 1.16
diff -u -r1.16 swscale_internal.h
--- postproc/swscale_internal.h	11 Feb 2006 14:16:10 -0000	1.16
+++ postproc/swscale_internal.h	5 May 2006 09:02:55 -0000
@@ -124,8 +124,8 @@
 #define LUM_MMX_FILTER_OFFSET "11*8"
 #define CHR_MMX_FILTER_OFFSET "11*8+4*4*256"
 #define DSTW_OFFSET  "11*8+4*4*256*2" //do not change, its hardcoded in the asm
-#define ESP_OFFSET  "11*8+4*4*256*2+4"
-#define VROUNDER_OFFSET "11*8+4*4*256*2+8"
+#define ESP_OFFSET  "11*8+4*4*256*2+8"
+#define VROUNDER_OFFSET "11*8+4*4*256*2+16"
                   
 	uint64_t redDither   __attribute__((aligned(8)));
 	uint64_t greenDither __attribute__((aligned(8)));
@@ -142,7 +142,7 @@
 	int32_t  lumMmxFilter[4*MAX_FILTER_SIZE];
 	int32_t  chrMmxFilter[4*MAX_FILTER_SIZE];
 	int dstW;
-	int esp;
+	uint64_t esp __attribute__((aligned(8)));
 	uint64_t vRounder     __attribute__((aligned(8)));
 
 #ifdef HAVE_ALTIVEC


More information about the MPlayer-dev-eng mailing list