shithub: openh264

Download patch

ref: 44dfad22171967267a6c9f541068e88b68c780a0
parent: d1341554ddb40de6b7a9893d9532ea64eb6ff56a
author: Martin Storsjö <martin@martin.st>
date: Fri Jan 24 09:47:15 EST 2014

Make the function signatures actually match when used as function pointer

Hiding the function signature mismatch with a cast can lead to
more concrete breakage being missed.

--- 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/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);
 }