Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 8 files). Show all
Unified · Split
| @@ -81,10 +81,9 @@ void UpdateMbListNeighborParallel (SDqLayer* pCurDq, · 80 unmodified lines | |||
| 81 | SMB* pMbList, | 81 | SMB* pMbList, |
| 82 | const int32_t uiSliceIdc) { | 82 | const int32_t uiSliceIdc) { |
| 83 | SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx; | 83 | SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx; |
| 84 | SSlice* pUpdateSlice = pCurDq->ppSliceInLayer[uiSliceIdc]; | ||
| 85 | const int32_t kiMbWidth = pSliceCtx->iMbWidth; | 84 | const int32_t kiMbWidth = pSliceCtx->iMbWidth; |
| 86 | int32_t iIdx = pUpdateSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; | 85 | int32_t iIdx = pCurDq->pFirstMbIdxOfSlice[uiSliceIdc]; |
| 87 | const int32_t kiEndMbInSlice = iIdx + pUpdateSlice->iCountMbNumInSlice - 1; | 86 | const int32_t kiEndMbInSlice = iIdx + pCurDq->pCountMbNumInSlice[uiSliceIdc] - 1; |
| 88 | 87 | ||
| 89 | do { | 88 | do { |
| 90 | UpdateMbNeighbor (pCurDq, &pMbList[iIdx], kiMbWidth, uiSliceIdc); | 89 | UpdateMbNeighbor (pCurDq, &pMbList[iIdx], kiMbWidth, uiSliceIdc); |
| @@ -638,6 +637,15 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 547 unmodified lines | |||
| 638 | WelsLoadNalForSlice (pSliceBs, eNalType, eNalRefIdc); | 637 | WelsLoadNalForSlice (pSliceBs, eNalType, eNalRefIdc); |
| 639 | pCurSlice = pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]; | 638 | pCurSlice = pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]; |
| 640 | assert (iSliceIdx == (int) pCurSlice->uiSliceIdx); | 639 | assert (iSliceIdx == (int) pCurSlice->uiSliceIdx); |
| 640 | |||
| 641 | iReturn = SetSliceBoundaryInfo(pEncPEncCtx->pCurDqLayer, pCurSlice, iSliceIdx); | ||
| 642 | if (ENC_RETURN_SUCCESS != iReturn) { | ||
| 643 | uiThrdRet = iReturn; | ||
| 644 | WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent, | ||
| 645 | pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent, | ||
| 646 | iEventIdx); | ||
| 647 | } | ||
| 648 | |||
| 641 | iReturn = WelsCodeOneSlice (pEncPEncCtx, pCurSlice, eNalType); | 649 | iReturn = WelsCodeOneSlice (pEncPEncCtx, pCurSlice, eNalType); |
| 642 | if (ENC_RETURN_SUCCESS != iReturn) { | 650 | if (ENC_RETURN_SUCCESS != iReturn) { |
| 643 | uiThrdRet = iReturn; | 651 | uiThrdRet = iReturn; |