Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all
Unified · Split
| @@ -3777,7 +3777,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3776 unmodified lines | |||
| 3777 | } else { // for non-dynamic-slicing mode single threading branch.. | 3777 | } else { // for non-dynamic-slicing mode single threading branch.. |
| 3778 | const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag; | 3778 | const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag; |
| 3779 | int32_t iSliceIdx = 0; | 3779 | int32_t iSliceIdx = 0; |
| 3780 | uint32_t uiTheadIdx = 0; | ||
| 3781 | SSlice* pCurSlice = NULL; | 3780 | SSlice* pCurSlice = NULL; |
| 3782 | 3781 | ||
| 3783 | iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer); | 3782 | iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer); |
| @@ -3795,7 +3794,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 11 unmodified lines | |||
| 3795 | 3794 | ||
| 3796 | WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc); | 3795 | WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc); |
| 3797 | 3796 | ||
| 3798 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; | 3797 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[0].pSliceBuffer[iSliceIdx]; |
| 3799 | assert (iSliceIdx == pCurSlice->iSliceIdx); | 3798 | assert (iSliceIdx == pCurSlice->iSliceIdx); |
| 3800 | pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx); | 3799 | pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx); |
| 3801 | 3800 | ||
| @@ -4442,8 +4441,8 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 640 unmodified lines | |||
| 4442 | ) { | 4441 | ) { |
| 4443 | 4442 | ||
| 4444 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; | 4443 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; |
| 4445 | uint32_t uiTheadIdx = 0; | 4444 | uint32_t uSlcBuffIdx = 0; |
| 4446 | SSlice* pStartSlice = &pCurLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iStartSliceIdx]; | 4445 | SSlice* pStartSlice = &pCurLayer->sSliceBufferInfo[uSlcBuffIdx].pSliceBuffer[iStartSliceIdx]; |
| 4447 | int32_t iNalIdxInLayer = *pNalIdxInLayer; | 4446 | int32_t iNalIdxInLayer = *pNalIdxInLayer; |
| 4448 | int32_t iSliceIdx = iStartSliceIdx; | 4447 | int32_t iSliceIdx = iStartSliceIdx; |
| 4449 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; | 4448 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; |
| @@ -4463,7 +4462,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 13 unmodified lines | |||
| 4463 | int32_t iPayloadSize = 0; | 4462 | int32_t iPayloadSize = 0; |
| 4464 | SSlice* pCurSlice = NULL; | 4463 | SSlice* pCurSlice = NULL; |
| 4465 | 4464 | ||
| 4466 | if (iSliceIdx >= (pCurLayer->sSliceBufferInfo[uiTheadIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | 4465 | if (iSliceIdx >= (pCurLayer->sSliceBufferInfo[uSlcBuffIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] |
| 4467 | if (pCtx->iActiveThreadsNum == 1) { | 4466 | if (pCtx->iActiveThreadsNum == 1) { |
| 4468 | //only single thread support re-alloc now | 4467 | //only single thread support re-alloc now |
| 4469 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { | 4468 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { |
| @@ -4487,7 +4486,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 17 unmodified lines | |||
| 4487 | } | 4486 | } |
| 4488 | 4487 | ||
| 4489 | WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc); | 4488 | WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc); |
| 4490 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uiTheadIdx].pSliceBuffer[iSliceIdx]; | 4489 | pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uSlcBuffIdx].pSliceBuffer[iSliceIdx]; |
| 4491 | pCurSlice->iSliceIdx = iSliceIdx; | 4490 | pCurSlice->iSliceIdx = iSliceIdx; |
| 4492 | 4491 | ||
| 4493 | iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType); | 4492 | iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType); |