astyle all files
This commit is contained in:
@@ -138,7 +138,7 @@ typedef enum {
|
||||
//-----------------------------------------------------------------//
|
||||
// Algorithm parameters define
|
||||
//-----------------------------------------------------------------//
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
SRect sMaskRect;
|
||||
bool bMaskInfoAvailable;
|
||||
int iScrollMvX;
|
||||
@@ -163,7 +163,7 @@ typedef struct {
|
||||
ESceneChangeIdc eSceneChangeIdc; // SIMILAR_SCENE, MEDIUM_CHANGED_SCENE, LARGE_CHANGED_SCENE
|
||||
int iMotionBlockNum; // Number of motion blocks
|
||||
int iFrameComplexity; // frame complexity
|
||||
unsigned char * pStaticBlockIdc; // static block idc
|
||||
unsigned char* pStaticBlockIdc; // static block idc
|
||||
} SSceneChangeResult;
|
||||
|
||||
typedef struct {
|
||||
@@ -216,8 +216,7 @@ typedef enum {
|
||||
GOM_VAR = -2
|
||||
} EComplexityAnalysisMode;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
int iScrollMvX;
|
||||
int iScrollMvY;
|
||||
bool bScrollDetectFlag; // 0:false ; 1:ltr; 2: scene change
|
||||
@@ -235,10 +234,9 @@ typedef struct {
|
||||
SVAACalcResult* pCalcResult;
|
||||
} SComplexityAnalysisParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
int iMbRowInGom;
|
||||
int *pGomComplexity;
|
||||
int* pGomComplexity;
|
||||
int iGomNumInFrame;
|
||||
int iFrameComplexity;
|
||||
int iIdrFlag;
|
||||
|
||||
@@ -84,7 +84,7 @@ class CBackgroundDetection : public IStrategy {
|
||||
inline void FreeOUArrayMemory();
|
||||
inline int32_t CalculateAsdChromaEdge (uint8_t* pOriRef, uint8_t* pOriCur, int32_t iStride);
|
||||
inline bool ForegroundDilation23Luma (SBackgroundOU* pBackgroundOU,
|
||||
SBackgroundOU* pOUNeighbours[]); //Foreground_Dilation_2_3_Luma
|
||||
SBackgroundOU* pOUNeighbours[]); //Foreground_Dilation_2_3_Luma
|
||||
inline bool ForegroundDilation23Chroma (int8_t iNeighbourForegroundFlags, int32_t iStartSamplePos,
|
||||
int32_t iPicStrideUV, vBGDParam* pBgdParam);//Foreground_Dilation_2_3_Chroma
|
||||
inline void ForegroundDilation (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[], vBGDParam* pBgdParam,
|
||||
|
||||
@@ -267,11 +267,11 @@ IStrategy* CVpFrameWork::CreateStrategy (EMethods m_eMethod, int32_t iCpuFlag) {
|
||||
pStrategy = WelsDynamicCast (IStrategy*, new CDenoiser (iCpuFlag));
|
||||
break;
|
||||
case METHOD_SCROLL_DETECTION:
|
||||
pStrategy = WelsDynamicCast (IStrategy*, new CScrollDetection(iCpuFlag));
|
||||
break;
|
||||
pStrategy = WelsDynamicCast (IStrategy*, new CScrollDetection (iCpuFlag));
|
||||
break;
|
||||
case METHOD_SCENE_CHANGE_DETECTION_VIDEO:
|
||||
case METHOD_SCENE_CHANGE_DETECTION_SCREEN:
|
||||
pStrategy = BuildSceneChangeDetection(m_eMethod, iCpuFlag);
|
||||
pStrategy = BuildSceneChangeDetection (m_eMethod, iCpuFlag);
|
||||
break;
|
||||
case METHOD_DOWNSAMPLE:
|
||||
pStrategy = WelsDynamicCast (IStrategy*, new CDownsampling (iCpuFlag));
|
||||
|
||||
@@ -44,8 +44,8 @@ void WelsI16x16LumaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStrid
|
||||
|
||||
do {
|
||||
ST64 (pDst , kuiT1);
|
||||
ST64 (pDst + 8, kuiT2);
|
||||
pDst += 16;
|
||||
ST64 (pDst + 8, kuiT2);
|
||||
pDst += 16;
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
@@ -58,15 +58,15 @@ void WelsI16x16LumaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStrid
|
||||
do {
|
||||
const uint8_t kuiSrc8 = pRef[iStridex15 - 1];
|
||||
#ifdef _MSC_VER
|
||||
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101U * kuiSrc8);
|
||||
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101U * kuiSrc8);
|
||||
#else
|
||||
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101LL * kuiSrc8);
|
||||
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101LL * kuiSrc8);
|
||||
#endif
|
||||
ST64 (&pPred[iPredStridex15], kuiV64);
|
||||
ST64 (&pPred[iPredStridex15 + 8], kuiV64);
|
||||
ST64 (&pPred[iPredStridex15], kuiV64);
|
||||
ST64 (&pPred[iPredStridex15 + 8], kuiV64);
|
||||
|
||||
iStridex15 -= kiStride;
|
||||
iPredStridex15 -= iPredStride;
|
||||
iStridex15 -= kiStride;
|
||||
iPredStridex15 -= iPredStride;
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,12 +53,12 @@ typedef int32_t (SadFunc) (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY,
|
||||
|
||||
typedef SadFunc* SadFuncPtr;
|
||||
|
||||
typedef int32_t (Sad16x16Func) ( uint8_t * pSrcY, int32_t iSrcStrideY, uint8_t *pRefY, int32_t iRefStrideY );
|
||||
typedef Sad16x16Func *PSad16x16Func;
|
||||
typedef int32_t (Sad16x16Func) (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY);
|
||||
typedef Sad16x16Func* PSad16x16Func;
|
||||
|
||||
typedef void (GetIntraPred)(uint8_t *pPred, uint8_t *pRef, const int32_t kiStride);
|
||||
typedef void (GetIntraPred) (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
|
||||
|
||||
typedef GetIntraPred *GetIntraPredPtr;
|
||||
typedef GetIntraPred* GetIntraPredPtr;
|
||||
|
||||
GetIntraPred WelsI16x16LumaPredV_c;
|
||||
GetIntraPred WelsI16x16LumaPredH_c;
|
||||
|
||||
@@ -82,21 +82,20 @@ class CComplexityAnalysis : public IStrategy {
|
||||
|
||||
//for screen content
|
||||
|
||||
class CComplexityAnalysisScreen : public IStrategy
|
||||
{
|
||||
public:
|
||||
CComplexityAnalysisScreen(int32_t cpu_flag);
|
||||
class CComplexityAnalysisScreen : public IStrategy {
|
||||
public:
|
||||
CComplexityAnalysisScreen (int32_t cpu_flag);
|
||||
~CComplexityAnalysisScreen();
|
||||
|
||||
EResult Process(int32_t nType, SPixMap *src, SPixMap *ref);
|
||||
EResult Set(int32_t nType, void *pParam);
|
||||
EResult Get(int32_t nType, void *pParam);
|
||||
EResult Process (int32_t nType, SPixMap* src, SPixMap* ref);
|
||||
EResult Set (int32_t nType, void* pParam);
|
||||
EResult Get (int32_t nType, void* pParam);
|
||||
|
||||
private:
|
||||
void GomComplexityAnalysisIntra( SPixMap *pSrc );
|
||||
void GomComplexityAnalysisInter( SPixMap *pSrc, SPixMap *pRef,bool bScrollFlag);
|
||||
private:
|
||||
void GomComplexityAnalysisIntra (SPixMap* pSrc);
|
||||
void GomComplexityAnalysisInter (SPixMap* pSrc, SPixMap* pRef, bool bScrollFlag);
|
||||
|
||||
private:
|
||||
private:
|
||||
PSad16x16Func m_pSadFunc;
|
||||
GetIntraPredPtr m_pIntraFunc[2];
|
||||
SComplexityAnalysisScreenParam m_ComplexityAnalysisParam;
|
||||
|
||||
@@ -112,8 +112,9 @@ HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_neon;
|
||||
|
||||
GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_neon;
|
||||
|
||||
void GeneralBilinearAccurateDownsampler_neon( uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, const int32_t kiDstHeight,
|
||||
uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY);
|
||||
void GeneralBilinearAccurateDownsampler_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth,
|
||||
const int32_t kiDstHeight,
|
||||
uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY);
|
||||
|
||||
WELSVP_EXTERN_C_END
|
||||
#endif
|
||||
|
||||
@@ -230,13 +230,15 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr
|
||||
#endif //X86_ASM
|
||||
|
||||
#ifdef HAVE_NEON
|
||||
void GeneralBilinearAccurateDownsamplerWrap_neon(uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, const int32_t kiDstHeight,
|
||||
uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) {
|
||||
void GeneralBilinearAccurateDownsamplerWrap_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth,
|
||||
const int32_t kiDstHeight,
|
||||
uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) {
|
||||
const int32_t kiScaleBit = 15;
|
||||
const uint32_t kuiScale = (1 << kiScaleBit);
|
||||
uint32_t uiScalex = (uint32_t)((float)kiSrcWidth / (float)kiDstWidth * kuiScale);
|
||||
uint32_t uiScaley = (uint32_t)((float)kiSrcHeight / (float)kiDstHeight * kuiScale);
|
||||
GeneralBilinearAccurateDownsampler_neon(pDst, kiDstStride, kiDstWidth, kiDstHeight, pSrc, kiSrcStride, uiScalex, uiScaley);
|
||||
uint32_t uiScalex = (uint32_t) ((float)kiSrcWidth / (float)kiDstWidth * kuiScale);
|
||||
uint32_t uiScaley = (uint32_t) ((float)kiSrcHeight / (float)kiDstHeight * kuiScale);
|
||||
GeneralBilinearAccurateDownsampler_neon (pDst, kiDstStride, kiDstWidth, kiDstHeight, pSrc, kiSrcStride, uiScalex,
|
||||
uiScaley);
|
||||
}
|
||||
#endif
|
||||
WELSVP_NAMESPACE_END
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
IStrategy * BuildSceneChangeDetection(EMethods eMethod, int32_t iCpuFlag){
|
||||
switch(eMethod){
|
||||
IStrategy* BuildSceneChangeDetection (EMethods eMethod, int32_t iCpuFlag) {
|
||||
switch (eMethod) {
|
||||
case METHOD_SCENE_CHANGE_DETECTION_VIDEO:
|
||||
return new CSceneChangeDetection<CSceneChangeDetectorVideo>(eMethod, iCpuFlag);
|
||||
return new CSceneChangeDetection<CSceneChangeDetectorVideo> (eMethod, iCpuFlag);
|
||||
break;
|
||||
case METHOD_SCENE_CHANGE_DETECTION_SCREEN:
|
||||
return new CSceneChangeDetection<CSceneChangeDetectorScreen>(eMethod, iCpuFlag);
|
||||
return new CSceneChangeDetection<CSceneChangeDetectorScreen> (eMethod, iCpuFlag);
|
||||
break;
|
||||
default:
|
||||
// not support yet
|
||||
|
||||
@@ -56,40 +56,41 @@
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
class CSceneChangeDetectorVideo {
|
||||
public:
|
||||
CSceneChangeDetectorVideo(SSceneChangeResult & sParam, int32_t iCpuFlag) : m_sParam(sParam) {
|
||||
public:
|
||||
CSceneChangeDetectorVideo (SSceneChangeResult& sParam, int32_t iCpuFlag) : m_sParam (sParam) {
|
||||
m_pfSad = WelsSampleSad8x8_c;
|
||||
#ifdef X86_ASM
|
||||
if (iCpuFlag & WELS_CPU_SSE2){
|
||||
if (iCpuFlag & WELS_CPU_SSE2) {
|
||||
m_pfSad = WelsSampleSad8x8_sse21;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_NEON
|
||||
if (iCpuFlag & WELS_CPU_NEON){
|
||||
if (iCpuFlag & WELS_CPU_NEON) {
|
||||
m_pfSad = WelsProcessingSampleSad8x8_neon;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
virtual ~CSceneChangeDetectorVideo() {
|
||||
}
|
||||
void operator () (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY, uint8_t *& pStaticBlockIdc) {
|
||||
int32_t iSad = m_pfSad(pSrcY, iSrcStrideY, pRefY, iSrcStrideY);
|
||||
void operator() (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY, uint8_t*& pStaticBlockIdc) {
|
||||
int32_t iSad = m_pfSad (pSrcY, iSrcStrideY, pRefY, iSrcStrideY);
|
||||
m_sParam.iMotionBlockNum += iSad > HIGH_MOTION_BLOCK_THRESHOLD;
|
||||
}
|
||||
protected:
|
||||
protected:
|
||||
SadFuncPtr m_pfSad;
|
||||
SSceneChangeResult &m_sParam;
|
||||
SSceneChangeResult& m_sParam;
|
||||
};
|
||||
|
||||
class CSceneChangeDetectorScreen : public CSceneChangeDetectorVideo{
|
||||
public:
|
||||
CSceneChangeDetectorScreen(SSceneChangeResult & sParam, int32_t iCpuFlag) : CSceneChangeDetectorVideo(sParam, iCpuFlag) {
|
||||
class CSceneChangeDetectorScreen : public CSceneChangeDetectorVideo {
|
||||
public:
|
||||
CSceneChangeDetectorScreen (SSceneChangeResult& sParam, int32_t iCpuFlag) : CSceneChangeDetectorVideo (sParam,
|
||||
iCpuFlag) {
|
||||
}
|
||||
virtual ~CSceneChangeDetectorScreen() {
|
||||
}
|
||||
void operator() (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY, uint8_t *& pStaticBlockIdc) {
|
||||
int32_t iSad = m_pfSad(pSrcY, iSrcStrideY, pRefY, iSrcStrideY);
|
||||
if( iSad == 0 ){
|
||||
void operator() (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY, uint8_t*& pStaticBlockIdc) {
|
||||
int32_t iSad = m_pfSad (pSrcY, iSrcStrideY, pRefY, iSrcStrideY);
|
||||
if (iSad == 0) {
|
||||
*pStaticBlockIdc ++ = COLLOCATED_STATIC;
|
||||
} else {
|
||||
m_sParam.iFrameComplexity += iSad;
|
||||
@@ -102,28 +103,30 @@ public:
|
||||
template<typename T>
|
||||
class CSceneChangeDetection : public IStrategy {
|
||||
public:
|
||||
CSceneChangeDetection (EMethods eMethod, int32_t iCpuFlag): m_cDetector(m_sSceneChangeParam, iCpuFlag) {
|
||||
CSceneChangeDetection (EMethods eMethod, int32_t iCpuFlag): m_cDetector (m_sSceneChangeParam, iCpuFlag) {
|
||||
m_eMethod = eMethod;
|
||||
WelsMemset (&m_sSceneChangeParam, 0, sizeof (m_sSceneChangeParam));
|
||||
}
|
||||
|
||||
~CSceneChangeDetection(){
|
||||
~CSceneChangeDetection() {
|
||||
}
|
||||
|
||||
EResult Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap){
|
||||
EResult Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap) {
|
||||
EResult eReturn = RET_INVALIDPARAM;
|
||||
int32_t iWidth = pSrcPixMap->sRect.iRectWidth;
|
||||
int32_t iHeight = pSrcPixMap->sRect.iRectHeight;
|
||||
int32_t iBlock8x8Width = iWidth >> 3;
|
||||
int32_t iBlock8x8Height = iHeight >> 3;
|
||||
int32_t iBlock8x8Num = iBlock8x8Width * iBlock8x8Height;
|
||||
int32_t iSceneChangeThresholdLarge = WelsStaticCast (int32_t, SCENE_CHANGE_MOTION_RATIO_LARGE * iBlock8x8Num + 0.5f + PESN);
|
||||
int32_t iSceneChangeThresholdMedium = WelsStaticCast(int32_t, SCENE_CHANGE_MOTION_RATIO_MEDIUM * iBlock8x8Num + 0.5f + PESN);
|
||||
int32_t iSceneChangeThresholdLarge = WelsStaticCast (int32_t,
|
||||
SCENE_CHANGE_MOTION_RATIO_LARGE * iBlock8x8Num + 0.5f + PESN);
|
||||
int32_t iSceneChangeThresholdMedium = WelsStaticCast (int32_t,
|
||||
SCENE_CHANGE_MOTION_RATIO_MEDIUM * iBlock8x8Num + 0.5f + PESN);
|
||||
uint8_t* pRefY = NULL, *pCurY = NULL;
|
||||
int32_t iRefStride = 0, iCurStride = 0;
|
||||
int32_t iRefRowStride = 0, iCurRowStride = 0;
|
||||
uint8_t* pRefTmp = NULL, *pCurTmp = NULL;
|
||||
uint8_t * pStaticBlockIdc = m_sSceneChangeParam.pStaticBlockIdc;
|
||||
uint8_t* pStaticBlockIdc = m_sSceneChangeParam.pStaticBlockIdc;
|
||||
|
||||
pRefY = (uint8_t*)pRefPixMap->pPixel[0];
|
||||
pCurY = (uint8_t*)pSrcPixMap->pPixel[0];
|
||||
@@ -143,7 +146,7 @@ class CSceneChangeDetection : public IStrategy {
|
||||
pCurTmp = pCurY;
|
||||
|
||||
for (int32_t i = 0; i < iBlock8x8Width; i++) {
|
||||
m_cDetector(pRefTmp, iRefStride, pCurTmp, iCurStride, pStaticBlockIdc);
|
||||
m_cDetector (pRefTmp, iRefStride, pCurTmp, iCurStride, pStaticBlockIdc);
|
||||
pRefTmp += 8;
|
||||
pCurTmp += 8;
|
||||
}
|
||||
@@ -154,7 +157,7 @@ class CSceneChangeDetection : public IStrategy {
|
||||
|
||||
if (m_sSceneChangeParam.iMotionBlockNum >= iSceneChangeThresholdLarge) {
|
||||
m_sSceneChangeParam.eSceneChangeIdc = LARGE_CHANGED_SCENE;
|
||||
} else if( m_sSceneChangeParam.iMotionBlockNum >= iSceneChangeThresholdMedium ){
|
||||
} else if (m_sSceneChangeParam.iMotionBlockNum >= iSceneChangeThresholdMedium) {
|
||||
m_sSceneChangeParam.eSceneChangeIdc = MEDIUM_CHANGED_SCENE;
|
||||
}
|
||||
|
||||
@@ -171,11 +174,11 @@ class CSceneChangeDetection : public IStrategy {
|
||||
return RET_SUCCESS;
|
||||
}
|
||||
|
||||
EResult Set(int32_t iType, void * pParam) {
|
||||
if( pParam == NULL ){
|
||||
EResult Set (int32_t iType, void* pParam) {
|
||||
if (pParam == NULL) {
|
||||
return RET_INVALIDPARAM;
|
||||
}
|
||||
m_sSceneChangeParam = *(SSceneChangeResult*)pParam;
|
||||
m_sSceneChangeParam = * (SSceneChangeResult*)pParam;
|
||||
return RET_SUCCESS;
|
||||
}
|
||||
private:
|
||||
@@ -183,7 +186,7 @@ class CSceneChangeDetection : public IStrategy {
|
||||
T m_cDetector;
|
||||
};
|
||||
|
||||
IStrategy * BuildSceneChangeDetection(EMethods eMethod, int32_t iCpuFlag);
|
||||
IStrategy* BuildSceneChangeDetection (EMethods eMethod, int32_t iCpuFlag);
|
||||
|
||||
WELSVP_NAMESPACE_END
|
||||
|
||||
|
||||
@@ -37,37 +37,38 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
EResult CScrollDetection::Process(int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap){
|
||||
EResult CScrollDetection::Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap) {
|
||||
if (pRefPixMap->pPixel[0] == NULL || pSrcPixMap->pPixel[0] == NULL ||
|
||||
pRefPixMap->sRect.iRectWidth != pSrcPixMap->sRect.iRectWidth || pRefPixMap->sRect.iRectHeight != pSrcPixMap->sRect.iRectHeight){
|
||||
return RET_INVALIDPARAM;
|
||||
pRefPixMap->sRect.iRectWidth != pSrcPixMap->sRect.iRectWidth
|
||||
|| pRefPixMap->sRect.iRectHeight != pSrcPixMap->sRect.iRectHeight) {
|
||||
return RET_INVALIDPARAM;
|
||||
}
|
||||
|
||||
if (!m_sScrollDetectionParam.bMaskInfoAvailable)
|
||||
ScrollDetectionWithoutMask(pSrcPixMap, pRefPixMap);
|
||||
ScrollDetectionWithoutMask (pSrcPixMap, pRefPixMap);
|
||||
else
|
||||
ScrollDetectionWithMask(pSrcPixMap, pRefPixMap);
|
||||
ScrollDetectionWithMask (pSrcPixMap, pRefPixMap);
|
||||
|
||||
return RET_SUCCESS;
|
||||
}
|
||||
|
||||
EResult CScrollDetection::Set(int32_t iType, void *pParam){
|
||||
if( pParam == NULL ){
|
||||
EResult CScrollDetection::Set (int32_t iType, void* pParam) {
|
||||
if (pParam == NULL) {
|
||||
return RET_INVALIDPARAM;
|
||||
}
|
||||
m_sScrollDetectionParam = *((SScrollDetectionParam*)pParam);
|
||||
m_sScrollDetectionParam = * ((SScrollDetectionParam*)pParam);
|
||||
return RET_SUCCESS;
|
||||
}
|
||||
|
||||
EResult CScrollDetection::Get(int32_t iType, void *pParam){
|
||||
if( pParam == NULL ){
|
||||
EResult CScrollDetection::Get (int32_t iType, void* pParam) {
|
||||
if (pParam == NULL) {
|
||||
return RET_INVALIDPARAM;
|
||||
}
|
||||
*((SScrollDetectionParam*)pParam) = m_sScrollDetectionParam;
|
||||
* ((SScrollDetectionParam*)pParam) = m_sScrollDetectionParam;
|
||||
return RET_SUCCESS;
|
||||
}
|
||||
|
||||
void CScrollDetection::ScrollDetectionWithMask(SPixMap* pSrcPixMap, SPixMap* pRefPixMap) {
|
||||
void CScrollDetection::ScrollDetectionWithMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap) {
|
||||
int32_t iStartX, iStartY, iWidth, iHeight;
|
||||
|
||||
iStartX = m_sScrollDetectionParam.sMaskRect.iRectLeft;
|
||||
@@ -76,39 +77,39 @@ void CScrollDetection::ScrollDetectionWithMask(SPixMap* pSrcPixMap, SPixMap* pRe
|
||||
iHeight = m_sScrollDetectionParam.sMaskRect.iRectHeight;
|
||||
|
||||
iWidth /= 2;
|
||||
iStartX += iWidth/2;
|
||||
iStartX += iWidth / 2;
|
||||
|
||||
m_sScrollDetectionParam.iScrollMvX = 0;
|
||||
m_sScrollDetectionParam.iScrollMvY = 0;
|
||||
m_sScrollDetectionParam.bScrollDetectFlag = false;
|
||||
|
||||
if(iStartX >= 0 && iWidth > MINIMUM_DETECT_WIDTH && iHeight > 2 * CHECK_OFFSET){
|
||||
ScrollDetectionCore(pSrcPixMap, pRefPixMap,iWidth, iHeight, iStartX, iStartY, m_sScrollDetectionParam);
|
||||
if (iStartX >= 0 && iWidth > MINIMUM_DETECT_WIDTH && iHeight > 2 * CHECK_OFFSET) {
|
||||
ScrollDetectionCore (pSrcPixMap, pRefPixMap, iWidth, iHeight, iStartX, iStartY, m_sScrollDetectionParam);
|
||||
}
|
||||
}
|
||||
|
||||
void CScrollDetection::ScrollDetectionWithoutMask(SPixMap* pSrcPixMap, SPixMap* pRefPixMap){
|
||||
void CScrollDetection::ScrollDetectionWithoutMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap) {
|
||||
int32_t iStartX, iStartY, iWidth, iHeight;
|
||||
|
||||
const int32_t kiPicBorderWidth= pSrcPixMap->sRect.iRectHeight>>4;
|
||||
const int32_t kiRegionWidth = (int) (pSrcPixMap->sRect.iRectWidth-(kiPicBorderWidth<<1))/3;
|
||||
const int32_t kiRegionHeight = (pSrcPixMap->sRect.iRectHeight*7)>>3;
|
||||
const int32_t kiHieghtStride = (int) pSrcPixMap->sRect.iRectHeight*5/24;
|
||||
const int32_t kiPicBorderWidth = pSrcPixMap->sRect.iRectHeight >> 4;
|
||||
const int32_t kiRegionWidth = (int) (pSrcPixMap->sRect.iRectWidth - (kiPicBorderWidth << 1)) / 3;
|
||||
const int32_t kiRegionHeight = (pSrcPixMap->sRect.iRectHeight * 7) >> 3;
|
||||
const int32_t kiHieghtStride = (int) pSrcPixMap->sRect.iRectHeight * 5 / 24;
|
||||
|
||||
for (int32_t i=0; i< REGION_NUMBER;i++){
|
||||
iStartX = kiPicBorderWidth+(i%3)*kiRegionWidth;
|
||||
iStartY = -pSrcPixMap->sRect.iRectHeight*7/48+ (int)(i/3)*(kiHieghtStride);
|
||||
for (int32_t i = 0; i < REGION_NUMBER; i++) {
|
||||
iStartX = kiPicBorderWidth + (i % 3) * kiRegionWidth;
|
||||
iStartY = -pSrcPixMap->sRect.iRectHeight * 7 / 48 + (int) (i / 3) * (kiHieghtStride);
|
||||
iWidth = kiRegionWidth;
|
||||
iHeight = kiRegionHeight;
|
||||
|
||||
iWidth /= 2;
|
||||
iStartX += iWidth/2;
|
||||
iStartX += iWidth / 2;
|
||||
|
||||
m_sScrollDetectionParam.iScrollMvX = 0;
|
||||
m_sScrollDetectionParam.iScrollMvY = 0;
|
||||
m_sScrollDetectionParam.bScrollDetectFlag = false;
|
||||
|
||||
ScrollDetectionCore(pSrcPixMap, pRefPixMap, iWidth, iHeight, iStartX, iStartY, m_sScrollDetectionParam);
|
||||
ScrollDetectionCore (pSrcPixMap, pRefPixMap, iWidth, iHeight, iStartX, iStartY, m_sScrollDetectionParam);
|
||||
|
||||
if (m_sScrollDetectionParam.bScrollDetectFlag && m_sScrollDetectionParam.iScrollMvY)
|
||||
break;
|
||||
|
||||
@@ -51,22 +51,22 @@ WELSVP_EXTERN_C_BEGIN
|
||||
WELSVP_EXTERN_C_END
|
||||
#endif
|
||||
|
||||
class CScrollDetection : public IStrategy{
|
||||
public:
|
||||
CScrollDetection(int32_t iCpuFlag){
|
||||
class CScrollDetection : public IStrategy {
|
||||
public:
|
||||
CScrollDetection (int32_t iCpuFlag) {
|
||||
m_eMethod = METHOD_SCROLL_DETECTION;
|
||||
WelsMemset (&m_sScrollDetectionParam, 0, sizeof (m_sScrollDetectionParam));
|
||||
};
|
||||
~CScrollDetection(){
|
||||
~CScrollDetection() {
|
||||
}
|
||||
EResult Process(int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
EResult Set(int32_t iType, void *pParam);
|
||||
EResult Get(int32_t iType, void *pParam);
|
||||
EResult Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
EResult Set (int32_t iType, void* pParam);
|
||||
EResult Get (int32_t iType, void* pParam);
|
||||
|
||||
private:
|
||||
void ScrollDetectionWithMask(SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
void ScrollDetectionWithoutMask(SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
private:
|
||||
private:
|
||||
void ScrollDetectionWithMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
void ScrollDetectionWithoutMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap);
|
||||
private:
|
||||
SScrollDetectionParam m_sScrollDetectionParam;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,23 +35,23 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
int32_t CheckLine(uint8_t* pData, int32_t iWidth){
|
||||
int32_t CheckLine (uint8_t* pData, int32_t iWidth) {
|
||||
int32_t iQualified = 0;
|
||||
int32_t iColorMap[8] = {0};
|
||||
int32_t iChangedTimes = 0;
|
||||
int32_t iColorCounts = 0;
|
||||
|
||||
RECORD_COLOR(pData[0], iColorMap);
|
||||
RECORD_COLOR (pData[0], iColorMap);
|
||||
|
||||
for (int32_t i=1; i<iWidth; i++){
|
||||
RECORD_COLOR(pData[i], iColorMap);
|
||||
iChangedTimes += (pData[i] != pData[i-1]);
|
||||
for (int32_t i = 1; i < iWidth; i++) {
|
||||
RECORD_COLOR (pData[i], iColorMap);
|
||||
iChangedTimes += (pData[i] != pData[i - 1]);
|
||||
}
|
||||
for (int32_t i=0; i<8; i++)
|
||||
for (int32_t j=0; j<32; j++)
|
||||
iColorCounts += ((iColorMap[i] >> j)&1);
|
||||
for (int32_t i = 0; i < 8; i++)
|
||||
for (int32_t j = 0; j < 32; j++)
|
||||
iColorCounts += ((iColorMap[i] >> j) & 1);
|
||||
|
||||
switch(iColorCounts){
|
||||
switch (iColorCounts) {
|
||||
case 1:
|
||||
iQualified = 0;
|
||||
break;
|
||||
@@ -66,24 +66,24 @@ int32_t CheckLine(uint8_t* pData, int32_t iWidth){
|
||||
return iQualified;
|
||||
}
|
||||
|
||||
int32_t SelectTestLine(uint8_t* pY, int32_t iWidth, int32_t iHeight, int32_t iPicHeight,
|
||||
int32_t iStride, int32_t iOffsetX, int32_t iOffsetY){
|
||||
int32_t SelectTestLine (uint8_t* pY, int32_t iWidth, int32_t iHeight, int32_t iPicHeight,
|
||||
int32_t iStride, int32_t iOffsetX, int32_t iOffsetY) {
|
||||
const int32_t kiHalfHeight = iHeight >> 1;
|
||||
const int32_t kiMidPos = iOffsetY + kiHalfHeight;
|
||||
int32_t TestPos = kiMidPos;
|
||||
int32_t iOffsetAbs;
|
||||
uint8_t* pTmp;
|
||||
|
||||
for (iOffsetAbs = 0; iOffsetAbs < kiHalfHeight; iOffsetAbs++){
|
||||
for (iOffsetAbs = 0; iOffsetAbs < kiHalfHeight; iOffsetAbs++) {
|
||||
TestPos = kiMidPos + iOffsetAbs;
|
||||
if (TestPos < iPicHeight){
|
||||
if (TestPos < iPicHeight) {
|
||||
pTmp = pY + TestPos * iStride + iOffsetX;
|
||||
if (CheckLine(pTmp, iWidth)) break;
|
||||
if (CheckLine (pTmp, iWidth)) break;
|
||||
}
|
||||
TestPos = kiMidPos - iOffsetAbs;
|
||||
if(TestPos >=0){
|
||||
if (TestPos >= 0) {
|
||||
pTmp = pY + TestPos * iStride + iOffsetX;
|
||||
if (CheckLine(pTmp, iWidth)) break;
|
||||
if (CheckLine (pTmp, iWidth)) break;
|
||||
}
|
||||
}
|
||||
if (iOffsetAbs == kiHalfHeight)
|
||||
@@ -95,27 +95,26 @@ int32_t SelectTestLine(uint8_t* pY, int32_t iWidth, int32_t iHeight, int32_t iPi
|
||||
* compare pixel line between previous and current one
|
||||
* return: 0 for totally equal, otherwise 1
|
||||
*/
|
||||
int32_t CompareLine(uint8_t *pYSrc, uint8_t *pYRef, const int32_t kiWidth)
|
||||
{
|
||||
int32_t CompareLine (uint8_t* pYSrc, uint8_t* pYRef, const int32_t kiWidth) {
|
||||
int32_t iCmp = 1;
|
||||
|
||||
if ( *((int32_t*)pYSrc) != *((int32_t*)pYRef)) return 1;
|
||||
if ( *((int32_t*)(pYSrc + 4)) != *((int32_t*)(pYRef + 4))) return 1;
|
||||
if ( *((int32_t*)(pYSrc + 8)) != *((int32_t*)(pYRef + 8))) return 1;
|
||||
if ( kiWidth > 12 )
|
||||
iCmp = WelsMemcmp(pYSrc+12, pYRef+12, kiWidth-12);
|
||||
if (* ((int32_t*)pYSrc) != * ((int32_t*)pYRef)) return 1;
|
||||
if (* ((int32_t*) (pYSrc + 4)) != * ((int32_t*) (pYRef + 4))) return 1;
|
||||
if (* ((int32_t*) (pYSrc + 8)) != * ((int32_t*) (pYRef + 8))) return 1;
|
||||
if (kiWidth > 12)
|
||||
iCmp = WelsMemcmp (pYSrc + 12, pYRef + 12, kiWidth - 12);
|
||||
return iCmp;
|
||||
}
|
||||
|
||||
void ScrollDetectionCore(SPixMap* pSrcPixMap, SPixMap* pRefPixMap, int32_t iWidth, int32_t iHeight,
|
||||
int32_t iOffsetX, int32_t iOffsetY, SScrollDetectionParam &sScrollDetectionParam){
|
||||
void ScrollDetectionCore (SPixMap* pSrcPixMap, SPixMap* pRefPixMap, int32_t iWidth, int32_t iHeight,
|
||||
int32_t iOffsetX, int32_t iOffsetY, SScrollDetectionParam& sScrollDetectionParam) {
|
||||
bool bScrollDetected = 0;
|
||||
uint8_t* pYLine;
|
||||
uint8_t* pYTmp;
|
||||
int32_t iTestPos, iSearchPos = 0, iOffsetAbs, iMaxAbs;
|
||||
int32_t iPicHeight = pRefPixMap->sRect.iRectHeight;
|
||||
int32_t iMinHeight = WELS_MAX(iOffsetY,0);
|
||||
int32_t iMaxHeight = WELS_MIN(iOffsetY + iHeight - 1, iPicHeight-1) ;//offset_y + height - 1;//
|
||||
int32_t iMinHeight = WELS_MAX (iOffsetY, 0);
|
||||
int32_t iMaxHeight = WELS_MIN (iOffsetY + iHeight - 1, iPicHeight - 1) ; //offset_y + height - 1;//
|
||||
uint8_t* pYRef, *pYSrc;
|
||||
int32_t iYStride;
|
||||
|
||||
@@ -123,76 +122,74 @@ void ScrollDetectionCore(SPixMap* pSrcPixMap, SPixMap* pRefPixMap, int32_t iWidt
|
||||
pYSrc = (uint8_t*)pSrcPixMap->pPixel[0];
|
||||
iYStride = pRefPixMap->iStride[0];
|
||||
|
||||
iTestPos = SelectTestLine(pYSrc, iWidth, iHeight, iPicHeight, iYStride, iOffsetX, iOffsetY);
|
||||
iTestPos = SelectTestLine (pYSrc, iWidth, iHeight, iPicHeight, iYStride, iOffsetX, iOffsetY);
|
||||
|
||||
if (iTestPos == -1){
|
||||
if (iTestPos == -1) {
|
||||
sScrollDetectionParam.bScrollDetectFlag = 0;
|
||||
return;
|
||||
}
|
||||
pYLine = pYSrc + iYStride * iTestPos + iOffsetX;
|
||||
iMaxAbs = WELS_MIN(WELS_MAX(iTestPos-iMinHeight-1, iMaxHeight-iTestPos),MAX_SCROLL_MV_Y);
|
||||
iMaxAbs = WELS_MIN (WELS_MAX (iTestPos - iMinHeight - 1, iMaxHeight - iTestPos), MAX_SCROLL_MV_Y);
|
||||
iSearchPos = iTestPos;
|
||||
for (iOffsetAbs = 0; iOffsetAbs <= iMaxAbs; iOffsetAbs++){
|
||||
for (iOffsetAbs = 0; iOffsetAbs <= iMaxAbs; iOffsetAbs++) {
|
||||
iSearchPos = iTestPos + iOffsetAbs;
|
||||
if (iSearchPos <= iMaxHeight){
|
||||
if (iSearchPos <= iMaxHeight) {
|
||||
pYTmp = pYRef + iSearchPos * iYStride + iOffsetX;
|
||||
if (!CompareLine(pYLine, pYTmp, iWidth)){
|
||||
uint8_t *pYUpper, *pYLineUpper;
|
||||
if (!CompareLine (pYLine, pYTmp, iWidth)) {
|
||||
uint8_t* pYUpper, *pYLineUpper;
|
||||
int32_t iCheckedLines;
|
||||
int32_t iLowOffset = WELS_MIN(iMaxHeight - iSearchPos, CHECK_OFFSET);
|
||||
int32_t iLowOffset = WELS_MIN (iMaxHeight - iSearchPos, CHECK_OFFSET);
|
||||
int32_t i;
|
||||
|
||||
iCheckedLines = WELS_MIN(iTestPos - iMinHeight + iLowOffset, 2 * CHECK_OFFSET);
|
||||
iCheckedLines = WELS_MIN (iTestPos - iMinHeight + iLowOffset, 2 * CHECK_OFFSET);
|
||||
pYUpper = pYTmp - (iCheckedLines - iLowOffset) * iYStride;
|
||||
pYLineUpper = pYLine - (iCheckedLines - iLowOffset) * iYStride;
|
||||
|
||||
for(i = 0; i < iCheckedLines; i ++){
|
||||
if (CompareLine(pYLineUpper, pYUpper, iWidth)){
|
||||
for (i = 0; i < iCheckedLines; i ++) {
|
||||
if (CompareLine (pYLineUpper, pYUpper, iWidth)) {
|
||||
break;
|
||||
}
|
||||
pYUpper += iYStride;
|
||||
pYLineUpper += iYStride;
|
||||
}
|
||||
if (i == iCheckedLines){
|
||||
bScrollDetected=1;
|
||||
if (i == iCheckedLines) {
|
||||
bScrollDetected = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
iSearchPos = iTestPos - iOffsetAbs-1;
|
||||
if (iSearchPos >= iMinHeight){
|
||||
iSearchPos = iTestPos - iOffsetAbs - 1;
|
||||
if (iSearchPos >= iMinHeight) {
|
||||
pYTmp = pYRef + iSearchPos * iYStride + iOffsetX;
|
||||
if (!CompareLine(pYLine, pYTmp, iWidth))
|
||||
{
|
||||
uint8_t *pYUpper, *pYLineUpper;
|
||||
if (!CompareLine (pYLine, pYTmp, iWidth)) {
|
||||
uint8_t* pYUpper, *pYLineUpper;
|
||||
int32_t iCheckedLines;
|
||||
int32_t iUpOffset = WELS_MIN(iSearchPos - iMinHeight, CHECK_OFFSET);
|
||||
int32_t iUpOffset = WELS_MIN (iSearchPos - iMinHeight, CHECK_OFFSET);
|
||||
int32_t i;
|
||||
|
||||
pYUpper = pYTmp - iUpOffset * iYStride;
|
||||
pYLineUpper = pYLine - iUpOffset * iYStride;
|
||||
iCheckedLines = WELS_MIN(iMaxHeight - iTestPos + iUpOffset, 2 * CHECK_OFFSET);
|
||||
iCheckedLines = WELS_MIN (iMaxHeight - iTestPos + iUpOffset, 2 * CHECK_OFFSET);
|
||||
|
||||
for(i = 0; i < iCheckedLines; i ++){
|
||||
if (CompareLine(pYLineUpper,pYUpper, iWidth)){
|
||||
for (i = 0; i < iCheckedLines; i ++) {
|
||||
if (CompareLine (pYLineUpper, pYUpper, iWidth)) {
|
||||
break;
|
||||
}
|
||||
pYUpper += iYStride;
|
||||
pYLineUpper += iYStride;
|
||||
}
|
||||
if (i == iCheckedLines){
|
||||
bScrollDetected=1;
|
||||
if (i == iCheckedLines) {
|
||||
bScrollDetected = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!bScrollDetected){
|
||||
if (!bScrollDetected) {
|
||||
sScrollDetectionParam.bScrollDetectFlag = 0;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
sScrollDetectionParam.bScrollDetectFlag = 1;
|
||||
sScrollDetectionParam.iScrollMvY = iSearchPos - iTestPos; // pre_pos - cur_pos, change to mv
|
||||
sScrollDetectionParam.iScrollMvX = 0;
|
||||
|
||||
@@ -51,11 +51,11 @@ WELSVP_NAMESPACE_BEGIN
|
||||
x[_t>>5] |= (1 << (_t&31)); \
|
||||
}
|
||||
|
||||
int32_t CheckLine(uint8_t* pData, int32_t iWidth);
|
||||
int32_t SelectTestLine(uint8_t* pY, int32_t iWidth, int32_t iHeight, int32_t iPicHeight,
|
||||
int32_t iStride, int32_t iOffsetX, int32_t iOffsetY);
|
||||
int32_t CompareLine(uint8_t *pYSrc, uint8_t *pYRef, const int32_t kiWidth);
|
||||
void ScrollDetectionCore(SPixMap* pSrcPixMap, SPixMap* pRefPixMap, int32_t iWidth, int32_t iHeight,
|
||||
int32_t iOffsetX, int32_t iOffsetY, SScrollDetectionParam &sScrollDetectionParam);
|
||||
int32_t CheckLine (uint8_t* pData, int32_t iWidth);
|
||||
int32_t SelectTestLine (uint8_t* pY, int32_t iWidth, int32_t iHeight, int32_t iPicHeight,
|
||||
int32_t iStride, int32_t iOffsetX, int32_t iOffsetY);
|
||||
int32_t CompareLine (uint8_t* pYSrc, uint8_t* pYRef, const int32_t kiWidth);
|
||||
void ScrollDetectionCore (SPixMap* pSrcPixMap, SPixMap* pRefPixMap, int32_t iWidth, int32_t iHeight,
|
||||
int32_t iOffsetX, int32_t iOffsetY, SScrollDetectionParam& sScrollDetectionParam);
|
||||
|
||||
WELSVP_NAMESPACE_END
|
||||
@@ -34,7 +34,8 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
void VAACalcSadSsd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadSsd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* psqsum16x16, int32_t* psqdiff16x16) {
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
@@ -145,7 +146,8 @@ void VAACalcSadSsd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t
|
||||
tmp_cur += step;
|
||||
}
|
||||
}
|
||||
void VAACalcSadVar_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadVar_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* psqsum16x16) {
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
@@ -249,7 +251,8 @@ void VAACalcSadVar_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t
|
||||
}
|
||||
|
||||
|
||||
void VAACalcSad_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSad_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8) {
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
@@ -480,7 +483,8 @@ void VAACalcSadSsdBgd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32
|
||||
}
|
||||
}
|
||||
|
||||
void VAACalcSadBgd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadBgd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSd8x8, uint8_t* pMad8x8) {
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
|
||||
@@ -72,7 +72,7 @@ void CVAACalculation::InitVaaFuncs (SVaaFuncs& sVaaFuncs, int32_t iCpuFlag) {
|
||||
sVaaFuncs.pfVAACalcSadSsd = VAACalcSadSsd_neon;
|
||||
sVaaFuncs.pfVAACalcSadSsdBgd = VAACalcSadSsdBgd_neon;
|
||||
sVaaFuncs.pfVAACalcSadVar = VAACalcSadVar_neon;
|
||||
}
|
||||
}
|
||||
#endif//HAVE_NEON
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +49,13 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
typedef void (VAACalcSadBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth,
|
||||
int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSd8x8, uint8_t* pMad8x8);
|
||||
|
||||
typedef void (VAACalcSadSsdBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadSsdBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth,
|
||||
int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16,
|
||||
int32_t* pSsd16x16, int32_t* pSd8x8, uint8_t* pMad8x8);
|
||||
@@ -62,11 +64,13 @@ typedef void (VAACalcSadFunc) (const uint8_t* pCurData, const uint8_t* pRefData,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8);
|
||||
|
||||
typedef void (VAACalcSadVarFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadVarFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth,
|
||||
int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16);
|
||||
|
||||
typedef void (VAACalcSadSsdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadSsdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth,
|
||||
int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16, int32_t* pSsd16x16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user