ref: cd9982ec4472664290d67a15fbc9cf53a97e1007
parent: e88bb8886af9b10261b4febc21214b32c75b710b
parent: 0fd900be473e035dd16a490e83fd359c78b7d4e8
author: HaiboZhu <[email protected]>
date: Mon Aug 8 13:05:15 EDT 2016
Merge pull request #2544 from ruil2/asm fix build issue when disable AVX2 assembly
--- a/codec/encoder/core/src/decode_mb_aux.cpp
+++ b/codec/encoder/core/src/decode_mb_aux.cpp
@@ -270,10 +270,13 @@
pFuncList->pfIDctFourT4 = WelsIDctFourT4Rec_sse2;
pFuncList->pfIDctI16x16Dc = WelsIDctRecI16x16Dc_sse2;
}
+#if defined(HAVE_AVX2)
if (uiCpuFlag & WELS_CPU_AVX2) {
pFuncList->pfIDctT4 = WelsIDctT4Rec_avx2;
pFuncList->pfIDctFourT4 = WelsIDctFourT4Rec_avx2;
}
+#endif
+
#endif//X86_ASM
#if defined(HAVE_NEON)
--- a/codec/encoder/core/src/encode_mb_aux.cpp
+++ b/codec/encoder/core/src/encode_mb_aux.cpp
@@ -526,6 +526,7 @@
if (uiCpuFlag & WELS_CPU_SSE42) {
pFuncList->pfGetNoneZeroCount = WelsGetNoneZeroCount_sse42;
}
+#if defined(HAVE_AVX2)
if (uiCpuFlag & WELS_CPU_AVX2) {
pFuncList->pfDctT4 = WelsDctT4_avx2;
pFuncList->pfDctFourT4 = WelsDctFourT4_avx2;
@@ -535,7 +536,7 @@
pFuncList->pfQuantizationFour4x4 = WelsQuantFour4x4_avx2;
pFuncList->pfQuantizationFour4x4Max = WelsQuantFour4x4Max_avx2;
}
-
+#endif
//#endif//MACOS
#endif//X86_ASM
--- a/codec/encoder/core/src/sample.cpp
+++ b/codec/encoder/core/src/sample.cpp
@@ -404,7 +404,7 @@
pFuncList->sSampleDealingFuncs.pfIntra16x16Combined3Satd = WelsIntra16x16Combined3Satd_sse41;
pFuncList->sSampleDealingFuncs.pfIntra8x8Combined3Satd = WelsIntraChroma8x8Combined3Satd_sse41;
}
-
+#if defined(HAVE_AVX2)
if (uiCpuFlag & WELS_CPU_AVX2) {
pFuncList->sSampleDealingFuncs.pfSampleSatd[BLOCK_16x16] = WelsSampleSatd16x16_avx2;
pFuncList->sSampleDealingFuncs.pfSampleSatd[BLOCK_16x8] = WelsSampleSatd16x8_avx2;
@@ -411,7 +411,7 @@
pFuncList->sSampleDealingFuncs.pfSampleSatd[BLOCK_8x16] = WelsSampleSatd8x16_avx2;
pFuncList->sSampleDealingFuncs.pfSampleSatd[BLOCK_8x8] = WelsSampleSatd8x8_avx2;
}
-
+#endif
#endif //(X86_ASM)
#if defined (HAVE_NEON)
--- a/codec/processing/src/vaacalc/vaacalculation.cpp
+++ b/codec/processing/src/vaacalc/vaacalculation.cpp
@@ -64,6 +64,7 @@
sVaaFuncs.pfVAACalcSadSsdBgd = VAACalcSadSsdBgd_sse2;
sVaaFuncs.pfVAACalcSadVar = VAACalcSadVar_sse2;
}
+#ifdef HAVE_AVX2
if (iCpuFlag & WELS_CPU_AVX2) {
sVaaFuncs.pfVAACalcSad = VAACalcSad_avx2;
sVaaFuncs.pfVAACalcSadBgd = VAACalcSadBgd_avx2;
@@ -71,6 +72,7 @@
sVaaFuncs.pfVAACalcSadSsdBgd = VAACalcSadSsdBgd_avx2;
sVaaFuncs.pfVAACalcSadVar = VAACalcSadVar_avx2;
}
+#endif
#endif//X86_ASM
#ifdef HAVE_NEON
if ((iCpuFlag & WELS_CPU_NEON) == WELS_CPU_NEON) {