Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -3804,24 +3804,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3803 unmodified lines | ||
| 3804 | 3804 | else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) { |
| 3805 | 3805 | const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum; |
| 3806 | 3806 | |
| 3807 | −#if 0 //TODO: temporarily use this to keep old codes for a while, will remove old codes later | |
| 3808 | − int32_t iRet = 0; | |
| 3809 | − // to fire slice coding threads | |
| 3810 | − iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0], | |
| 3811 | − &pCtx->pSliceThreading->pReadySliceCodingEvent[0], | |
| 3812 | − &pCtx->pSliceThreading->pThreadMasterEvent[0], | |
| 3813 | − pFbi, kiPartitionCnt, &pCtx->pCurDqLayer->sSliceEncCtx, true); | |
| 3814 | − if (iRet) { | |
| 3815 | − WelsLog (pLogCtx, WELS_LOG_ERROR, | |
| 3816 | − "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!", | |
| 3817 | − iRet, iSliceCount, pParam->sSliceArgument.uiSliceMode, pSvcParam->iMultipleThreadIdc); | |
| 3818 | − return ENC_RETURN_UNEXPECTED; | |
| 3819 | − } | |
| 3820 | − | |
| 3821 | − WelsMultipleEventsWaitAllBlocking (kiPartitionCnt, &pCtx->pSliceThreading->pSliceCodedEvent[0], | |
| 3822 | − &pCtx->pSliceThreading->pSliceCodedMasterEvent); | |
| 3823 | − WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS) | |
| 3824 | −#else | |
| 3825 | 3807 | int32_t iEndMbIdx = pCtx->pCurDqLayer->sSliceEncCtx.iMbNumInFrame; |
| 3826 | 3808 | for (int32_t iIdx = kiPartitionCnt - 1; iIdx >= 0; --iIdx) { |
| 3827 | 3809 | const int32_t iFirstMbIdx = |
| @@ -3857,7 +3839,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 29 unmodified lines | ||
| 3857 | 3839 | pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError); |
| 3858 | 3840 | return pCtx->iEncoderError; |
| 3859 | 3841 | } |
| 3860 | −#endif | |
| 3861 | 3842 | |
| 3862 | 3843 | iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, kiPartitionCnt); |
| 3863 | 3844 | } else { // for non-dynamic-slicing mode single threading branch.. |