This allows running the tests on devices that don't have all the SIMD instruction sets.
Showing the changes to test/processing/ProcessUT_AdaptiveQuantization.cpp (1 of 3 files). Show all
Unified · Split
| @@ -42,8 +42,11 @@ void SampleVariance16x16_ref (uint8_t* pRefY, int32_t iRefStride, uint8_t* pSrcY · 41 unmodified lines | ||
| 42 | 42 | pMotionTexture->uiTextureIndex = (uiCurSquare >> 8) - (uiCurSum * uiCurSum); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | −#define GENERATE_AQTEST(method) \ | |
| 45 | +#define GENERATE_AQTEST(method, flag) \ | |
| 46 | 46 | TEST (AdaptiveQuantization, method) {\ |
| 47 | + uint32_t uiCPUFlags = WelsCPUFeatureDetect(NULL); \ | |
| 48 | + if ((uiCPUFlags & flag) == 0 && flag != 0) \ | |
| 49 | + return; \ | |
| 47 | 50 | ENFORCE_STACK_ALIGN_1D (uint8_t, pRefY,32*16,16)\ |
| 48 | 51 | ENFORCE_STACK_ALIGN_1D (uint8_t, pSrcY,48*16,16)\ |
| 49 | 52 | SMotionTextureUnit pMotionTexture[2];\ |
| @@ -61,16 +64,16 @@ TEST (AdaptiveQuantization, method) {\ · 11 unmodified lines | ||
| 61 | 64 | ASSERT_EQ(pMotionTexture[0].uiMotionIndex,pMotionTexture[1].uiMotionIndex);\ |
| 62 | 65 | } |
| 63 | 66 | |
| 64 | −GENERATE_AQTEST (SampleVariance16x16_c) | |
| 67 | +GENERATE_AQTEST (SampleVariance16x16_c, 0) | |
| 65 | 68 | #if defined(X86_ASM) |
| 66 | −GENERATE_AQTEST (SampleVariance16x16_sse2) | |
| 69 | +GENERATE_AQTEST (SampleVariance16x16_sse2, WELS_CPU_SSE2) | |
| 67 | 70 | #endif |
| 68 | 71 | |
| 69 | 72 | #if defined(HAVE_NEON) |
| 70 | −GENERATE_AQTEST (SampleVariance16x16_neon) | |
| 73 | +GENERATE_AQTEST (SampleVariance16x16_neon, WELS_CPU_NEON) | |
| 71 | 74 | #endif |
| 72 | 75 | |
| 73 | 76 | #if defined(HAVE_NEON_AARCH64) |
| 74 | −GENERATE_AQTEST (SampleVariance16x16_AArch64_neon) | |
| 77 | +GENERATE_AQTEST (SampleVariance16x16_AArch64_neon, WELS_CPU_NEON) | |
| 75 | 78 | #endif |
| 76 | 79 | |