Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -925,8 +925,8 @@ int32_t InitMbListD (sWelsEncCtx** ppCtx) { · 924 unmodified lines | ||
| 925 | 925 | void FreeSliceInLayer (SDqLayer* pDq, CMemoryAlign* pMa) { |
| 926 | 926 | int32_t iIdx = 0; |
| 927 | 927 | for (; iIdx < MAX_THREADS_NUM; iIdx ++) { |
| 928 | − FreeSliceBuffer (pDq->sSliceThreadInfo.pSliceInThread[iIdx], | |
| 929 | − pDq->sSliceThreadInfo.iMaxSliceNumInThread[iIdx], | |
| 928 | + FreeSliceBuffer (pDq->sSliceThreadInfo[iIdx].pSliceInThread, | |
| 929 | + pDq->sSliceThreadInfo[iIdx].iMaxSliceNum, | |
| 930 | 930 | pMa, "pSliceInThread"); |
| 931 | 931 | } |
| 932 | 932 | } |
| @@ -3646,8 +3646,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2713 unmodified lines | ||
| 3646 | 3646 | if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer |
| 3647 | 3647 | int32_t iSliceSize = 0; |
| 3648 | 3648 | int32_t iPayloadSize = 0; |
| 3649 | − uint32_t uiTheadIdx = 0; | |
| 3650 | − SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][0]; | |
| 3649 | + SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[0].pSliceInThread[0]; | |
| 3651 | 3650 | |
| 3652 | 3651 | if (pCtx->bNeedPrefixNalFlag) { |
| 3653 | 3652 | pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType, |
| @@ -3833,7 +3832,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 179 unmodified lines | ||
| 3833 | 3832 | |
| 3834 | 3833 | WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc); |
| 3835 | 3834 | |
| 3836 | − pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx]; | |
| 3835 | + pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iSliceIdx]; | |
| 3837 | 3836 | assert (iSliceIdx == pCurSlice->iSliceIdx); |
| 3838 | 3837 | pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx); |
| 3839 | 3838 | |
| @@ -4481,7 +4480,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 641 unmodified lines | ||
| 4481 | 4480 | |
| 4482 | 4481 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; |
| 4483 | 4482 | uint32_t uiTheadIdx = 0; |
| 4484 | − SSlice* pStartSlice = &pCurLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iStartSliceIdx]; | |
| 4483 | + SSlice* pStartSlice = &pCurLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iStartSliceIdx]; | |
| 4485 | 4484 | int32_t iNalIdxInLayer = *pNalIdxInLayer; |
| 4486 | 4485 | int32_t iSliceIdx = iStartSliceIdx; |
| 4487 | 4486 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; |
| @@ -4501,7 +4500,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 13 unmodified lines | ||
| 4501 | 4500 | int32_t iPayloadSize = 0; |
| 4502 | 4501 | SSlice* pCurSlice = NULL; |
| 4503 | 4502 | |
| 4504 | − if (iSliceIdx >= (pCurLayer->sSliceThreadInfo.iMaxSliceNumInThread[uiTheadIdx] - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | |
| 4503 | + if (iSliceIdx >= (pCurLayer->sSliceThreadInfo[uiTheadIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | |
| 4505 | 4504 | if (pCtx->iActiveThreadsNum == 1) { |
| 4506 | 4505 | //only single thread support re-alloc now |
| 4507 | 4506 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { |
| @@ -4525,7 +4524,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 17 unmodified lines | ||
| 4525 | 4524 | } |
| 4526 | 4525 | |
| 4527 | 4526 | WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc); |
| 4528 | − pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx]; | |
| 4527 | + pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iSliceIdx]; | |
| 4529 | 4528 | pCurSlice->iSliceIdx = iSliceIdx; |
| 4530 | 4529 | |
| 4531 | 4530 | iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType); |