Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 8 files). Show all
Unified · Split
| @@ -65,7 +65,7 @@ · 64 unmodified lines | |||
| 65 | #include "wels_task_management.h" | 65 | #include "wels_task_management.h" |
| 66 | 66 | ||
| 67 | #if defined(ENABLE_TRACE_MT) | 67 | #if defined(ENABLE_TRACE_MT) |
| 68 | #define MT_TRACE_LOG(x, ...) WelsLog(x, __VA_ARGS__) | 68 | #define MT_TRACE_LOG(pLog, x, ...) WelsLog(pLog, x, __VA_ARGS__) |
| 69 | #else | 69 | #else |
| 70 | #define MT_TRACE_LOG(x, ...) | 70 | #define MT_TRACE_LOG(x, ...) |
| 71 | #endif | 71 | #endif |
| @@ -812,7 +812,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 740 unmodified lines | |||
| 812 | if (bDsaFlag) { | 812 | if (bDsaFlag) { |
| 813 | pEncPEncCtx->pSliceThreading->pSliceConsumeTime[pEncPEncCtx->uiDependencyId][iSliceIdx] = (uint32_t) ( | 813 | pEncPEncCtx->pSliceThreading->pSliceConsumeTime[pEncPEncCtx->uiDependencyId][iSliceIdx] = (uint32_t) ( |
| 814 | WelsTime() - iSliceStart); | 814 | WelsTime() - iSliceStart); |
| 815 | MT_TRACE_LOG (pEncPEncCtx, WELS_LOG_INFO, | 815 | MT_TRACE_LOG (&(pEncPEncCtx->sLogCtx), WELS_LOG_INFO, |
| 816 | "[MT] CodingSliceThreadProc(), coding_idx %d, uiSliceIdx %d, pSliceConsumeTime %d, iSliceSize %d, pFirstMbInSlice %d, count_num_mb_in_slice %d", | 816 | "[MT] CodingSliceThreadProc(), coding_idx %d, uiSliceIdx %d, pSliceConsumeTime %d, iSliceSize %d, pFirstMbInSlice %d, count_num_mb_in_slice %d", |
| 817 | pEncPEncCtx->iCodingIndex, iSliceIdx, | 817 | pEncPEncCtx->iCodingIndex, iSliceIdx, |
| 818 | pEncPEncCtx->pSliceThreading->pSliceConsumeTime[pEncPEncCtx->uiDependencyId][iSliceIdx], iSliceSize, | 818 | pEncPEncCtx->pSliceThreading->pSliceConsumeTime[pEncPEncCtx->uiDependencyId][iSliceIdx], iSliceSize, |
| @@ -1060,7 +1060,7 @@ int32_t AdjustBaseLayer (sWelsEncCtx* pCtx) { · 241 unmodified lines | |||
| 1060 | #endif//MT_DEBUG | 1060 | #endif//MT_DEBUG |
| 1061 | 1061 | ||
| 1062 | pCtx->pCurDqLayer = pCurDq; | 1062 | pCtx->pCurDqLayer = pCurDq; |
| 1063 | 1063 | memcpy((pCtx->pSliceThreading->pSliceConsumeTime[0]), (pCurDq->pSliceEncCtx->pSliceConsumeTime), pCurDq->pSliceEncCtx->iSliceNumInFrame*sizeof(uint32_t)); | |
| 1064 | // do not need adjust due to not different at both slices of consumed time | 1064 | // do not need adjust due to not different at both slices of consumed time |
| 1065 | iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[0], pCurDq->pSliceEncCtx->iSliceNumInFrame); | 1065 | iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[0], pCurDq->pSliceEncCtx->iSliceNumInFrame); |
| 1066 | if (iNeedAdj) | 1066 | if (iNeedAdj) |
| @@ -1092,6 +1092,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 25 unmodified lines | |||
| 1092 | && (pCtx->pSvcParam->sSpatialLayers[iCurDid - 1].sSliceArgument.uiSliceMode == SM_FIXEDSLCNUM_SLICE | 1092 | && (pCtx->pSvcParam->sSpatialLayers[iCurDid - 1].sSliceArgument.uiSliceMode == SM_FIXEDSLCNUM_SLICE |
| 1093 | && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid - | 1093 | && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid - |
| 1094 | 1].sSliceArgument.uiSliceNum); | 1094 | 1].sSliceArgument.uiSliceNum); |
| 1095 | memcpy((pCtx->pSliceThreading->pSliceConsumeTime[iCurDid]), (pCtx->pCurDqLayer->pSliceEncCtx->pSliceConsumeTime), pCtx->pCurDqLayer->pSliceEncCtx->iSliceNumInFrame*sizeof(uint32_t)); | ||
| 1095 | 1096 | ||
| 1096 | if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation | 1097 | if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation |
| 1097 | // do not need adjust due to not different at both slices of consumed time | 1098 | // do not need adjust due to not different at both slices of consumed time |