History

Add tasks and thread pool call for SM_SIZELIMITED_SLICE mode

sijchen committed 10 years ago

Commit 76ca5641 parent 76b428a7 files · +165 −21Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 7 files). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+10−2
@@ -319,7 +319,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 318 unmodified lines
319319 iIdx = 0;
320320 while (iIdx < iNumSpatialLayers) {
321321 SSliceArgument* pSliceArgument = &pPara->sSpatialLayers[iIdx].sSliceArgument;
322− if (pSliceArgument->uiSliceMode == SM_FIXEDSLCNUM_SLICE || pSliceArgument->uiSliceMode == SM_RASTER_SLICE) {
322+ if (pSliceArgument->uiSliceMode == SM_FIXEDSLCNUM_SLICE || pSliceArgument->uiSliceMode == SM_RASTER_SLICE || pSliceArgument->uiSliceMode == SM_SIZELIMITED_SLICE) {
323323 bWillUseTaskManage = true;
324324 }
325325 ++ iIdx;
@@ -763,12 +763,15 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 437 unmodified lines
763763 pCurDq->pLastMbIdxOfPartition[kiPartitionId] = kiEndMbInPartition - 1;
764764
765765 pCurDq->pLastCodedMbIdxOfPartition[kiPartitionId] = 0;
766−
767766 while (iAnyMbLeftInPartition > 0) {
768767 if (iSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) {
769768 // TODO: need exception handler for not large enough of MAX_SLICES_NUM related memory usage
770769 // No idea about its solution due MAX_SLICES_NUM is fixed lenght in relevent pData structure
771770 uiThrdRet = 1;
771+ WelsLog (&pEncPEncCtx->sLogCtx, WELS_LOG_WARNING,
772+ "[MT] CodingSliceThreadProc Too many slices: coding_idx %d, iSliceIdx %d, pSliceCtx->iMaxSliceNumConstraint %d",
773+ pEncPEncCtx->iCodingIndex,
774+ iSliceIdx, pSliceCtx->iMaxSliceNumConstraint);
772775 WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent,
773776 pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent,
774777 iEventIdx);
@@ -810,6 +813,11 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 35 unmodified lines
810813 iReturn = WriteSliceBs (pEncPEncCtx, pSliceBs, iSliceIdx, iSliceSize);
811814 if (ENC_RETURN_SUCCESS != iReturn) {
812815 uiThrdRet = iReturn;
816+ WelsLog (&pEncPEncCtx->sLogCtx, WELS_LOG_WARNING,
817+ "[MT] CodingSliceThreadProc, WriteSliceBs not successful: coding_idx %d, iSliceIdx %d, BufferSize %d, m_iSliceSize %d, iPayloadSize %d",
818+ pEncPEncCtx->iCodingIndex,
819+ iSliceIdx, pSliceBs->uiSize, iSliceSize, pSliceBs->sNalList[0].iPayloadSize);
820+
813821 WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent,
814822 pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent,
815823 iEventIdx);

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