Merge pull request #872 from sijchen/fix_me_func_type

[Fix] fix ME func type in UT
This commit is contained in:
Ethan Hugg 2014-05-21 08:11:27 -07:00
commit d3436555f8
2 changed files with 12 additions and 13 deletions

View File

@ -256,8 +256,16 @@ int32_t ReleaseFeatureSearchPreparation (CMemoryAlign* pMa, uint16_t*& pFeatureO
#define FMESWITCH_DEFAULT_GOODFRAME_NUM (2)
#define FME_DEFAULT_FEATURE_INDEX (0)
void PerformFMEPreprocess (SWelsFuncPtrList* pFunc, SPicture* pRef, uint16_t* pFeatureOfBlock,
SScreenBlockFeatureStorage* pScreenBlockFeatureStorage);
bool SetFeatureSearchIn (SWelsFuncPtrList* pFunc, const SWelsME& sMe,
const SSlice* pSlice, SScreenBlockFeatureStorage* pRefFeatureStorage,
const int32_t kiEncStride, const int32_t kiRefStride,
SFeatureSearchIn* pFeatureSearchIn);
void MotionEstimateFeatureFullSearch (SFeatureSearchIn& sFeatureSearchIn,
const uint32_t kuiMaxSearchPoint,
SWelsME* pMe);
void UpdateFMESwitch (SDqLayer* pCurLayer);
void UpdateFMESwitchNull (SDqLayer* pCurLayer);

View File

@ -7,16 +7,6 @@
#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;
void CopyTargetBlock( uint8_t* pSrcBlock, const int32_t kiBlockSize, SMVUnitXY sTargetMv, const int32_t kiRefPicStride,
@ -377,10 +367,11 @@ TEST_F(FeatureMotionEstimateTest, TestFeatureSearch) {
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,
if (SetFeatureSearchIn(&sFuncList, sMe, &sSlice, m_pScreenBlockFeatureStorage,
m_iMaxSearchBlock, m_iWidth,
&sFeatureSearchIn);
MotionEstimateFeatureFullSearch( sFeatureSearchIn, uiMaxSearchPoint, &sMe);
&sFeatureSearchIn)) {
MotionEstimateFeatureFullSearch( sFeatureSearchIn, uiMaxSearchPoint, &sMe);
}
bool bMvMatch = sMe.sMv.iMvX==sTargetMv.iMvX && sMe.sMv.iMvY==sTargetMv.iMvY;
bool bFeatureMatch =