mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Implement _mm256_insert_epi32 and extract pseudo-ops
Visual Studio headers apparently lack these guys
This commit is contained in:
parent
4e94d60552
commit
55529decd5
|
@ -23,6 +23,9 @@
|
|||
#if COMPILE_INTEL_AVX2
|
||||
#include <immintrin.h>
|
||||
|
||||
// Use a couple generic functions from here as a worst-case fallback
|
||||
#include "strategies/generic/sao_shared_generics.h"
|
||||
#include "strategies/missing-intel-intrinsics.h"
|
||||
#include "cu.h"
|
||||
#include "encoder.h"
|
||||
#include "encoderstate.h"
|
||||
|
|
|
@ -18,4 +18,15 @@
|
|||
#endif // __andn_u32
|
||||
#endif // _andn_u32
|
||||
|
||||
// Some Visual Studio headers apparently lack these pseudoinstructions
|
||||
#if COMPILE_INTEL_AVX2
|
||||
#ifndef _mm256_insert_epi32
|
||||
#define _mm256_insert_epi32(a, i, index) (_mm256_blend_epi32((a), _mm256_set1_epi32(i), (1 << (index))))
|
||||
#endif
|
||||
|
||||
#ifndef _mm256_extract_epi32
|
||||
#define _mm256_extract_epi32(a, index) (_mm_extract_epi32(_mm256_extracti128_si256((a), (index) >> 2), (index) & 3))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue