mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-20 14:20:51 +00:00
swscale: Always define COMPILE_xxx to either 0 or 1.
Originally committed as revision 32012 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
parent
89fa3504ed
commit
8f02861636
@ -1151,41 +1151,57 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
|
|||||||
//Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
|
//Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
|
||||||
//Plain C versions
|
//Plain C versions
|
||||||
#if (!HAVE_MMX && !HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
|
#if (!HAVE_MMX && !HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
|
||||||
#define COMPILE_C
|
#define COMPILE_C 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ARCH_PPC
|
#if ARCH_PPC
|
||||||
#if HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
#define COMPILE_ALTIVEC
|
#define COMPILE_ALTIVEC 1
|
||||||
#endif
|
#endif
|
||||||
#endif //ARCH_PPC
|
#endif //ARCH_PPC
|
||||||
|
|
||||||
#if ARCH_X86
|
#if ARCH_X86
|
||||||
|
|
||||||
#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
|
#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
|
||||||
#define COMPILE_MMX
|
#define COMPILE_MMX 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT
|
#if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT
|
||||||
#define COMPILE_MMX2
|
#define COMPILE_MMX2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
|
#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
|
||||||
#define COMPILE_3DNOW
|
#define COMPILE_3DNOW 1
|
||||||
#endif
|
#endif
|
||||||
#endif //ARCH_X86
|
#endif //ARCH_X86
|
||||||
|
|
||||||
|
#ifndef COMPILE_C
|
||||||
|
# define COMPILE_C 0
|
||||||
|
#endif
|
||||||
|
#ifndef COMPILE_MMX
|
||||||
|
# define COMPILE_MMX 0
|
||||||
|
#endif
|
||||||
|
#ifndef COMPILE_MMX2
|
||||||
|
# define COMPILE_MMX2 0
|
||||||
|
#endif
|
||||||
|
#ifndef COMPILE_3DNOW
|
||||||
|
# define COMPILE_3DNOW 0
|
||||||
|
#endif
|
||||||
|
#ifndef COMPILE_ALTIVEC
|
||||||
|
# define COMPILE_ALTIVEC 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#define COMPILE_TEMPLATE_MMX 0
|
#define COMPILE_TEMPLATE_MMX 0
|
||||||
#define COMPILE_TEMPLATE_MMX2 0
|
#define COMPILE_TEMPLATE_MMX2 0
|
||||||
#define COMPILE_TEMPLATE_AMD3DNOW 0
|
#define COMPILE_TEMPLATE_AMD3DNOW 0
|
||||||
#define COMPILE_TEMPLATE_ALTIVEC 0
|
#define COMPILE_TEMPLATE_ALTIVEC 0
|
||||||
|
|
||||||
#ifdef COMPILE_C
|
#if COMPILE_C
|
||||||
#define RENAME(a) a ## _C
|
#define RENAME(a) a ## _C
|
||||||
#include "swscale_template.c"
|
#include "swscale_template.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef COMPILE_ALTIVEC
|
#if COMPILE_ALTIVEC
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_ALTIVEC
|
#undef COMPILE_TEMPLATE_ALTIVEC
|
||||||
#define COMPILE_TEMPLATE_ALTIVEC 1
|
#define COMPILE_TEMPLATE_ALTIVEC 1
|
||||||
@ -1196,7 +1212,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
|
|||||||
#if ARCH_X86
|
#if ARCH_X86
|
||||||
|
|
||||||
//MMX versions
|
//MMX versions
|
||||||
#ifdef COMPILE_MMX
|
#if COMPILE_MMX
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMX
|
#undef COMPILE_TEMPLATE_MMX
|
||||||
#undef COMPILE_TEMPLATE_MMX2
|
#undef COMPILE_TEMPLATE_MMX2
|
||||||
@ -1209,7 +1225,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//MMX2 versions
|
//MMX2 versions
|
||||||
#ifdef COMPILE_MMX2
|
#if COMPILE_MMX2
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMX
|
#undef COMPILE_TEMPLATE_MMX
|
||||||
#undef COMPILE_TEMPLATE_MMX2
|
#undef COMPILE_TEMPLATE_MMX2
|
||||||
@ -1222,7 +1238,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//3DNOW versions
|
//3DNOW versions
|
||||||
#ifdef COMPILE_3DNOW
|
#if COMPILE_3DNOW
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMX
|
#undef COMPILE_TEMPLATE_MMX
|
||||||
#undef COMPILE_TEMPLATE_MMX2
|
#undef COMPILE_TEMPLATE_MMX2
|
||||||
@ -1258,7 +1274,7 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifdef COMPILE_ALTIVEC
|
#if COMPILE_ALTIVEC
|
||||||
if (flags & SWS_CPU_CAPS_ALTIVEC) {
|
if (flags & SWS_CPU_CAPS_ALTIVEC) {
|
||||||
sws_init_swScale_altivec(c);
|
sws_init_swScale_altivec(c);
|
||||||
return swScale_altivec;
|
return swScale_altivec;
|
||||||
@ -1783,7 +1799,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
|
|||||||
if(srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P)
|
if(srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P)
|
||||||
c->swScale= uyvyToYuv422Wrapper;
|
c->swScale= uyvyToYuv422Wrapper;
|
||||||
|
|
||||||
#ifdef COMPILE_ALTIVEC
|
#if COMPILE_ALTIVEC
|
||||||
if ((c->flags & SWS_CPU_CAPS_ALTIVEC) &&
|
if ((c->flags & SWS_CPU_CAPS_ALTIVEC) &&
|
||||||
!(c->flags & SWS_BITEXACT) &&
|
!(c->flags & SWS_BITEXACT) &&
|
||||||
srcFormat == PIX_FMT_YUV420P) {
|
srcFormat == PIX_FMT_YUV420P) {
|
||||||
|
Loading…
Reference in New Issue
Block a user