[Mplayer-cvslog] CVS: main/postproc swscale.c,1.40,1.41 postprocess.c,1.35,1.36

Michael Niedermayer michael at mplayer.dev.hu
Tue Nov 6 20:26:25 CET 2001


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

Modified Files:
	swscale.c postprocess.c 
Log Message:
gcc does optimize writes to non volatile variables away if it didnt know that they were read in between


Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- swscale.c	6 Nov 2001 18:42:22 -0000	1.40
+++ swscale.c	6 Nov 2001 19:26:22 -0000	1.41
@@ -71,10 +71,10 @@
 static uint64_t __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL;
 static uint64_t __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL;
 
-static uint64_t __attribute__((aligned(8))) b5Dither;
-static uint64_t __attribute__((aligned(8))) g5Dither;
-static uint64_t __attribute__((aligned(8))) g6Dither;
-static uint64_t __attribute__((aligned(8))) r5Dither;
+static volatile uint64_t __attribute__((aligned(8))) b5Dither;
+static volatile uint64_t __attribute__((aligned(8))) g5Dither;
+static volatile uint64_t __attribute__((aligned(8))) g6Dither;
+static volatile uint64_t __attribute__((aligned(8))) r5Dither;
 
 static uint64_t __attribute__((aligned(8))) dither4[2]={
 	0x0103010301030103LL,

Index: postprocess.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/postprocess.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- postprocess.c	6 Nov 2001 16:53:47 -0000	1.35
+++ postprocess.c	6 Nov 2001 19:26:22 -0000	1.36
@@ -116,8 +116,8 @@
 #define OPTIONS_ARRAY_SIZE 10
 
 #ifdef HAVE_MMX
-static uint64_t __attribute__((aligned(8))) packedYOffset=	0x0000000000000000LL;
-static uint64_t __attribute__((aligned(8))) packedYScale=	0x0100010001000100LL;
+static volatile uint64_t __attribute__((aligned(8))) packedYOffset=	0x0000000000000000LL;
+static volatile uint64_t __attribute__((aligned(8))) packedYScale=	0x0100010001000100LL;
 static uint64_t __attribute__((aligned(8))) w05=		0x0005000500050005LL;
 static uint64_t __attribute__((aligned(8))) w20=		0x0020002000200020LL;
 static uint64_t __attribute__((aligned(8))) w1400=		0x1400140014001400LL;




More information about the MPlayer-cvslog mailing list