ref: 5d1d47c01bfc420bc78c70fe075c2e317b868e09
parent: 63b6f6f55e864c6fbd1c00cdeb1b3f15189ebd14
author: sijchen <sijchen@cisco.com>
date: Wed May 21 04:57:58 EDT 2014
fix me func type in UT
--- a/codec/encoder/core/inc/svc_motion_estimate.h
+++ b/codec/encoder/core/inc/svc_motion_estimate.h
@@ -256,8 +256,16 @@
#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);
--- a/test/encoder/EncUT_MotionEstimate.cpp
+++ b/test/encoder/EncUT_MotionEstimate.cpp
@@ -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 @@
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 =