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 | pMotionTexture->uiTextureIndex = (uiCurSquare >> 8) - (uiCurSum * uiCurSum); | 42 | pMotionTexture->uiTextureIndex = (uiCurSquare >> 8) - (uiCurSum * uiCurSum); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | #define GENERATE_AQTEST(method) \ | 45 | #define GENERATE_AQTEST(method, flag) \ |
| 46 | TEST (AdaptiveQuantization, method) {\ | 46 | TEST (AdaptiveQuantization, method) {\ |
| 47 | uint32_t uiCPUFlags = WelsCPUFeatureDetect(NULL); \ | ||
| 48 | if ((uiCPUFlags & flag) == 0 && flag != 0) \ | ||
| 49 | return; \ | ||
| 47 | ENFORCE_STACK_ALIGN_1D (uint8_t, pRefY,32*16,16)\ | 50 | ENFORCE_STACK_ALIGN_1D (uint8_t, pRefY,32*16,16)\ |
| 48 | ENFORCE_STACK_ALIGN_1D (uint8_t, pSrcY,48*16,16)\ | 51 | ENFORCE_STACK_ALIGN_1D (uint8_t, pSrcY,48*16,16)\ |
| 49 | SMotionTextureUnit pMotionTexture[2];\ | 52 | SMotionTextureUnit pMotionTexture[2];\ |
| @@ -61,16 +64,16 @@ TEST (AdaptiveQuantization, method) {\ · 11 unmodified lines | |||
| 61 | ASSERT_EQ(pMotionTexture[0].uiMotionIndex,pMotionTexture[1].uiMotionIndex);\ | 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 | #if defined(X86_ASM) | 68 | #if defined(X86_ASM) |
| 66 | GENERATE_AQTEST (SampleVariance16x16_sse2) | 69 | GENERATE_AQTEST (SampleVariance16x16_sse2, WELS_CPU_SSE2) |
| 67 | #endif | 70 | #endif |
| 68 | 71 | ||
| 69 | #if defined(HAVE_NEON) | 72 | #if defined(HAVE_NEON) |
| 70 | GENERATE_AQTEST (SampleVariance16x16_neon) | 73 | GENERATE_AQTEST (SampleVariance16x16_neon, WELS_CPU_NEON) |
| 71 | #endif | 74 | #endif |
| 72 | 75 | ||
| 73 | #if defined(HAVE_NEON_AARCH64) | 76 | #if defined(HAVE_NEON_AARCH64) |
| 74 | GENERATE_AQTEST (SampleVariance16x16_AArch64_neon) | 77 | GENERATE_AQTEST (SampleVariance16x16_AArch64_neon, WELS_CPU_NEON) |
| 75 | #endif | 78 | #endif |
| 76 | 79 | ||