Revision 99cefd0b

View differences:

postproc/swscale.c
9 9
#include <string.h>
10 10
#include "../config.h"
11 11
#include "swscale.h"
12
#include "../mmx_defs.h"
12 13

  
13 14
//#undef HAVE_MMX2
14 15
//#undef HAVE_MMX
......
929 930
			"xorl %%ecx, %%ecx		\n\t"
930 931
			"xorl %%ebx, %%ebx		\n\t"
931 932
			"movw %4, %%bx			\n\t" // (xInc*4)&0xFFFF
932
#ifdef HAVE_MMX2
933
#define FUNNY_Y_CODE \
934
			"prefetchnta 1024(%%esi)	\n\t"\
935
			"prefetchnta 1056(%%esi)	\n\t"\
936
			"prefetchnta 1088(%%esi)	\n\t"\
937
			"call funnyYCode		\n\t"\
938
			"movq temp0, %%mm2		\n\t"\
939
			"xorl %%ecx, %%ecx		\n\t"
940
#else
933

  
941 934
#define FUNNY_Y_CODE \
935
			PREFETCH" 1024(%%esi)		\n\t"\
936
			PREFETCH" 1056(%%esi)		\n\t"\
937
			PREFETCH" 1088(%%esi)		\n\t"\
942 938
			"call funnyYCode		\n\t"\
943 939
			"movq temp0, %%mm2		\n\t"\
944 940
			"xorl %%ecx, %%ecx		\n\t"
945
#endif
941

  
946 942
FUNNY_Y_CODE
947 943
FUNNY_Y_CODE
948 944
FUNNY_Y_CODE
......
1046 1042
		"xorl %%ebx, %%ebx		\n\t"
1047 1043
		"movw %4, %%bx			\n\t" // (xInc*4)&0xFFFF
1048 1044

  
1049
#ifdef HAVE_MMX2
1050 1045
#define FUNNYUVCODE \
1051
			"prefetchnta 1024(%%esi)	\n\t"\
1052
			"prefetchnta 1056(%%esi)	\n\t"\
1053
			"prefetchnta 1088(%%esi)	\n\t"\
1046
			PREFETCH" 1024(%%esi)		\n\t"\
1047
			PREFETCH" 1056(%%esi)		\n\t"\
1048
			PREFETCH" 1088(%%esi)		\n\t"\
1054 1049
			"call funnyUVCode		\n\t"\
1055 1050
			"movq temp0, %%mm2		\n\t"\
1056 1051
			"xorl %%ecx, %%ecx		\n\t"
1057
#else
1058
#define FUNNYUVCODE \
1059
			"call funnyUVCode		\n\t"\
1060
			"movq temp0, %%mm2		\n\t"\
1061
			"xorl %%ecx, %%ecx		\n\t"
1062
#endif
1063 1052

  
1064 1053
FUNNYUVCODE
1065 1054
FUNNYUVCODE
......
1439 1428
	g16Dither2= g16Dither;
1440 1429
#endif
1441 1430
  }
1442

  
1443
#ifdef HAVE_3DNOW
1444
	asm volatile("femms");
1445
#elif defined (HAVE_MMX)
1446
	asm volatile("emms");
1447
#endif
1431
__asm __volatile(SFENCE:::"memory");
1432
__asm __volatile(EMMS:::"memory");
1448 1433
}
1449 1434

  
1450 1435

  
postproc/swscale_template.c
9 9
#include <string.h>
10 10
#include "../config.h"
11 11
#include "swscale.h"
12
#include "../mmx_defs.h"
12 13

  
13 14
//#undef HAVE_MMX2
14 15
//#undef HAVE_MMX
......
929 930
			"xorl %%ecx, %%ecx		\n\t"
930 931
			"xorl %%ebx, %%ebx		\n\t"
931 932
			"movw %4, %%bx			\n\t" // (xInc*4)&0xFFFF
932
#ifdef HAVE_MMX2
933
#define FUNNY_Y_CODE \
934
			"prefetchnta 1024(%%esi)	\n\t"\
935
			"prefetchnta 1056(%%esi)	\n\t"\
936
			"prefetchnta 1088(%%esi)	\n\t"\
937
			"call funnyYCode		\n\t"\
938
			"movq temp0, %%mm2		\n\t"\
939
			"xorl %%ecx, %%ecx		\n\t"
940
#else
933

  
941 934
#define FUNNY_Y_CODE \
935
			PREFETCH" 1024(%%esi)		\n\t"\
936
			PREFETCH" 1056(%%esi)		\n\t"\
937
			PREFETCH" 1088(%%esi)		\n\t"\
942 938
			"call funnyYCode		\n\t"\
943 939
			"movq temp0, %%mm2		\n\t"\
944 940
			"xorl %%ecx, %%ecx		\n\t"
945
#endif
941

  
946 942
FUNNY_Y_CODE
947 943
FUNNY_Y_CODE
948 944
FUNNY_Y_CODE
......
1046 1042
		"xorl %%ebx, %%ebx		\n\t"
1047 1043
		"movw %4, %%bx			\n\t" // (xInc*4)&0xFFFF
1048 1044

  
1049
#ifdef HAVE_MMX2
1050 1045
#define FUNNYUVCODE \
1051
			"prefetchnta 1024(%%esi)	\n\t"\
1052
			"prefetchnta 1056(%%esi)	\n\t"\
1053
			"prefetchnta 1088(%%esi)	\n\t"\
1046
			PREFETCH" 1024(%%esi)		\n\t"\
1047
			PREFETCH" 1056(%%esi)		\n\t"\
1048
			PREFETCH" 1088(%%esi)		\n\t"\
1054 1049
			"call funnyUVCode		\n\t"\
1055 1050
			"movq temp0, %%mm2		\n\t"\
1056 1051
			"xorl %%ecx, %%ecx		\n\t"
1057
#else
1058
#define FUNNYUVCODE \
1059
			"call funnyUVCode		\n\t"\
1060
			"movq temp0, %%mm2		\n\t"\
1061
			"xorl %%ecx, %%ecx		\n\t"
1062
#endif
1063 1052

  
1064 1053
FUNNYUVCODE
1065 1054
FUNNYUVCODE
......
1439 1428
	g16Dither2= g16Dither;
1440 1429
#endif
1441 1430
  }
1442

  
1443
#ifdef HAVE_3DNOW
1444
	asm volatile("femms");
1445
#elif defined (HAVE_MMX)
1446
	asm volatile("emms");
1447
#endif
1431
__asm __volatile(SFENCE:::"memory");
1432
__asm __volatile(EMMS:::"memory");
1448 1433
}
1449 1434

  
1450 1435

  

Also available in: Unified diff