ref: 7ce4da8a4125e82126025603e02ab76d7aa7b0cf
parent: 9be23c7821d45b9e6a44d738d535ae5ff6d8e4f8
author: Martin Storsjö <martin@martin.st>
date: Wed Oct 29 18:45:44 EDT 2014
Use WelsLog instead of fprintf for normal runtime errors
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -51,7 +51,7 @@
//#define ENC_TRACE
typedef int32_t (*PWelsCodingSliceFunc) (sWelsEncCtx* pCtx, SSlice* pSlice);
-typedef void (*PWelsSliceHeaderWriteFunc) (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
+typedef void (*PWelsSliceHeaderWriteFunc) (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
int32_t* pPpsIdDelta);
void UpdateNonZeroCountCache (SMB* pMb, SMbCache* pMbCache) {
@@ -237,7 +237,7 @@
}
}
-void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
+void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
SSliceHeader* pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
@@ -291,7 +291,7 @@
BsWriteUE (pBs, 2);
break;
default :
- fprintf (stderr, "pData error for deblocking");
+ WelsLog(&pCtx->sLogCtx, WELS_LOG_ERROR, "pData error for deblocking");
break;
}
if (1 != pSliceHeader->uiDisableDeblockingFilterIdc) {
@@ -301,7 +301,7 @@
}
}
-void WelsSliceHeaderExtWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
+void WelsSliceHeaderExtWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
SSubsetSps* pSubSps = pCurLayer->sLayerInfo.pSubsetSpsP;
@@ -728,7 +728,7 @@
WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice);
- g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pBs, pCurLayer, pCurSlice,
+ g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pEncCtx, pBs, pCurLayer, pCurSlice,
& (pEncCtx->sPSOVector.sParaSetOffsetVariable[PARA_SET_TYPE_PPS].iParaSetIdDelta[0]));
#if _DEBUG
if (pEncCtx->sPSOVector.bEnableSpsPpsIdAddition) {