|
|
|
|
@@ -7,6 +7,15 @@
|
|
|
|
|
#include "wels_func_ptr_def.h"
|
|
|
|
|
#include "cpu.h"
|
|
|
|
|
|
|
|
|
|
namespace WelsSVCEnc {
|
|
|
|
|
extern void SetFeatureSearchIn( SWelsFuncPtrList *pFunc, const SWelsME& sMe,
|
|
|
|
|
const SSlice *pSlice, SScreenBlockFeatureStorage* pRefFeatureStorage,
|
|
|
|
|
const int32_t kiEncStride, const int32_t kiRefStride,
|
|
|
|
|
SFeatureSearchIn* pFeatureSearchIn );
|
|
|
|
|
extern void MotionEstimateFeatureFullSearch( SFeatureSearchIn &sFeatureSearchIn,
|
|
|
|
|
const uint32_t kuiMaxSearchPoint,
|
|
|
|
|
SWelsME* pMe);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
using namespace WelsSVCEnc;
|
|
|
|
|
|
|
|
|
|
@@ -32,10 +41,14 @@ void InitMe( const uint8_t kuiQp, const uint32_t kuiMvdTableMiddle, const uint32
|
|
|
|
|
pMe->sMv.iMvX = pMe->sMv.iMvY = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline int GetRandomMv(int32_t iMin, int32_t iMax) {
|
|
|
|
|
return (rand()%(iMax-iMin)-(iMax-iMin)/2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MotionEstimateTest : public ::testing::Test {
|
|
|
|
|
public:
|
|
|
|
|
virtual void SetUp() {
|
|
|
|
|
m_pRefPic = NULL;
|
|
|
|
|
m_pRefData = NULL;
|
|
|
|
|
m_pSrcBlock = NULL;
|
|
|
|
|
m_pMvdCostTable = NULL;
|
|
|
|
|
|
|
|
|
|
@@ -45,9 +58,9 @@ public:
|
|
|
|
|
m_uiMvdTableSize = (1 + (648 << 1));
|
|
|
|
|
|
|
|
|
|
pMa = new CMemoryAlign(0);
|
|
|
|
|
m_pRefPic = static_cast<uint8_t *>
|
|
|
|
|
m_pRefData = static_cast<uint8_t *>
|
|
|
|
|
(pMa->WelsMalloc(m_iWidth*m_iHeight, "RefPic"));
|
|
|
|
|
ASSERT_TRUE( NULL != m_pRefPic );
|
|
|
|
|
ASSERT_TRUE( NULL != m_pRefData );
|
|
|
|
|
m_pSrcBlock = static_cast<uint8_t *>
|
|
|
|
|
(pMa->WelsMalloc(m_iMaxSearchBlock*m_iMaxSearchBlock, "SrcBlock"));
|
|
|
|
|
ASSERT_TRUE( NULL != m_pSrcBlock );
|
|
|
|
|
@@ -56,12 +69,12 @@ public:
|
|
|
|
|
}
|
|
|
|
|
virtual void TearDown() {
|
|
|
|
|
delete [] m_pMvdCostTable;
|
|
|
|
|
pMa->WelsFree( m_pRefPic, "RefPic");
|
|
|
|
|
pMa->WelsFree( m_pRefData, "RefPic");
|
|
|
|
|
pMa->WelsFree( m_pSrcBlock, "SrcBlock");
|
|
|
|
|
delete pMa;
|
|
|
|
|
}
|
|
|
|
|
public:
|
|
|
|
|
uint8_t *m_pRefPic;
|
|
|
|
|
uint8_t *m_pRefData;
|
|
|
|
|
uint8_t *m_pSrcBlock;
|
|
|
|
|
uint32_t m_uiMvdTableSize;
|
|
|
|
|
uint16_t *m_pMvdCostTable;
|
|
|
|
|
@@ -88,7 +101,7 @@ TEST_F(MotionEstimateTest, TestDiamondSearch) {
|
|
|
|
|
SMVUnitXY sTargetMv;
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefPic+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
bool bDataGeneratorSucceed = false;
|
|
|
|
|
bool bFoundMatch = false;
|
|
|
|
|
int32_t i, iTryTimes;
|
|
|
|
|
@@ -99,7 +112,7 @@ TEST_F(MotionEstimateTest, TestDiamondSearch) {
|
|
|
|
|
bDataGeneratorSucceed = false;
|
|
|
|
|
bFoundMatch = false;
|
|
|
|
|
while (!bFoundMatch && (iTryTimes--)>0) {
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefPic, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
@@ -138,7 +151,7 @@ TEST_F(MotionEstimateTest, TestVerticalSearch) {
|
|
|
|
|
SMVUnitXY sTargetMv;
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefPic+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixX = (m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixY = (m_iHeight/2);
|
|
|
|
|
|
|
|
|
|
@@ -151,7 +164,7 @@ TEST_F(MotionEstimateTest, TestVerticalSearch) {
|
|
|
|
|
bDataGeneratorSucceed = false;
|
|
|
|
|
bFoundMatch = false;
|
|
|
|
|
while (!bFoundMatch && (iTryTimes--)>0) {
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefPic, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
@@ -199,7 +212,7 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch) {
|
|
|
|
|
SMVUnitXY sTargetMv;
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefPic+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixX = (m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixY = (m_iHeight/2);
|
|
|
|
|
|
|
|
|
|
@@ -212,7 +225,7 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch) {
|
|
|
|
|
bDataGeneratorSucceed = false;
|
|
|
|
|
bFoundMatch = false;
|
|
|
|
|
while (!bFoundMatch && (iTryTimes--)>0) {
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefPic, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
@@ -267,7 +280,7 @@ TEST_F(MotionEstimateTest, TestVerticalSearch_SSE41)
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
WelsInitMeFunc(&sFuncList, WELS_CPU_SSE41, 1);
|
|
|
|
|
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefPic+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixX = (m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixY = (m_iHeight/2);
|
|
|
|
|
|
|
|
|
|
@@ -280,7 +293,7 @@ TEST_F(MotionEstimateTest, TestVerticalSearch_SSE41)
|
|
|
|
|
bDataGeneratorSucceed = false;
|
|
|
|
|
bFoundMatch = false;
|
|
|
|
|
while (!bFoundMatch && (iTryTimes--)>0) {
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefPic, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
@@ -333,7 +346,7 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch_SSE41)
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
WelsInitMeFunc(&sFuncList, WELS_CPU_SSE41, 1);
|
|
|
|
|
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefPic+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixX = (m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixY = (m_iHeight/2);
|
|
|
|
|
|
|
|
|
|
@@ -346,13 +359,12 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch_SSE41)
|
|
|
|
|
bDataGeneratorSucceed = false;
|
|
|
|
|
bFoundMatch = false;
|
|
|
|
|
while (!bFoundMatch && (iTryTimes--)>0) {
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefPic, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
CopyTargetBlock( m_pSrcBlock, 16, sTargetMv, m_iWidth, pRefPicCenter);
|
|
|
|
|
CopyTargetBlock( m_pSrcBlock, m_iMaxSearchBlock, sTargetMv, m_iWidth, pRefPicCenter );
|
|
|
|
|
|
|
|
|
|
//clean the sMe status
|
|
|
|
|
//clean sMe status
|
|
|
|
|
sMe.uiBlockSize = rand()%5;
|
|
|
|
|
sMe.pEncMb = m_pSrcBlock;
|
|
|
|
|
sMe.pRefMb = pRefPicCenter;
|
|
|
|
|
@@ -383,3 +395,167 @@ TEST_F(MotionEstimateTest, TestHorizontalSearch_SSE41)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
class FeatureMotionEstimateTest : public ::testing::Test {
|
|
|
|
|
public:
|
|
|
|
|
virtual void SetUp() {
|
|
|
|
|
m_pRefData = NULL;
|
|
|
|
|
m_pSrcBlock = NULL;
|
|
|
|
|
m_pMvdCostTable = NULL;
|
|
|
|
|
|
|
|
|
|
m_iWidth = 64;//size of search window
|
|
|
|
|
m_iHeight = 64;//size of search window
|
|
|
|
|
m_iMaxSearchBlock = 8;
|
|
|
|
|
m_uiMvdTableSize = (1 + (648 << 1));
|
|
|
|
|
|
|
|
|
|
m_pMa = new CMemoryAlign(16);
|
|
|
|
|
ASSERT_TRUE( NULL != m_pMa );
|
|
|
|
|
m_pRefData = (uint8_t*)m_pMa->WelsMalloc (m_iWidth*m_iHeight*sizeof (uint8_t), "m_pRefData");
|
|
|
|
|
ASSERT_TRUE( NULL != m_pRefData );
|
|
|
|
|
m_pSrcBlock = (uint8_t*)m_pMa->WelsMalloc (m_iMaxSearchBlock*m_iMaxSearchBlock*sizeof (uint8_t), "m_pSrcBlock");
|
|
|
|
|
ASSERT_TRUE( NULL != m_pSrcBlock );
|
|
|
|
|
m_pMvdCostTable = (uint16_t*)m_pMa->WelsMalloc (52*m_uiMvdTableSize*sizeof (uint16_t), "m_pMvdCostTable");
|
|
|
|
|
ASSERT_TRUE( NULL != m_pMvdCostTable );
|
|
|
|
|
m_pFeatureSearchPreparation = (SFeatureSearchPreparation*)m_pMa->WelsMalloc (sizeof (SFeatureSearchPreparation), "m_pFeatureSearchPreparation");
|
|
|
|
|
ASSERT_TRUE( NULL != m_pFeatureSearchPreparation );
|
|
|
|
|
m_pScreenBlockFeatureStorage = (SScreenBlockFeatureStorage*)m_pMa->WelsMalloc (sizeof (SScreenBlockFeatureStorage), "m_pScreenBlockFeatureStorage");
|
|
|
|
|
ASSERT_TRUE( NULL != m_pScreenBlockFeatureStorage );
|
|
|
|
|
}
|
|
|
|
|
virtual void TearDown() {
|
|
|
|
|
if (m_pMa) {
|
|
|
|
|
if (m_pRefData) {
|
|
|
|
|
m_pMa->WelsFree(m_pRefData, "m_pRefData");
|
|
|
|
|
m_pRefData = NULL;
|
|
|
|
|
}
|
|
|
|
|
if (m_pSrcBlock) {
|
|
|
|
|
m_pMa->WelsFree(m_pSrcBlock, "m_pSrcBlock");
|
|
|
|
|
m_pSrcBlock = NULL;
|
|
|
|
|
}
|
|
|
|
|
if (m_pMvdCostTable) {
|
|
|
|
|
m_pMa->WelsFree(m_pMvdCostTable, "m_pMvdCostTable");
|
|
|
|
|
m_pMvdCostTable = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_pFeatureSearchPreparation) {
|
|
|
|
|
ReleaseFeatureSearchPreparation( m_pMa, m_pFeatureSearchPreparation->pFeatureOfBlock);
|
|
|
|
|
m_pMa->WelsFree(m_pFeatureSearchPreparation, "m_pFeatureSearchPreparation");
|
|
|
|
|
m_pFeatureSearchPreparation = NULL;
|
|
|
|
|
}
|
|
|
|
|
if (m_pScreenBlockFeatureStorage) {
|
|
|
|
|
ReleaseScreenBlockFeatureStorage( m_pMa, m_pScreenBlockFeatureStorage );
|
|
|
|
|
m_pMa->WelsFree(m_pScreenBlockFeatureStorage, "m_pScreenBlockFeatureStorage");
|
|
|
|
|
m_pScreenBlockFeatureStorage = NULL;
|
|
|
|
|
}
|
|
|
|
|
delete m_pMa;
|
|
|
|
|
m_pMa = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void InitRefPicForMeTest(SPicture* pRefPic) {
|
|
|
|
|
pRefPic->pData[0] = m_pRefData;
|
|
|
|
|
pRefPic->iLineSize[0] = m_iWidth;
|
|
|
|
|
pRefPic->iFrameAverageQp = rand()%52;
|
|
|
|
|
pRefPic->iWidthInPixel = m_iWidth;
|
|
|
|
|
pRefPic->iHeightInPixel = m_iHeight;
|
|
|
|
|
}
|
|
|
|
|
public:
|
|
|
|
|
CMemoryAlign* m_pMa;
|
|
|
|
|
|
|
|
|
|
SFeatureSearchPreparation* m_pFeatureSearchPreparation;
|
|
|
|
|
SScreenBlockFeatureStorage* m_pScreenBlockFeatureStorage;
|
|
|
|
|
|
|
|
|
|
uint8_t *m_pRefData;
|
|
|
|
|
uint8_t *m_pSrcBlock;
|
|
|
|
|
uint16_t *m_pMvdCostTable;
|
|
|
|
|
uint32_t m_uiMvdTableSize;
|
|
|
|
|
|
|
|
|
|
int32_t m_iWidth;
|
|
|
|
|
int32_t m_iHeight;
|
|
|
|
|
int32_t m_iMaxSearchBlock;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TEST_F(FeatureMotionEstimateTest, TestFeatureSearch) {
|
|
|
|
|
const int32_t kiMaxBlock16Sad = 72000;//a rough number
|
|
|
|
|
SWelsFuncPtrList sFuncList;
|
|
|
|
|
WelsInitSampleSadFunc( &sFuncList, 0 );//test c functions
|
|
|
|
|
WelsInitMeFunc( &sFuncList, 0, true );
|
|
|
|
|
|
|
|
|
|
SWelsME sMe;
|
|
|
|
|
srand((uint32_t)time(NULL));
|
|
|
|
|
const uint8_t kuiQp = rand()%52;
|
|
|
|
|
InitMe(kuiQp, 648, m_uiMvdTableSize, m_pMvdCostTable, &sMe);
|
|
|
|
|
sMe.iCurMeBlockPixX = (m_iWidth/2);
|
|
|
|
|
sMe.iCurMeBlockPixY = (m_iHeight/2);
|
|
|
|
|
uint8_t *pRefPicCenter = m_pRefData+(m_iHeight/2)*m_iWidth+(m_iWidth/2);
|
|
|
|
|
|
|
|
|
|
SPicture sRef;
|
|
|
|
|
InitRefPicForMeTest(&sRef);
|
|
|
|
|
|
|
|
|
|
SSlice sSlice;
|
|
|
|
|
const int32_t kiSupposedPaddingLength=16;
|
|
|
|
|
SetMvWithinIntegerMvRange( m_iWidth/16-kiSupposedPaddingLength, m_iHeight/16-kiSupposedPaddingLength,
|
|
|
|
|
m_iWidth/2/16, m_iHeight/2/16, 508,
|
|
|
|
|
&(sSlice.sMvStartMin), &(sSlice.sMvStartMax));
|
|
|
|
|
int32_t iReturn;
|
|
|
|
|
const int32_t kiNeedFeatureStorage = ME_DIA_CROSS_FME;
|
|
|
|
|
iReturn = RequestFeatureSearchPreparation( m_pMa, m_iWidth, m_iHeight, kiNeedFeatureStorage,
|
|
|
|
|
m_pFeatureSearchPreparation);
|
|
|
|
|
ASSERT_TRUE( ENC_RETURN_SUCCESS==iReturn );
|
|
|
|
|
iReturn = RequestScreenBlockFeatureStorage( m_pMa, m_iWidth, m_iHeight, kiNeedFeatureStorage,
|
|
|
|
|
m_pScreenBlockFeatureStorage);
|
|
|
|
|
ASSERT_TRUE( ENC_RETURN_SUCCESS==iReturn );
|
|
|
|
|
|
|
|
|
|
SMVUnitXY sTargetMv;
|
|
|
|
|
for (int i=sSlice.sMvStartMin.iMvX; i<=sSlice.sMvStartMax.iMvX;i++) {
|
|
|
|
|
for (int j=sSlice.sMvStartMin.iMvY; j<=sSlice.sMvStartMax.iMvY;j++) {
|
|
|
|
|
if ( i==0 || j==0) continue;//exclude x=0 or y=0 since that will be skipped by FME
|
|
|
|
|
|
|
|
|
|
bool bDataGeneratorSucceed = false;
|
|
|
|
|
bool bFoundMatch = false;
|
|
|
|
|
|
|
|
|
|
if (!YUVPixelDataGenerator( m_pRefData, m_iWidth, m_iHeight, m_iWidth ))
|
|
|
|
|
continue;
|
|
|
|
|
bDataGeneratorSucceed = true;
|
|
|
|
|
|
|
|
|
|
sTargetMv.iMvX = i;
|
|
|
|
|
sTargetMv.iMvY = j;
|
|
|
|
|
CopyTargetBlock( m_pSrcBlock, m_iMaxSearchBlock, sTargetMv, m_iWidth, pRefPicCenter );
|
|
|
|
|
|
|
|
|
|
//clean sMe status
|
|
|
|
|
sMe.uiBlockSize = BLOCK_8x8;
|
|
|
|
|
sMe.pEncMb = m_pSrcBlock;
|
|
|
|
|
sMe.pRefMb = pRefPicCenter;
|
|
|
|
|
sMe.pColoRefMb = pRefPicCenter;
|
|
|
|
|
sMe.sMv.iMvX = sMe.sMv.iMvY = 0;
|
|
|
|
|
sMe.uiSadCost = sMe.uiSatdCost = kiMaxBlock16Sad;
|
|
|
|
|
|
|
|
|
|
//begin FME process
|
|
|
|
|
PerformFMEPreprocess(&sFuncList, &sRef, m_pFeatureSearchPreparation->pFeatureOfBlock,
|
|
|
|
|
m_pScreenBlockFeatureStorage);
|
|
|
|
|
m_pScreenBlockFeatureStorage->uiSadCostThreshold[BLOCK_8x8] = UINT_MAX;//to avoid early skip
|
|
|
|
|
uint32_t uiMaxSearchPoint = INT_MAX;
|
|
|
|
|
SFeatureSearchIn sFeatureSearchIn = {0};
|
|
|
|
|
SetFeatureSearchIn(&sFuncList, sMe, &sSlice, m_pScreenBlockFeatureStorage,
|
|
|
|
|
m_iMaxSearchBlock, m_iWidth,
|
|
|
|
|
&sFeatureSearchIn);
|
|
|
|
|
MotionEstimateFeatureFullSearch( sFeatureSearchIn, uiMaxSearchPoint, &sMe);
|
|
|
|
|
|
|
|
|
|
bool bMvMatch = sMe.sMv.iMvX==sTargetMv.iMvX && sMe.sMv.iMvY==sTargetMv.iMvY;
|
|
|
|
|
bool bFeatureMatch =
|
|
|
|
|
( *(m_pScreenBlockFeatureStorage->pFeatureOfBlockPointer +(m_iHeight/2+sTargetMv.iMvY)*(m_iWidth-8)+(m_iWidth/2+sTargetMv.iMvX))
|
|
|
|
|
== *(m_pScreenBlockFeatureStorage->pFeatureOfBlockPointer +(m_iHeight/2+sMe.sMv.iMvY)*(m_iWidth-8)+(m_iWidth/2+sMe.sMv.iMvX)) )
|
|
|
|
|
&& ((sMe.pMvdCost[sMe.sMv.iMvY<<2]+sMe.pMvdCost[sMe.sMv.iMvX<<2]) <= (sMe.pMvdCost[sTargetMv.iMvY<<2]+sMe.pMvdCost[sTargetMv.iMvX<<2]));
|
|
|
|
|
|
|
|
|
|
//the last selection may be affected by MVDcost, that is when smaller Mv will be better
|
|
|
|
|
bFoundMatch = bMvMatch || bFeatureMatch;
|
|
|
|
|
|
|
|
|
|
if (bDataGeneratorSucceed) {
|
|
|
|
|
//if DataGenerator never succeed, there is no meaning to check iTryTimes
|
|
|
|
|
if (!bFoundMatch) {
|
|
|
|
|
printf("TestFeatureSearch Target: %d,%d, Result: %d,%d\n", sTargetMv.iMvX, sTargetMv.iMvY, sMe.sMv.iMvX, sMe.sMv.iMvY);
|
|
|
|
|
}
|
|
|
|
|
EXPECT_TRUE(bFoundMatch);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|