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 | 89 | #define COMPILE_TEMPLATE_MMXEXT 0 |
| 90 | 90 | #define COMPILE_TEMPLATE_AMD3DNOW 0 |
| 91 | 91 | #define COMPILE_TEMPLATE_SSE2 0 |
| 92 | +#define COMPILE_TEMPLATE_AVX 0 | |
| 92 | 93 | |
| 93 | 94 | //MMX versions |
| 94 | 95 | #undef RENAME |
| @@ -109,10 +110,18 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; · 14 unmodified lines | ||
| 109 | 110 | #define RENAME(a) a ## _sse2 |
| 110 | 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 | 120 | //3DNOW versions |
| 113 | 121 | #undef RENAME |
| 114 | 122 | #undef COMPILE_TEMPLATE_MMXEXT |
| 115 | 123 | #undef COMPILE_TEMPLATE_SSE2 |
| 124 | +#undef COMPILE_TEMPLATE_AVX | |
| 116 | 125 | #undef COMPILE_TEMPLATE_AMD3DNOW |
| 117 | 126 | #define COMPILE_TEMPLATE_MMXEXT 0 |
| 118 | 127 | #define COMPILE_TEMPLATE_SSE2 0 |
| @@ -142,5 +151,7 @@ av_cold void rgb2rgb_init_x86(void) · 23 unmodified lines | ||
| 142 | 151 | rgb2rgb_init_mmxext(); |
| 143 | 152 | if (INLINE_SSE2(cpu_flags)) |
| 144 | 153 | rgb2rgb_init_sse2(); |
| 154 | + if (INLINE_AVX(cpu_flags)) | |
| 155 | + rgb2rgb_init_avx(); | |
| 145 | 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 | 1872 | #endif /* !COMPILE_TEMPLATE_SSE2 */ |
| 1873 | 1873 | |
| 1874 | −#if !COMPILE_TEMPLATE_AMD3DNOW | |
| 1874 | +#if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX | |
| 1875 | 1875 | static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, |
| 1876 | 1876 | int width, int height, int src1Stride, |
| 1877 | 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 | 1941 | ::: "memory" |
| 1942 | 1942 | ); |
| 1943 | 1943 | } |
| 1944 | −#endif /* !COMPILE_TEMPLATE_AMD3DNOW */ | |
| 1944 | +#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */ | |
| 1945 | 1945 | |
| 1946 | 1946 | #if !COMPILE_TEMPLATE_SSE2 |
| 1947 | 1947 | #if !COMPILE_TEMPLATE_AMD3DNOW |
| @@ -2509,7 +2509,7 @@ static av_cold void RENAME(rgb2rgb_init)(void) · 561 unmodified lines | ||
| 2509 | 2509 | uyvytoyuv420 = RENAME(uyvytoyuv420); |
| 2510 | 2510 | #endif /* !COMPILE_TEMPLATE_SSE2 */ |
| 2511 | 2511 | |
| 2512 | −#if !COMPILE_TEMPLATE_AMD3DNOW | |
| 2512 | +#if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX | |
| 2513 | 2513 | interleaveBytes = RENAME(interleaveBytes); |
| 2514 | −#endif /* !COMPILE_TEMPLATE_AMD3DNOW */ | |
| 2514 | +#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */ | |
| 2515 | 2515 | } |