Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 7 files). Show all
Unified · Split
| @@ -319,7 +319,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 318 unmodified lines | ||
| 319 | 319 | iIdx = 0; |
| 320 | 320 | while (iIdx < iNumSpatialLayers) { |
| 321 | 321 | 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) { | |
| 323 | 323 | bWillUseTaskManage = true; |
| 324 | 324 | } |
| 325 | 325 | ++ iIdx; |
| @@ -763,12 +763,15 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 437 unmodified lines | ||
| 763 | 763 | pCurDq->pLastMbIdxOfPartition[kiPartitionId] = kiEndMbInPartition - 1; |
| 764 | 764 | |
| 765 | 765 | pCurDq->pLastCodedMbIdxOfPartition[kiPartitionId] = 0; |
| 766 | − | |
| 767 | 766 | while (iAnyMbLeftInPartition > 0) { |
| 768 | 767 | if (iSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) { |
| 769 | 768 | // TODO: need exception handler for not large enough of MAX_SLICES_NUM related memory usage |
| 770 | 769 | // No idea about its solution due MAX_SLICES_NUM is fixed lenght in relevent pData structure |
| 771 | 770 | 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); | |
| 772 | 775 | WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent, |
| 773 | 776 | pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent, |
| 774 | 777 | iEventIdx); |
| @@ -810,6 +813,11 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 35 unmodified lines | ||
| 810 | 813 | iReturn = WriteSliceBs (pEncPEncCtx, pSliceBs, iSliceIdx, iSliceSize); |
| 811 | 814 | if (ENC_RETURN_SUCCESS != iReturn) { |
| 812 | 815 | 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 | + | |
| 813 | 821 | WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent, |
| 814 | 822 | pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent, |
| 815 | 823 | iEventIdx); |