| 19 | } |
| 20 | |
| 21 | TEST (ReconstructionFunTest, WelsIDctRecI16x16Dc) { |
| 22 | ENFORCE_STACK_ALIGN_2D (uint8_t, pRec, 2, 16 * 16, 16) |
| 23 | ENFORCE_STACK_ALIGN_1D (uint8_t, pPred, 32 * 16, 16) |
| 24 | ENFORCE_STACK_ALIGN_1D (int16_t, pDct, 16, 16) |
| 25 | int32_t iCpuCores = 0; |
| 26 | SWelsFuncPtrList sFuncPtrList; |
| 27 | uint32_t m_uiCpuFeatureFlag = WelsCPUFeatureDetect (&iCpuCores); |
| 28 | WelsInitReconstructionFuncs (&sFuncPtrList, m_uiCpuFeatureFlag); |
| 29 | |
| 30 | for (int32_t k = 0; k < RECONTEST_NUM; k++) { |
| 31 | FillWithRandomData (pPred, 32 * 16); |
| 32 | FillWithRandomData ((uint8_t*)pDct, 16 * 2); |
| 33 | for (int32_t i = 0 ; i < 16; i++) { |
| 34 | pDct[i] = WELS_CLIP3 (pDct[i], -4080, 4080); |
| 35 | } |
| 36 | WelsIDctRecI16x16Dc_c (pRec[0], 16, pPred, 32, pDct); |
| 37 | sFuncPtrList.pfIDctI16x16Dc (pRec[1], 16, pPred, 32, pDct); |
| 38 | |
| 39 | for (int32_t j = 0 ; j < 16; j++) { |
| 40 | for (int32_t i = 0 ; i < 16; i++) { |
| 41 | ASSERT_EQ (pRec[0][i + j * 16], pRec[1][i + j * 16]); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | } |
| 47 | |
| 48 | TEST (ReconstructionFunTest, WelsGetNoneZeroCount) { |
| 49 | ENFORCE_STACK_ALIGN_1D (int16_t, pInput, 64, 16) |
no test coverage detected