For detect_range, the usage of vpbroadcast{b,w} requires the AVX512BW extension, and for detect_alpha we don't want ZMM instructions downclocking old CPUs.
Unified · Split
| @@ -141,7 +141,7 @@ detect_alpha_fn w, d, full · 140 unmodified lines | |||
| 141 | detect_alpha_fn b, w, limited | 141 | detect_alpha_fn b, w, limited |
| 142 | detect_alpha_fn w, d, limited | 142 | detect_alpha_fn w, d, limited |
| 143 | 143 | ||
| 144 | INIT_ZMM avx512 | 144 | INIT_ZMM avx512icl |
| 145 | detect_range_fn b | 145 | detect_range_fn b |
| 146 | detect_range_fn w | 146 | detect_range_fn w |
| 147 | detect_alpha_fn b, w, full | 147 | detect_alpha_fn b, w, full |
| @@ -58,13 +58,13 @@ static int FUNC_NAME(const uint8_t *color, ptrdiff_t color_stride, · 57 unmodified lines | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | #if HAVE_X86ASM | 60 | #if HAVE_X86ASM |
| 61 | #if HAVE_AVX512_EXTERNAL | 61 | #if HAVE_AVX512ICL_EXTERNAL |
| 62 | DETECT_RANGE_FUNC(detect_range_avx512, ff_detect_rangeb_avx512, ff_detect_range_c, 0, 64) | 62 | DETECT_RANGE_FUNC(detect_range_avx512icl, ff_detect_rangeb_avx512icl, ff_detect_range_c, 0, 64) |
| 63 | DETECT_RANGE_FUNC(detect_range16_avx512, ff_detect_rangew_avx512, ff_detect_range16_c, 1, 64) | 63 | DETECT_RANGE_FUNC(detect_range16_avx512icl, ff_detect_rangew_avx512icl, ff_detect_range16_c, 1, 64) |
| 64 | DETECT_ALPHA_FUNC(detect_alpha_full_avx512, ff_detect_alphab_full_avx512, ff_detect_alpha_full_c, 0, 64) | 64 | DETECT_ALPHA_FUNC(detect_alpha_full_avx512icl, ff_detect_alphab_full_avx512icl, ff_detect_alpha_full_c, 0, 64) |
| 65 | DETECT_ALPHA_FUNC(detect_alpha16_full_avx512, ff_detect_alphaw_full_avx512, ff_detect_alpha16_full_c, 1, 64) | 65 | DETECT_ALPHA_FUNC(detect_alpha16_full_avx512icl, ff_detect_alphaw_full_avx512icl, ff_detect_alpha16_full_c, 1, 64) |
| 66 | DETECT_ALPHA_FUNC(detect_alpha_limited_avx512, ff_detect_alphab_limited_avx512, ff_detect_alpha_limited_c, 0, 64) | 66 | DETECT_ALPHA_FUNC(detect_alpha_limited_avx512icl, ff_detect_alphab_limited_avx512icl, ff_detect_alpha_limited_c, 0, 64) |
| 67 | DETECT_ALPHA_FUNC(detect_alpha16_limited_avx512, ff_detect_alphaw_limited_avx512, ff_detect_alpha16_limited_c, 1, 64) | 67 | DETECT_ALPHA_FUNC(detect_alpha16_limited_avx512icl, ff_detect_alphaw_limited_avx512icl, ff_detect_alpha16_limited_c, 1, 64) |
| 68 | #endif | 68 | #endif |
| 69 | #if HAVE_AVX2_EXTERNAL | 69 | #if HAVE_AVX2_EXTERNAL |
| 70 | DETECT_RANGE_FUNC(detect_range_avx2, ff_detect_rangeb_avx2, ff_detect_range_c, 0, 32) | 70 | DETECT_RANGE_FUNC(detect_range_avx2, ff_detect_rangeb_avx2, ff_detect_range_c, 0, 32) |
| @@ -91,13 +91,13 @@ av_cold void ff_color_detect_dsp_init_x86(FFColorDetectDSPContext *dsp, int dept · 20 unmodified lines | |||
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | #endif | 93 | #endif |
| 94 | #if HAVE_AVX512_EXTERNAL | 94 | #if HAVE_AVX512ICL_EXTERNAL |
| 95 | if (EXTERNAL_AVX512(cpu_flags)) { | 95 | if (EXTERNAL_AVX512ICL(cpu_flags)) { |
| 96 | dsp->detect_range = depth > 8 ? detect_range16_avx512 : detect_range_avx512; | 96 | dsp->detect_range = depth > 8 ? detect_range16_avx512icl : detect_range_avx512icl; |
| 97 | if (color_range == AVCOL_RANGE_JPEG) { | 97 | if (color_range == AVCOL_RANGE_JPEG) { |
| 98 | dsp->detect_alpha = depth > 8 ? detect_alpha16_full_avx512 : detect_alpha_full_avx512; | 98 | dsp->detect_alpha = depth > 8 ? detect_alpha16_full_avx512icl : detect_alpha_full_avx512icl; |
| 99 | } else { | 99 | } else { |
| 100 | dsp->detect_alpha = depth > 8 ? detect_alpha16_limited_avx512 : detect_alpha_limited_avx512; | 100 | dsp->detect_alpha = depth > 8 ? detect_alpha16_limited_avx512icl : detect_alpha_limited_avx512icl; |
| 101 | } | 101 | } |
| 102 | } | 102 | } |
| 103 | #endif | 103 | #endif |