History

Add EncoderMB UT test file, and reformat UT files.

ganyang committed 12 years ago

Commit eb6f6ec1 parent 20c04648 files · +218 −29Browse files

Showing the changes to test/encoder/EncUT_MotionEstimate.cpp (1 of 8 files). Show all

Unified · Split

test/encoder/EncUT_MotionEstimate.cpp+5−10
@@ -10,8 +10,7 @@ · 9 unmodified lines
10using namespace WelsSVCEnc;10using namespace WelsSVCEnc;
11 11
12void CopyTargetBlock( uint8_t* pSrcBlock, const int32_t kiBlockSize, SMVUnitXY sTargetMv, const int32_t kiRefPicStride,12void 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
26void InitMe( const uint8_t kuiQp, const uint32_t kuiMvdTableMiddle, const uint32_t kuiMvdTableStride,25void 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
74TEST_F(MotionEstimateTest, TestDiamondSearch)72TEST_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 number75 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
128TEST_F(MotionEstimateTest, TestVerticalSearch)125TEST_F(MotionEstimateTest, TestVerticalSearch) {
129{
130 const int32_t kiMaxBlock16Sad = 72000;//a rough number126 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 probability183 //it is possible that ref at differnt position is identical, but that should be under a low probability
188 }184 }
189}185}
190TEST_F(MotionEstimateTest, TestHorizontalSearch)186TEST_F(MotionEstimateTest, TestHorizontalSearch) {
191{
192 const int32_t kiMaxBlock16Sad = 72000;//a rough number187 const int32_t kiMaxBlock16Sad = 72000;//a rough number
193 SWelsFuncPtrList sFuncList;188 SWelsFuncPtrList sFuncList;
194 SWelsME sMe;189 SWelsME sMe;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t