diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 4977a3a736..5b71a6f1c0 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1178,7 +1178,6 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin //Plain C versions #define COMPILE_TEMPLATE_MMX2 0 -#define COMPILE_TEMPLATE_AMD3DNOW 0 #define COMPILE_TEMPLATE_ALTIVEC 0 #include "swscale_template.c" @@ -1195,9 +1194,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #if HAVE_MMX #undef RENAME #undef COMPILE_TEMPLATE_MMX2 -#undef COMPILE_TEMPLATE_AMD3DNOW #define COMPILE_TEMPLATE_MMX2 0 -#define COMPILE_TEMPLATE_AMD3DNOW 0 #define RENAME(a) a ## _MMX #include "x86/swscale_template.c" #endif @@ -1206,24 +1203,11 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #if HAVE_MMX2 #undef RENAME #undef COMPILE_TEMPLATE_MMX2 -#undef COMPILE_TEMPLATE_AMD3DNOW #define COMPILE_TEMPLATE_MMX2 1 -#define COMPILE_TEMPLATE_AMD3DNOW 0 #define RENAME(a) a ## _MMX2 #include "x86/swscale_template.c" #endif -//3DNOW versions -#if HAVE_AMD3DNOW -#undef RENAME -#undef COMPILE_TEMPLATE_MMX2 -#undef COMPILE_TEMPLATE_AMD3DNOW -#define COMPILE_TEMPLATE_MMX2 0 -#define COMPILE_TEMPLATE_AMD3DNOW 1 -#define RENAME(a) a ## _3DNow -#include "x86/swscale_template.c" -#endif - SwsFunc ff_getSwsFunc(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); @@ -1237,12 +1221,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c) return swScale_MMX2; } else #endif -#if HAVE_AMD3DNOW - if (cpu_flags & AV_CPU_FLAG_3DNOW) { - sws_init_swScale_3DNow(c); - return swScale_3DNow; - } else -#endif #if HAVE_MMX if (cpu_flags & AV_CPU_FLAG_MMX) { sws_init_swScale_MMX(c); diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index d0671315ae..63e0f72cb2 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -22,23 +22,14 @@ #undef REAL_MOVNTQ #undef MOVNTQ -#undef PAVGB #undef PREFETCH -#if COMPILE_TEMPLATE_AMD3DNOW -#define PREFETCH "prefetch" -#elif COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMX2 #define PREFETCH "prefetchnta" #else #define PREFETCH " # nop" #endif -#if COMPILE_TEMPLATE_MMX2 -#define PAVGB(a,b) "pavgb " #a ", " #b " \n\t" -#elif COMPILE_TEMPLATE_AMD3DNOW -#define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" -#endif - #if COMPILE_TEMPLATE_MMX2 #define REAL_MOVNTQ(a,b) "movntq " #a ", " #b " \n\t" #else @@ -2559,9 +2550,7 @@ static int RENAME(swScale)(SwsContext *c, const uint8_t* src[], int srcStride[], fillPlane(dst[3], dstStride[3], dstW, dstY-lastDstY, lastDstY, 255); if (COMPILE_TEMPLATE_MMX2) __asm__ volatile("sfence":::"memory"); - /* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ - if (COMPILE_TEMPLATE_AMD3DNOW) __asm__ volatile("femms" :::"memory"); - else __asm__ volatile("emms" :::"memory"); + __asm__ volatile("emms" :::"memory"); /* store changed local vars back in the context */ c->dstY= dstY;