ultravideo / uvg266

An open-source VVC encoder based on Kvazaar
BSD 3-Clause "New" or "Revised" License
225 stars 16 forks source link

Define headers #26

Open Jamaika1 opened 1 week ago

Jovasa commented 1 week ago

Why are you checking for AVX512 when all of the optimizations are AVX2?

Jamaika1 commented 1 week ago

Hi Jovasa I use mavx2 and (gcc 11.5.0 or 15.0.0 20241110). Encoder hevc and vvc didn't want to work and I started looking for the problem. The guilty function is _mm256_srli_si256 in 'missing-intel-intrinsics.h'. I change define AVX2 in AVX512 and codec works. I took a look at the functions in simde. https://github.com/simd-everywhere/simde/blob/master/simde/simde-features.h

#if defined(SIMDE_X86_AVX512F_NATIVE) && !defined(SIMDE_X86_AVX2_NATIVE)
  #define SIMDE_X86_AVX2_NATIVE
#endif
...
#if !defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_X86_AVX2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  #if defined(SIMDE_ARCH_X86_AVX2)
    #define SIMDE_X86_AVX2_NATIVE
  #endif
#endif
#if defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_X86_AVX_NATIVE)
  #define SIMDE_X86_AVX_NATIVE
#endif
....
#if defined(SIMDE_X86_AVX2_NATIVE)
#  define simde_mm256_srli_si256(a, imm8) _mm256_srli_si256(a, imm8)
#endif