diff options
Diffstat (limited to 'ffmpeg/libswscale/x86/rgb2rgb.c')
| -rw-r--r-- | ffmpeg/libswscale/x86/rgb2rgb.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/ffmpeg/libswscale/x86/rgb2rgb.c b/ffmpeg/libswscale/x86/rgb2rgb.c index 1e20176..8cc99c6 100644 --- a/ffmpeg/libswscale/x86/rgb2rgb.c +++ b/ffmpeg/libswscale/x86/rgb2rgb.c @@ -76,7 +76,6 @@ DECLARE_ASM_CONST(8, uint64_t, mul15_mid) = 0x4200420042004200ULL; DECLARE_ASM_CONST(8, uint64_t, mul15_hi) = 0x0210021002100210ULL; DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; -#define RGB2YUV_SHIFT 8 #define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5)) #define BV ((int)(-0.071*(1<<RGB2YUV_SHIFT)+0.5)) #define BU ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5)) @@ -92,35 +91,45 @@ 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 -#define RENAME(a) a ## _MMX +#define RENAME(a) a ## _mmx #include "rgb2rgb_template.c" // MMXEXT versions #undef RENAME #undef COMPILE_TEMPLATE_MMXEXT #define COMPILE_TEMPLATE_MMXEXT 1 -#define RENAME(a) a ## _MMXEXT +#define RENAME(a) a ## _mmxext #include "rgb2rgb_template.c" //SSE2 versions #undef RENAME #undef COMPILE_TEMPLATE_SSE2 #define COMPILE_TEMPLATE_SSE2 1 -#define RENAME(a) a ## _SSE2 +#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 +#define COMPILE_TEMPLATE_AVX 0 #define COMPILE_TEMPLATE_AMD3DNOW 1 -#define RENAME(a) a ## _3DNOW +#define RENAME(a) a ## _3dnow #include "rgb2rgb_template.c" /* @@ -138,12 +147,14 @@ av_cold void rgb2rgb_init_x86(void) int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) - rgb2rgb_init_MMX(); + rgb2rgb_init_mmx(); if (INLINE_AMD3DNOW(cpu_flags)) - rgb2rgb_init_3DNOW(); + rgb2rgb_init_3dnow(); if (INLINE_MMXEXT(cpu_flags)) - rgb2rgb_init_MMXEXT(); + rgb2rgb_init_mmxext(); if (INLINE_SSE2(cpu_flags)) - rgb2rgb_init_SSE2(); + rgb2rgb_init_sse2(); + if (INLINE_AVX(cpu_flags)) + rgb2rgb_init_avx(); #endif /* HAVE_INLINE_ASM */ } |
