Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 5 files). Show all
Unified · Split
| @@ -923,8 +923,8 @@ int32_t InitMbListD (sWelsEncCtx** ppCtx) { · 922 unmodified lines | |||
| 923 | void FreeSliceInLayer (SDqLayer* pDq, CMemoryAlign* pMa) { | 923 | void FreeSliceInLayer (SDqLayer* pDq, CMemoryAlign* pMa) { |
| 924 | int32_t iIdx = 0; | 924 | int32_t iIdx = 0; |
| 925 | for (; iIdx < MAX_THREADS_NUM; iIdx ++) { | 925 | for (; iIdx < MAX_THREADS_NUM; iIdx ++) { |
| 926 | FreeSliceBuffer (pDq->sSliceThreadInfo[iIdx].pSliceBuffer, | 926 | FreeSliceBuffer (pDq->sSliceBufferInfo[iIdx].pSliceBuffer, |
| 927 | pDq->sSliceThreadInfo[iIdx].iMaxSliceNum, | 927 | pDq->sSliceBufferInfo[iIdx].iMaxSliceNum, |
| 928 | pMa, "pSliceBuffer"); | 928 | pMa, "pSliceBuffer"); |
| 929 | } | 929 | } |
| 930 | } | 930 | } |
| @@ -3643,7 +3643,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2712 unmodified lines | |||
| 3643 | if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer | 3643 | if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer |
| 3644 | int32_t iSliceSize = 0; | 3644 | int32_t iSliceSize = 0; |
| 3645 | int32_t iPayloadSize = 0; | 3645 | int32_t iPayloadSize = 0; |
| 3646 | SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[0].pSliceBuffer[0]; | 3646 | SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[0].pSliceBuffer[0]; |
| 3647 | 3647 | ||
| 3648 | if (pCtx->bNeedPrefixNalFlag) { | 3648 | if (pCtx->bNeedPrefixNalFlag) { |
| 3649 | pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType, | 3649 | pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType, |
| @@ -3795,7 +3795,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 145 unmodified lines | |||
| 3795 | 3795 | ||
| 3796 | WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc); | 3796 | WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc); |
| 3797 | 3797 | ||
| 3798 | pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; | 3798 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; |
| 3799 | assert (iSliceIdx == pCurSlice->iSliceIdx); | 3799 | assert (iSliceIdx == pCurSlice->iSliceIdx); |
| 3800 | pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx); | 3800 | pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx); |
| 3801 | 3801 | ||
| @@ -4443,7 +4443,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 641 unmodified lines | |||
| 4443 | 4443 | ||
| 4444 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; | 4444 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; |
| 4445 | uint32_t uiTheadIdx = 0; | 4445 | uint32_t uiTheadIdx = 0; |
| 4446 | SSlice* pStartSlice = &pCurLayer->sSliceThreadInfo[uiTheadIdx].pSliceBuffer[iStartSliceIdx]; | 4446 | SSlice* pStartSlice = &pCurLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iStartSliceIdx]; |
| 4447 | int32_t iNalIdxInLayer = *pNalIdxInLayer; | 4447 | int32_t iNalIdxInLayer = *pNalIdxInLayer; |
| 4448 | int32_t iSliceIdx = iStartSliceIdx; | 4448 | int32_t iSliceIdx = iStartSliceIdx; |
| 4449 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; | 4449 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; |
| @@ -4463,7 +4463,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 13 unmodified lines | |||
| 4463 | int32_t iPayloadSize = 0; | 4463 | int32_t iPayloadSize = 0; |
| 4464 | SSlice* pCurSlice = NULL; | 4464 | SSlice* pCurSlice = NULL; |
| 4465 | 4465 | ||
| 4466 | if (iSliceIdx >= (pCurLayer->sSliceThreadInfo[uiTheadIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | 4466 | if (iSliceIdx >= (pCurLayer->sSliceBufferInfo[uiTheadIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] |
| 4467 | if (pCtx->iActiveThreadsNum == 1) { | 4467 | if (pCtx->iActiveThreadsNum == 1) { |
| 4468 | //only single thread support re-alloc now | 4468 | //only single thread support re-alloc now |
| 4469 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { | 4469 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { |
| @@ -4487,7 +4487,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 17 unmodified lines | |||
| 4487 | } | 4487 | } |
| 4488 | 4488 | ||
| 4489 | WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc); | 4489 | WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc); |
| 4490 | pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; | 4490 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; |
| 4491 | pCurSlice->iSliceIdx = iSliceIdx; | 4491 | pCurSlice->iSliceIdx = iSliceIdx; |
| 4492 | 4492 | ||
| 4493 | iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType); | 4493 | iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType); |