diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-19 17:46:01 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-19 18:13:48 +0400 |
commit | 4729b529e60fb99356a1d9e13793835af50b3e87 (patch) | |
tree | e4f678c8561473875acccc79ab131ff2e9b72094 /libswscale/x86/rgb2rgb.c | |
parent | 94d7ca2b58af13c379d90aad595e82448743abc7 (diff) |
swscale/x86/rgb2rgb: extend framework to also include AVX
This does not yet include any actual AVX code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86/rgb2rgb.c')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 986afc4b3e..211bac35ee 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -91,6 +91,7 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; #define COMPILE_TEMPLATE_MMXEXT 0 #define COMPILE_TEMPLATE_AMD3DNOW 0 #define COMPILE_TEMPLATE_SSE2 0 +#define COMPILE_TEMPLATE_AVX 0 //MMX versions #undef RENAME @@ -111,10 +112,18 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; #define RENAME(a) a ## _SSE2 #include "rgb2rgb_template.c" +//AVX versions +#undef RENAME +#undef COMPILE_TEMPLATE_AVX +#define COMPILE_TEMPLATE_AVX 1 +#define RENAME(a) a ## _AVX +#include "rgb2rgb_template.c" + //3DNOW versions #undef RENAME #undef COMPILE_TEMPLATE_MMXEXT #undef COMPILE_TEMPLATE_SSE2 +#undef COMPILE_TEMPLATE_AVX #undef COMPILE_TEMPLATE_AMD3DNOW #define COMPILE_TEMPLATE_MMXEXT 0 #define COMPILE_TEMPLATE_SSE2 0 @@ -144,5 +153,7 @@ av_cold void rgb2rgb_init_x86(void) rgb2rgb_init_MMXEXT(); if (INLINE_SSE2(cpu_flags)) rgb2rgb_init_SSE2(); + if (INLINE_AVX(cpu_flags)) + rgb2rgb_init_AVX(); #endif /* HAVE_INLINE_ASM */ } |