Commit 4c3c0f24 authored by Yi Luo's avatar Yi Luo Committed by James Zern

Fix vs2015 compiling error on avx2 intrinsics

BUG=aomedia:900

Change-Id: Ifb6c437d8d2f309d0717fb50c402618475fe021f
parent 6aabba04
......@@ -11,6 +11,7 @@
#include <immintrin.h>
#include "aom_ports/msvc.h"
#include "./aom_dsp_rtcd.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_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment