ref: a45c10cf9128d36c4fd85deb63756c215a135d99
parent: 144ff0fd5183633315922ad9954e0790e9ec704f
author: Sindre Aamås <saamas@cisco.com>
date: Tue Jan 19 09:27:46 EST 2016
[UT] Only run AVX2 tests if host supports AVX2
--- a/test/encoder/EncUT_DecodeMbAux.cpp
+++ b/test/encoder/EncUT_DecodeMbAux.cpp
@@ -355,7 +355,8 @@
TestIDctFourT4Rec<int16_t> (WelsIDctFourT4Rec_sse2);
}
TEST (DecodeMbAuxTest, WelsIDctFourT4Rec_avx2) {
- TestIDctFourT4Rec<int16_t> (WelsIDctFourT4Rec_avx2);
+ if (WelsCPUFeatureDetect (0) & WELS_CPU_AVX2)
+ TestIDctFourT4Rec<int16_t> (WelsIDctFourT4Rec_avx2);
}
TEST (DecodeMbAuxTest, WelsIDctRecI16x16Dc_sse2) {
int32_t iCpuCores = 0;
--- a/test/encoder/EncUT_EncoderMbAux.cpp
+++ b/test/encoder/EncUT_EncoderMbAux.cpp
@@ -1,4 +1,5 @@
#include <gtest/gtest.h>
+#include "cpu.h"
#include "ls_defines.h"
#include "encode_mb_aux.h"
#include "wels_common_basis.h"
@@ -199,7 +200,8 @@
}
TEST (EncodeMbAuxTest, WelsDctFourT4_avx2) {
- TestDctFourT4 (WelsDctFourT4_avx2);
+ if (WelsCPUFeatureDetect (0) & WELS_CPU_AVX2)
+ TestDctFourT4 (WelsDctFourT4_avx2);
}
TEST (EncodeMbAuxTest, WelsCalculateSingleCtr4x4_sse2) {