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
51//#define ENC_TRACE51//#define ENC_TRACE
52 52
53typedef int32_t (*PWelsCodingSliceFunc) (sWelsEncCtx* pCtx, SSlice* pSlice);53typedef int32_t (*PWelsCodingSliceFunc) (sWelsEncCtx* pCtx, SSlice* pSlice);
54typedef void (*PWelsSliceHeaderWriteFunc) (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,54typedef void (*PWelsSliceHeaderWriteFunc) (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
55 int32_t* pPpsIdDelta);55 int32_t* pPpsIdDelta);
56 56
57void UpdateNonZeroCountCache (SMB* pMb, SMbCache* pMbCache) {57void UpdateNonZeroCountCache (SMB* pMb, SMbCache* pMbCache) {
@@ -237,7 +237,7 @@ void WriteRefPicMarking (SBitStringAux* pBs, SSliceHeader* pSliceHeader, SNalUni · 179 unmodified lines
237 }237 }
238}238}
239 239
240void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {240void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
241 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;241 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
242 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;242 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
243 SSliceHeader* pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;243 SSliceHeader* pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
@@ -291,7 +291,7 @@ void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSli · 47 unmodified lines
291 BsWriteUE (pBs, 2);291 BsWriteUE (pBs, 2);
292 break;292 break;
293 default :293 default :
294 fprintf (stderr, "pData error for deblocking");294 WelsLog(&pCtx->sLogCtx, WELS_LOG_ERROR, "pData error for deblocking");
295 break;295 break;
296 }296 }
297 if (1 != pSliceHeader->uiDisableDeblockingFilterIdc) {297 if (1 != pSliceHeader->uiDisableDeblockingFilterIdc) {
@@ -301,7 +301,7 @@ void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSli · 3 unmodified lines
301 }301 }
302}302}
303 303
304void WelsSliceHeaderExtWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {304void WelsSliceHeaderExtWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, int32_t* pPpsIdDelta) {
305 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;305 SWelsSPS* pSps = pCurLayer->sLayerInfo.pSpsP;
306 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;306 SWelsPPS* pPps = pCurLayer->sLayerInfo.pPpsP;
307 SSubsetSps* pSubSps = pCurLayer->sLayerInfo.pSubsetSpsP;307 SSubsetSps* pSubSps = pCurLayer->sLayerInfo.pSubsetSpsP;
@@ -728,7 +728,7 @@ int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx, const · 420 unmodified lines
728 WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice);728 WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice);
729 729
730 730
731 g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pBs, pCurLayer, pCurSlice,731 g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pEncCtx, pBs, pCurLayer, pCurSlice,
732 & (pEncCtx->sPSOVector.sParaSetOffsetVariable[PARA_SET_TYPE_PPS].iParaSetIdDelta[0]));732 & (pEncCtx->sPSOVector.sParaSetOffsetVariable[PARA_SET_TYPE_PPS].iParaSetIdDelta[0]));
733#if _DEBUG733#if _DEBUG
734 if (pEncCtx->sPSOVector.bEnableSpsPpsIdAddition) {734 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