This does not yet include any actual AVX code
Unified · Split
| @@ -89,6 +89,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; · 88 unmodified lines | |||
| 89 | #define COMPILE_TEMPLATE_MMXEXT 0 | 89 | #define COMPILE_TEMPLATE_MMXEXT 0 |
| 90 | #define COMPILE_TEMPLATE_AMD3DNOW 0 | 90 | #define COMPILE_TEMPLATE_AMD3DNOW 0 |
| 91 | #define COMPILE_TEMPLATE_SSE2 0 | 91 | #define COMPILE_TEMPLATE_SSE2 0 |
| 92 | #define COMPILE_TEMPLATE_AVX 0 | ||
| 92 | 93 | ||
| 93 | //MMX versions | 94 | //MMX versions |
| 94 | #undef RENAME | 95 | #undef RENAME |
| @@ -109,10 +110,18 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; · 14 unmodified lines | |||
| 109 | #define RENAME(a) a ## _sse2 | 110 | #define RENAME(a) a ## _sse2 |
| 110 | #include "rgb2rgb_template.c" | 111 | #include "rgb2rgb_template.c" |
| 111 | 112 | ||
| 113 | //AVX versions | ||
| 114 | #undef RENAME | ||
| 115 | #undef COMPILE_TEMPLATE_AVX | ||
| 116 | #define COMPILE_TEMPLATE_AVX 1 | ||
| 117 | #define RENAME(a) a ## _avx | ||
| 118 | #include "rgb2rgb_template.c" | ||
| 119 | |||
| 112 | //3DNOW versions | 120 | //3DNOW versions |
| 113 | #undef RENAME | 121 | #undef RENAME |
| 114 | #undef COMPILE_TEMPLATE_MMXEXT | 122 | #undef COMPILE_TEMPLATE_MMXEXT |
| 115 | #undef COMPILE_TEMPLATE_SSE2 | 123 | #undef COMPILE_TEMPLATE_SSE2 |
| 124 | #undef COMPILE_TEMPLATE_AVX | ||
| 116 | #undef COMPILE_TEMPLATE_AMD3DNOW | 125 | #undef COMPILE_TEMPLATE_AMD3DNOW |
| 117 | #define COMPILE_TEMPLATE_MMXEXT 0 | 126 | #define COMPILE_TEMPLATE_MMXEXT 0 |
| 118 | #define COMPILE_TEMPLATE_SSE2 0 | 127 | #define COMPILE_TEMPLATE_SSE2 0 |
| @@ -142,5 +151,7 @@ av_cold void rgb2rgb_init_x86(void) · 23 unmodified lines | |||
| 142 | rgb2rgb_init_mmxext(); | 151 | rgb2rgb_init_mmxext(); |
| 143 | if (INLINE_SSE2(cpu_flags)) | 152 | if (INLINE_SSE2(cpu_flags)) |
| 144 | rgb2rgb_init_sse2(); | 153 | rgb2rgb_init_sse2(); |
| 154 | if (INLINE_AVX(cpu_flags)) | ||
| 155 | rgb2rgb_init_avx(); | ||
| 145 | #endif /* HAVE_INLINE_ASM */ | 156 | #endif /* HAVE_INLINE_ASM */ |
| 146 | } | 157 | } |
| @@ -1871,7 +1871,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ · 1870 unmodified lines | |||
| 1871 | } | 1871 | } |
| 1872 | #endif /* !COMPILE_TEMPLATE_SSE2 */ | 1872 | #endif /* !COMPILE_TEMPLATE_SSE2 */ |
| 1873 | 1873 | ||
| 1874 | #if !COMPILE_TEMPLATE_AMD3DNOW | 1874 | #if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX |
| 1875 | static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, | 1875 | static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, |
| 1876 | int width, int height, int src1Stride, | 1876 | int width, int height, int src1Stride, |
| 1877 | int src2Stride, int dstStride) | 1877 | int src2Stride, int dstStride) |
| @@ -1941,7 +1941,7 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui · 63 unmodified lines | |||
| 1941 | ::: "memory" | 1941 | ::: "memory" |
| 1942 | ); | 1942 | ); |
| 1943 | } | 1943 | } |
| 1944 | #endif /* !COMPILE_TEMPLATE_AMD3DNOW */ | 1944 | #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */ |
| 1945 | 1945 | ||
| 1946 | #if !COMPILE_TEMPLATE_SSE2 | 1946 | #if !COMPILE_TEMPLATE_SSE2 |
| 1947 | #if !COMPILE_TEMPLATE_AMD3DNOW | 1947 | #if !COMPILE_TEMPLATE_AMD3DNOW |
| @@ -2509,7 +2509,7 @@ static av_cold void RENAME(rgb2rgb_init)(void) · 561 unmodified lines | |||
| 2509 | uyvytoyuv420 = RENAME(uyvytoyuv420); | 2509 | uyvytoyuv420 = RENAME(uyvytoyuv420); |
| 2510 | #endif /* !COMPILE_TEMPLATE_SSE2 */ | 2510 | #endif /* !COMPILE_TEMPLATE_SSE2 */ |
| 2511 | 2511 | ||
| 2512 | #if !COMPILE_TEMPLATE_AMD3DNOW | 2512 | #if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX |
| 2513 | interleaveBytes = RENAME(interleaveBytes); | 2513 | interleaveBytes = RENAME(interleaveBytes); |
| 2514 | #endif /* !COMPILE_TEMPLATE_AMD3DNOW */ | 2514 | #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */ |
| 2515 | } | 2515 | } |