Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 6 files). Show all
Unified · Split
| @@ -594,6 +594,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 593 unmodified lines | ||
| 594 | 594 | const int32_t kiCurDid = pEncPEncCtx->uiDependencyId; |
| 595 | 595 | SWelsSvcCodingParam* pCodingParam = pEncPEncCtx->pSvcParam; |
| 596 | 596 | SSpatialLayerConfig* pParamD = &pCodingParam->sSpatialLayers[kiCurDid]; |
| 597 | + SSlice* pCurSlice = NULL; | |
| 597 | 598 | |
| 598 | 599 | pCurDq = pEncPEncCtx->pCurDqLayer; |
| 599 | 600 | eNalType = pEncPEncCtx->eNalType; |
| @@ -635,8 +636,9 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 35 unmodified lines | ||
| 635 | 636 | } |
| 636 | 637 | |
| 637 | 638 | WelsLoadNalForSlice (pSliceBs, eNalType, eNalRefIdc); |
| 638 | − | |
| 639 | − iReturn = WelsCodeOneSlice (pEncPEncCtx, iSliceIdx, eNalType); | |
| 639 | + pCurSlice = pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]; | |
| 640 | + assert (iSliceIdx == (int) pCurSlice->uiSliceIdx); | |
| 641 | + iReturn = WelsCodeOneSlice (pEncPEncCtx, pCurSlice, eNalType); | |
| 640 | 642 | if (ENC_RETURN_SUCCESS != iReturn) { |
| 641 | 643 | uiThrdRet = iReturn; |
| 642 | 644 | WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent, |
| @@ -735,8 +737,9 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 92 unmodified lines | ||
| 735 | 737 | |
| 736 | 738 | |
| 737 | 739 | WelsLoadNalForSlice (pSliceBs, eNalType, eNalRefIdc); |
| 738 | − | |
| 739 | − iReturn = WelsCodeOneSlice (pEncPEncCtx, iSliceIdx, eNalType); | |
| 740 | + pCurSlice = pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]; | |
| 741 | + assert (iSliceIdx == (int) pCurSlice->uiSliceIdx); | |
| 742 | + iReturn = WelsCodeOneSlice (pEncPEncCtx, pCurSlice, eNalType); | |
| 740 | 743 | if (ENC_RETURN_SUCCESS != iReturn) { |
| 741 | 744 | uiThrdRet = iReturn; |
| 742 | 745 | WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent, |