changeset 2521:b70a77066611

tell the c compiler that the memory changed
author michael
date Sun, 28 Oct 2001 19:54:23 +0000
parents b58c43aab619
children fdf1a17cc7cc
files postproc/swscale.c postproc/swscale_template.c
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/swscale.c	Sun Oct 28 19:41:50 2001 +0000
+++ b/postproc/swscale.c	Sun Oct 28 19:54:23 2001 +0000
@@ -448,6 +448,8 @@
 	int uvalpha1=uvalpha^4095;
 	int i;
 
+	asm volatile ("\n\t"::: "memory");
+
 	for(i=0;i<dstw;i++)
 	{
 		((uint8_t*)dest)[0] = (buf0[i]*yalpha1+buf1[i]*yalpha)>>19;
@@ -625,6 +627,8 @@
 			);
 		}
 #else
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){
@@ -733,6 +737,8 @@
 		}
 #else
 //FIXME unroll C loop and dont recalculate UV
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){
@@ -850,6 +856,8 @@
 		}
 #else
 //FIXME unroll C loop and dont recalculate UV
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){
--- a/postproc/swscale_template.c	Sun Oct 28 19:41:50 2001 +0000
+++ b/postproc/swscale_template.c	Sun Oct 28 19:54:23 2001 +0000
@@ -448,6 +448,8 @@
 	int uvalpha1=uvalpha^4095;
 	int i;
 
+	asm volatile ("\n\t"::: "memory");
+
 	for(i=0;i<dstw;i++)
 	{
 		((uint8_t*)dest)[0] = (buf0[i]*yalpha1+buf1[i]*yalpha)>>19;
@@ -625,6 +627,8 @@
 			);
 		}
 #else
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){
@@ -733,6 +737,8 @@
 		}
 #else
 //FIXME unroll C loop and dont recalculate UV
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){
@@ -850,6 +856,8 @@
 		}
 #else
 //FIXME unroll C loop and dont recalculate UV
+		asm volatile ("\n\t"::: "memory");
+
 		if(dstbpp==32 || dstbpp==24)
 		{
 			for(i=0;i<dstw;i++){