Showing the changes to test/encoder/EncUT_MotionEstimate.cpp (1 of 8 files). Show all
Unified · Split
| @@ -10,8 +10,7 @@ · 9 unmodified lines | |||
| 10 | using namespace WelsSVCEnc; | 10 | using namespace WelsSVCEnc; |
| 11 | 11 | ||
| 12 | void CopyTargetBlock( uint8_t* pSrcBlock, const int32_t kiBlockSize, SMVUnitXY sTargetMv, const int32_t kiRefPicStride, | 12 | void CopyTargetBlock( uint8_t* pSrcBlock, const int32_t kiBlockSize, SMVUnitXY sTargetMv, const int32_t kiRefPicStride, |
| 13 | uint8_t* pRefPic) | 13 | uint8_t* pRefPic) { |
| 14 | { | ||
| 15 | uint8_t* pTargetPos = pRefPic+sTargetMv.iMvY*kiRefPicStride+sTargetMv.iMvX; | 14 | uint8_t* pTargetPos = pRefPic+sTargetMv.iMvY*kiRefPicStride+sTargetMv.iMvX; |
| 16 | uint8_t* pSourcePos = pSrcBlock; | 15 | uint8_t* pSourcePos = pSrcBlock; |
| 17 | 16 | ||
| @@ -24,8 +23,7 @@ void CopyTargetBlock( uint8_t* pSrcBlock, const int32_t kiBlockSize, SMVUnitXY s · 6 unmodified lines | |||
| 24 | 23 | ||
| 25 | 24 | ||
| 26 | void InitMe( const uint8_t kuiQp, const uint32_t kuiMvdTableMiddle, const uint32_t kuiMvdTableStride, | 25 | void InitMe( const uint8_t kuiQp, const uint32_t kuiMvdTableMiddle, const uint32_t kuiMvdTableStride, |
| 27 | uint16_t* pMvdCostTable, SWelsME* pMe) | 26 | uint16_t* pMvdCostTable, SWelsME* pMe) { |
| 28 | { | ||
| 29 | MvdCostInit( pMvdCostTable, kuiMvdTableStride ); | 27 | MvdCostInit( pMvdCostTable, kuiMvdTableStride ); |
| 30 | pMe->pMvdCost = &pMvdCostTable[kuiQp*kuiMvdTableStride + kuiMvdTableMiddle]; | 28 | pMe->pMvdCost = &pMvdCostTable[kuiQp*kuiMvdTableStride + kuiMvdTableMiddle]; |
| 31 | pMe->sMvp.iMvX = pMe->sMvp.iMvY = 0; | 29 | pMe->sMvp.iMvX = pMe->sMvp.iMvY = 0; |
| @@ -71,8 +69,7 @@ public: · 39 unmodified lines | |||
| 71 | }; | 69 | }; |
| 72 | 70 | ||
| 73 | 71 | ||
| 74 | TEST_F(MotionEstimateTest, TestDiamondSearch) | 72 | TEST_F(MotionEstimateTest, TestDiamondSearch) { |
| 75 | { | ||
| 76 | #define TEST_POS (5) | 73 | #define TEST_POS (5) |
| 77 | const int32_t kiPositionToCheck[TEST_POS][2] = {{0,0}, {0,1}, {1,0}, {0,-1}, {-1,0}}; | 74 | const int32_t kiPositionToCheck[TEST_POS][2] = {{0,0}, {0,1}, {1,0}, {0,-1}, {-1,0}}; |
| 78 | const int32_t kiMaxBlock16Sad = 72000;//a rough number | 75 | const int32_t kiMaxBlock16Sad = 72000;//a rough number |
| @@ -125,8 +122,7 @@ TEST_F(MotionEstimateTest, TestDiamondSearch) · 46 unmodified lines | |||
| 125 | } | 122 | } |
| 126 | 123 | ||
| 127 | 124 | ||
| 128 | TEST_F(MotionEstimateTest, TestVerticalSearch) | 125 | TEST_F(MotionEstimateTest, TestVerticalSearch) { |
| 129 | { | ||
| 130 | const int32_t kiMaxBlock16Sad = 72000;//a rough number | 126 | const int32_t kiMaxBlock16Sad = 72000;//a rough number |
| 131 | SWelsFuncPtrList sFuncList; | 127 | SWelsFuncPtrList sFuncList; |
| 132 | SWelsME sMe; | 128 | SWelsME sMe; |
| @@ -187,8 +183,7 @@ TEST_F(MotionEstimateTest, TestVerticalSearch) · 54 unmodified lines | |||
| 187 | //it is possible that ref at differnt position is identical, but that should be under a low probability | 183 | //it is possible that ref at differnt position is identical, but that should be under a low probability |
| 188 | } | 184 | } |
| 189 | } | 185 | } |
| 190 | TEST_F(MotionEstimateTest, TestHorizontalSearch) | 186 | TEST_F(MotionEstimateTest, TestHorizontalSearch) { |
| 191 | { | ||
| 192 | const int32_t kiMaxBlock16Sad = 72000;//a rough number | 187 | const int32_t kiMaxBlock16Sad = 72000;//a rough number |
| 193 | SWelsFuncPtrList sFuncList; | 188 | SWelsFuncPtrList sFuncList; |
| 194 | SWelsME sMe; | 189 | SWelsME sMe; |