diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2011-04-13 20:57:30 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2011-04-14 22:16:47 +0200 |
commit | 86330b4c9258d5e583c0db033d1e68f46443307c (patch) | |
tree | e0d66372276b56ebe388a6dbf606c8891af897b6 /libswscale/swscale.c | |
parent | c0038328830d7b341c28d7c99b0236a33617fd21 (diff) | |
download | ffmpeg-86330b4c9258d5e583c0db033d1e68f46443307c.tar.gz |
swscale: partially move the arch specific code left
PPC and x86 code is split off from swscale_template.c. Lots of code is
still duplicated and should be removed later.
Again uniformize the init system to be more similar to the dsputil one.
Unset h*scale_fast in the x86 init in order to make the output
consistent with the previous status. Thanks to Josh for spotting it.
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 565743a229..fe96141067 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1197,17 +1197,14 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #define COMPILE_TEMPLATE_AMD3DNOW 0 #define COMPILE_TEMPLATE_ALTIVEC 0 -#if COMPILE_C -#define RENAME(a) a ## _C #include "swscale_template.c" -#endif #if COMPILE_ALTIVEC #undef RENAME #undef COMPILE_TEMPLATE_ALTIVEC #define COMPILE_TEMPLATE_ALTIVEC 1 #define RENAME(a) a ## _altivec -#include "swscale_template.c" +#include "ppc/swscale_template.c" #endif #if ARCH_X86 @@ -1222,7 +1219,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #define COMPILE_TEMPLATE_MMX2 0 #define COMPILE_TEMPLATE_AMD3DNOW 0 #define RENAME(a) a ## _MMX -#include "swscale_template.c" +#include "x86/swscale_template.c" #endif //MMX2 versions @@ -1235,7 +1232,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #define COMPILE_TEMPLATE_MMX2 1 #define COMPILE_TEMPLATE_AMD3DNOW 0 #define RENAME(a) a ## _MMX2 -#include "swscale_template.c" +#include "x86/swscale_template.c" #endif //3DNOW versions @@ -1248,13 +1245,15 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin #define COMPILE_TEMPLATE_MMX2 0 #define COMPILE_TEMPLATE_AMD3DNOW 1 #define RENAME(a) a ## _3DNow -#include "swscale_template.c" +#include "x86/swscale_template.c" #endif #endif //ARCH_X86 SwsFunc ff_getSwsFunc(SwsContext *c) { + sws_init_swScale_c(c); + #if CONFIG_RUNTIME_CPUDETECT int flags = c->flags; @@ -1270,8 +1269,7 @@ SwsFunc ff_getSwsFunc(SwsContext *c) sws_init_swScale_MMX(c); return swScale_MMX; } else { - sws_init_swScale_C(c); - return swScale_C; + return swScale_c; } #else @@ -1280,12 +1278,10 @@ SwsFunc ff_getSwsFunc(SwsContext *c) sws_init_swScale_altivec(c); return swScale_altivec; } else { - sws_init_swScale_C(c); - return swScale_C; + return swScale_c; } #endif - sws_init_swScale_C(c); - return swScale_C; + return swScale_c; #endif /* ARCH_X86 */ #else //CONFIG_RUNTIME_CPUDETECT #if COMPILE_TEMPLATE_MMX2 @@ -1301,8 +1297,7 @@ SwsFunc ff_getSwsFunc(SwsContext *c) sws_init_swScale_altivec(c); return swScale_altivec; #else - sws_init_swScale_C(c); - return swScale_C; + return swScale_c; #endif #endif //!CONFIG_RUNTIME_CPUDETECT } |