Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 15 files). Show all
Unified · Split
| @@ -2930,6 +2930,10 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 2929 unmodified lines | ||
| 2930 | 2930 | } else { |
| 2931 | 2931 | pCurDq->bBaseLayerAvailableFlag = false; |
| 2932 | 2932 | } |
| 2933 | + | |
| 2934 | + if (pCtx->pTaskManage) { | |
| 2935 | + pCtx->pTaskManage->InitFrame(kiCurDid); | |
| 2936 | + } | |
| 2933 | 2937 | } |
| 2934 | 2938 | |
| 2935 | 2939 | static inline void SetFastCodingFunc (SWelsFuncPtrList* pFuncList) { |
| @@ -4013,7 +4017,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 1077 unmodified lines | ||
| 4013 | 4017 | iSliceCount); |
| 4014 | 4018 | return ENC_RETURN_UNEXPECTED; |
| 4015 | 4019 | } |
| 4016 | − | |
| 4020 | + if (SM_AUTO_SLICE == pParam->sSliceCfg.uiSliceMode) { | |
| 4017 | 4021 | if (pSvcParam->iCountThreadsNum >= iSliceCount) { //THREAD_FULLY_FIRE_MODE |
| 4018 | 4022 | #if defined(MT_DEBUG) |
| 4019 | 4023 | int64_t t_bs_append = 0; |
| @@ -4102,6 +4106,19 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 82 unmodified lines | ||
| 4102 | 4106 | // append exclusive slice 0 bs to pFrameBs |
| 4103 | 4107 | iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, iSliceCount); |
| 4104 | 4108 | } |
| 4109 | + | |
| 4110 | + } else { | |
| 4111 | + pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer; | |
| 4112 | + pLayerBsInfo->uiLayerType = VIDEO_CODING_LAYER; | |
| 4113 | + pLayerBsInfo->uiSpatialId = pCtx->uiDependencyId; | |
| 4114 | + pLayerBsInfo->uiTemporalId = pCtx->uiTemporalId; | |
| 4115 | + pLayerBsInfo->uiQualityId = 0; | |
| 4116 | + pLayerBsInfo->iNalCount = 0; | |
| 4117 | + pCtx->pSliceBs[0].pBs = pLayerBsInfo->pBsBuf; | |
| 4118 | + | |
| 4119 | + pCtx->pTaskManage->ExecuteTasks(); | |
| 4120 | + iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, iSliceCount); | |
| 4121 | + } | |
| 4105 | 4122 | } |
| 4106 | 4123 | // THREAD_FULLY_FIRE_MODE && SM_DYN_SLICE |
| 4107 | 4124 | else if ((SM_DYN_SLICE == pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) { |