ref: c335d1f1be6216a36903f93b0081d3901ea607af
parent: d821fbfd1c8fd5f0eae94a722e70e04a68e72324
parent: 44dfad22171967267a6c9f541068e88b68c780a0
author: Ethan Hugg <ethanhugg@gmail.com>
date: Fri Jan 24 05:42:01 EST 2014
Merge pull request #206 from mstorsjo/function-pointer-cleanup Avoid mismatches in function pointer assignments
--- a/codec/encoder/core/inc/svc_base_layer_md.h
+++ b/codec/encoder/core/inc/svc_base_layer_md.h
@@ -69,7 +69,7 @@
void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
//BOOL_T svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
-void WelsMdInterMb (void* pEncCtx, void* pWelsMd, SSlice* pSlice, SMB* pCurMb);
+void WelsMdInterMb (void* pEncCtx, void* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused);
//both used in BL and EL
//void wels_md_inter_init ( SWelsMD* pMd, const uint8_t ref_idx, const bool_t is_highest_dlayer_flag );
--- a/codec/encoder/core/inc/wels_func_ptr_def.h
+++ b/codec/encoder/core/inc/wels_func_ptr_def.h
@@ -64,7 +64,7 @@
typedef void (*PQuantizationFunc) (int16_t* pDct, const int16_t* pFF, const int16_t* pMF);
typedef void (*PQuantizationMaxFunc) (int16_t* pDct, const int16_t* pFF, const int16_t* pMF, int16_t* pMax);
typedef void (*PQuantizationDcFunc) (int16_t* pDct, int16_t iFF, int16_t iMF);
-typedef BOOL_T (*PQuantizationSkipFunc) (int16_t* pDct, int16_t iFF, int16_t iMF);
+typedef int32_t (*PQuantizationSkipFunc) (int16_t* pDct, int16_t iFF, int16_t iMF);
typedef int32_t (*PQuantizationHadamardFunc) (int16_t* pRes, const int16_t kiFF, int16_t iMF, int16_t* pDct,
int16_t* pBlock);
--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -150,11 +150,11 @@
void WelsInitBGDFunc (SWelsFuncPtrList* pFuncList, const bool_t kbEnableBackgroundDetection) {
if (kbEnableBackgroundDetection) {
- pFuncList->pfInterMdBackgroundDecision = (PInterMdBackgroundDecisionFunc)WelsMdInterJudgeBGDPskip;
- pFuncList->pfInterMdBackgroundInfoUpdate = (PInterMdBackgroundInfoUpdateFunc)WelsMdInterUpdateBGDInfo;
+ pFuncList->pfInterMdBackgroundDecision = WelsMdInterJudgeBGDPskip;
+ pFuncList->pfInterMdBackgroundInfoUpdate = WelsMdInterUpdateBGDInfo;
} else {
- pFuncList->pfInterMdBackgroundDecision = (PInterMdBackgroundDecisionFunc)WelsMdInterJudgeBGDPskipFalse;
- pFuncList->pfInterMdBackgroundInfoUpdate = (PInterMdBackgroundInfoUpdateFunc)WelsMdInterUpdateBGDInfoNULL;
+ pFuncList->pfInterMdBackgroundDecision = WelsMdInterJudgeBGDPskipFalse;
+ pFuncList->pfInterMdBackgroundInfoUpdate = WelsMdInterUpdateBGDInfoNULL;
}
}
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -1628,7 +1628,7 @@
return FALSE;
}
-void WelsMdInterMb (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb) {
+void WelsMdInterMb (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused) {
sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pEnc;
SWelsMD* pWelsMd = (SWelsMD*)pMd;
SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -647,10 +647,10 @@
//MD switch
if (kbBaseAvail && kbHighestSpatial) {
//initial pMd pointer
- pEncCtx->pFuncList->pfInterMd = (PInterMdFunc)WelsMdInterMbEnhancelayer;
+ pEncCtx->pFuncList->pfInterMd = WelsMdInterMbEnhancelayer;
} else {
//initial pMd pointer
- pEncCtx->pFuncList->pfInterMd = (PInterMdFunc)WelsMdInterMb;
+ pEncCtx->pFuncList->pfInterMd = WelsMdInterMb;
}
WelsPSliceMdEnc (pEncCtx, pSlice, kbHighestSpatial);
}
@@ -665,10 +665,10 @@
//MD switch
if (kbBaseAvail && kbHighestSpatial) {
//initial pMd pointer
- pEncCtx->pFuncList->pfInterMd = (PInterMdFunc)WelsMdInterMbEnhancelayer;
+ pEncCtx->pFuncList->pfInterMd = WelsMdInterMbEnhancelayer;
} else {
//initial pMd pointer
- pEncCtx->pFuncList->pfInterMd = (PInterMdFunc)WelsMdInterMb;
+ pEncCtx->pFuncList->pfInterMd = WelsMdInterMb;
}
WelsPSliceMdEncDynamic (pEncCtx, pSlice, kbHighestSpatial);
}