ref: d3436555f80b3781e38514bb4b90b7d6341ea816
parent: ff46fc7d930b41efa449491e7ca9cf8bfd27faf8
parent: 5d1d47c01bfc420bc78c70fe075c2e317b868e09
author: Ethan Hugg <[email protected]>
date: Wed May 21 04:11:27 EDT 2014
Merge pull request #872 from sijchen/fix_me_func_type [Fix] 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 =