diff options
author | trav90 <travawine@palemoon.org> | 2018-10-18 21:56:49 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-18 21:56:49 -0500 |
commit | 125aff11b7587a55d5a94b1337e44cbc68655c0b (patch) | |
tree | ae37fcd0fa3e1063f5454be0914a0b0899bfc81e /third_party/aom/aom_ports/msvc.h | |
parent | 464c3130fcc3d123a5b2ef4639900e70f73e4417 (diff) | |
download | UXP-125aff11b7587a55d5a94b1337e44cbc68655c0b.tar UXP-125aff11b7587a55d5a94b1337e44cbc68655c0b.tar.gz UXP-125aff11b7587a55d5a94b1337e44cbc68655c0b.tar.lz UXP-125aff11b7587a55d5a94b1337e44cbc68655c0b.tar.xz UXP-125aff11b7587a55d5a94b1337e44cbc68655c0b.zip |
Fix aom compile errors with VS2015
Import BUG=aomedia:900
Diffstat (limited to 'third_party/aom/aom_ports/msvc.h')
-rw-r--r-- | third_party/aom/aom_ports/msvc.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/third_party/aom/aom_ports/msvc.h b/third_party/aom/aom_ports/msvc.h index 2d3ab9b65..5a41d29d2 100644 --- a/third_party/aom/aom_ports/msvc.h +++ b/third_party/aom/aom_ports/msvc.h @@ -43,5 +43,25 @@ static INLINE long lroundf(float x) { } #endif // _MSC_VER < 1800 +#if HAVE_AVX +#include <immintrin.h> +// Note: +// _mm256_insert_epi16 intrinsics is available from vs2017. +// We define this macro for vs2015 and earlier. The +// intrinsics used here are in vs2015 document: +// https://msdn.microsoft.com/en-us/library/hh977022.aspx +// Input parameters: +// a: __m256i, +// d: int16_t, +// indx: imm8 (0 - 15) +#if _MSC_VER <= 1900 +#define _mm256_insert_epi16(a, d, indx) \ + _mm256_insertf128_si256( \ + a, \ + _mm_insert_epi16(_mm256_extractf128_si256(a, indx >> 3), d, indx % 8), \ + indx >> 3) +#endif // _MSC_VER <= 1900 +#endif // HAVE_AVX + #endif // _MSC_VER #endif // AOM_PORTS_MSVC_H_ |