Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 8 files). Show all
Unified · Split
| @@ -127,7 +127,8 @@ void UpdateMbListNeighborParallel (SDqLayer* pCurDq, · 126 unmodified lines | ||
| 127 | 127 | } while (iIdx <= kiEndMbInSlice); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | −void CalcSliceComplexRatio (void* pRatio, SSliceCtx* pSliceCtx, uint32_t* pSliceConsume) { | |
| 130 | +void CalcSliceComplexRatio (void* pRatio, SDqLayer* pCurDq, uint32_t* pSliceConsume) { | |
| 131 | + SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx; | |
| 131 | 132 | int32_t* pRatioList = (int32_t*)pRatio; |
| 132 | 133 | int32_t iAvI[MAX_SLICES_NUM]; |
| 133 | 134 | int32_t iSumAv = 0; |
| @@ -279,7 +280,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 145 unmodified lines | ||
| 279 | 280 | iSliceIdx, pSliceComplexRatio[iSliceIdx] * 1.0f / INT_MULTIPLY, pSliceCtx->pCountMbNumInSlice[iSliceIdx], iMbNumLeft); |
| 280 | 281 | |
| 281 | 282 | |
| 282 | − if (DynamicAdjustSlicePEncCtxAll (pSliceCtx, iRunLen) == 0) { | |
| 283 | + if (DynamicAdjustSlicePEncCtxAll (pCurDqLayer, iRunLen) == 0) { | |
| 283 | 284 | const int32_t kiThreadNum = pCtx->pSvcParam->iCountThreadsNum; |
| 284 | 285 | int32_t iThreadIdx = 0; |
| 285 | 286 | do { |