Refine ME cross search ASM UT.
Unified · Split
| @@ -259,6 +259,9 @@ TEST_F(MotionEstimateTest, TestVerticalSearch_SSE41) · 258 unmodified lines | |||
| 259 | srand((uint32_t)time(NULL)); | 259 | srand((uint32_t)time(NULL)); |
| 260 | const uint8_t kuiQp = rand()%52; | 260 | const uint8_t kuiQp = rand()%52; |
| 261 | InitMe(kuiQp, 648, m_uiMvdTableSize, m_pMvdCostTable, &sMe); | 261 | InitMe(kuiQp, 648, m_uiMvdTableSize, m_pMvdCostTable, &sMe); |
| 262 | int32_t iTmp = 1; | ||
| 263 | uint32_t uiCPUFlags = WelsCPUFeatureDetect( &iTmp); | ||
| 264 | if ((uiCPUFlags & WELS_CPU_SSE41) == 0) return ; | ||
| 262 | 265 | ||
| 263 | SMVUnitXY sTargetMv; | 266 | SMVUnitXY sTargetMv; |
| 264 | WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions | 267 | WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions |
| @@ -323,7 +326,9 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch_SSE41) · 58 unmodified lines | |||
| 323 | srand((uint32_t)time(NULL)); | 326 | srand((uint32_t)time(NULL)); |
| 324 | const uint8_t kuiQp = rand()%52; | 327 | const uint8_t kuiQp = rand()%52; |
| 325 | InitMe(kuiQp, 648, m_uiMvdTableSize, m_pMvdCostTable, &sMe); | 328 | InitMe(kuiQp, 648, m_uiMvdTableSize, m_pMvdCostTable, &sMe); |
| 326 | 329 | int32_t iTmp = 1; | |
| 330 | uint32_t uiCPUFlags = WelsCPUFeatureDetect( &iTmp); | ||
| 331 | if ((uiCPUFlags & WELS_CPU_SSE41) == 0) return ; | ||
| 327 | SMVUnitXY sTargetMv; | 332 | SMVUnitXY sTargetMv; |
| 328 | WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions | 333 | WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions |
| 329 | WelsInitMeFunc(&sFuncList, WELS_CPU_SSE41, 1); | 334 | WelsInitMeFunc(&sFuncList, WELS_CPU_SSE41, 1); |