History

Use WelsLog instead of fprintf for normal runtime errors

Martin Storsjö committed 12 years ago

Commit 7ce4da81 parent 9be23c71 file · +5 −5Browse files

Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+5−5
@@ -51,7 +51,7 @@ namespace WelsEnc { · 50 unmodified lines
5151 //#define ENC_TRACE
5252
5353 typedef int32_t (*PWelsCodingSliceFunc) (sWelsEncCtx* pCtx, SSlice* pSlice);
54−typedef void (*PWelsSliceHeaderWriteFunc) (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
54+typedef void (*PWelsSliceHeaderWriteFunc) (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
5555 int32_t* pPpsIdDelta);
5656
5757 void UpdateNonZeroCountCache (SMB* pMb, SMbCache* pMbCache) {
@@ -237,7 +237,7 @@ void WriteRefPicMarking (SBitStringAux* pBs, SSliceHeader* pSliceHeader, SNalUni · 179 unmodified lines
237237 }
238238 }
239239
240−void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
240+void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
241241 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
242242 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
243243 SSliceHeader* pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
@@ -291,7 +291,7 @@ void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSli · 47 unmodified lines
291291 BsWriteUE (pBs, 2);
292292 break;
293293 default :
294− fprintf (stderr, "pData error for deblocking");
294+ WelsLog(&pCtx->sLogCtx, WELS_LOG_ERROR, "pData error for deblocking");
295295 break;
296296 }
297297 if (1 != pSliceHeader->uiDisableDeblockingFilterIdc) {
@@ -301,7 +301,7 @@ void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSli · 3 unmodified lines
301301 }
302302 }
303303
304−void WelsSliceHeaderExtWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
304+void WelsSliceHeaderExtWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
305305 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
306306 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
307307 SSubsetSps* pSubSps = pCurLayer->sLayerInfo.pSubsetSpsP;
@@ -728,7 +728,7 @@ int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx, const · 420 unmodified lines
728728 WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice);
729729
730730
731− g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pBs, pCurLayer, pCurSlice,
731+ g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pEncCtx, pBs, pCurLayer, pCurSlice,
732732 & (pEncCtx->sPSOVector.sParaSetOffsetVariable[PARA_SET_TYPE_PPS].iParaSetIdDelta[0]));
733733 #if _DEBUG
734734 if (pEncCtx->sPSOVector.bEnableSpsPpsIdAddition) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t