Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 11 files). Show all
Unified · Split
| @@ -94,7 +94,7 @@ void WelsSliceHeaderExtInit (sWelsEncCtx* pEncCtx, SDqLayer* pCurLayer, SSlice* · 93 unmodified lines | ||
| 94 | 94 | |
| 95 | 95 | pCurSliceExt->bStoreRefBasePicFlag = false; |
| 96 | 96 | |
| 97 | − pCurSliceHeader->iFirstMbInSlice = WelsGetFirstMbOfSlice (pCurLayer->sLayerInfo.pSliceInLayer, pSlice->uiSliceIdx); | |
| 97 | + pCurSliceHeader->iFirstMbInSlice = WelsGetFirstMbOfSlice (pCurLayer->ppSliceInLayer, pSlice->uiSliceIdx); | |
| 98 | 98 | |
| 99 | 99 | pCurSliceHeader->iFrameNum = pParamInternal->iFrameNum; |
| 100 | 100 | pCurSliceHeader->uiIdrPicId = pParamInternal->uiIdrPicId; |
| @@ -915,7 +915,7 @@ void FreeSliceBuffer (SSlice*& pSliceList, const int32_t kiMaxSliceNum, CMemoryA · 814 unmodified lines | ||
| 915 | 915 | int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx, const int32_t kiNalType) { |
| 916 | 916 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; |
| 917 | 917 | SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt; |
| 918 | − SSlice* pCurSlice = &pCurLayer->sLayerInfo.pSliceInLayer[kiSliceIdx]; | |
| 918 | + SSlice* pCurSlice = pCurLayer->ppSliceInLayer[kiSliceIdx]; | |
| 919 | 919 | SBitStringAux* pBs = pCurSlice->pSliceBsa; |
| 920 | 920 | const int32_t kiDynamicSliceFlag = |
| 921 | 921 | (pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId].sSliceArgument.uiSliceMode |
| @@ -974,7 +974,7 @@ void UpdateMbNeighbourInfoForNextSlice (SDqLayer* pCurDq, · 52 unmodified lines | ||
| 974 | 974 | void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSliceCtx, SMB* pCurMb, |
| 975 | 975 | int32_t iFirstMbIdxOfNextSlice, const int32_t kiLastMbIdxInPartition) { |
| 976 | 976 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; |
| 977 | − SSlice* pSliceInLayer = pCurLayer->sLayerInfo.pSliceInLayer; | |
| 977 | + SSlice** ppSliceInLayer = pCurLayer->ppSliceInLayer; | |
| 978 | 978 | int32_t iCurMbIdx = pCurMb->iMbXY; |
| 979 | 979 | uint16_t iCurSliceIdc = pSliceCtx->pOverallMbMap[ iCurMbIdx ]; |
| 980 | 980 | const int32_t kiSliceIdxStep = pEncCtx->iActiveThreadsNum; |
| @@ -987,7 +987,7 @@ void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSlic · 6 unmodified lines | ||
| 987 | 987 | pCurSlice->sSliceHeaderExt.uiNumMbsInSlice = 1 + iCurMbIdx - pCurSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; |
| 988 | 988 | |
| 989 | 989 | //pNextSlice pointer/initialization |
| 990 | − pNextSlice = & (pCurLayer->sLayerInfo.pSliceInLayer[ iNextSliceIdc ]); | |
| 990 | + pNextSlice = pCurLayer->ppSliceInLayer[ iNextSliceIdc ]; | |
| 991 | 991 | |
| 992 | 992 | #if _DEBUG |
| 993 | 993 | assert (NULL != pNextSlice); |
| @@ -999,7 +999,7 @@ void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSlic · 5 unmodified lines | ||
| 999 | 999 | (NAL_UNIT_CODED_SLICE_EXT == pCurLayer->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType); |
| 1000 | 1000 | memcpy (&pNextSlice->sSliceHeaderExt, &pCurSlice->sSliceHeaderExt, |
| 1001 | 1001 | sizeof (SSliceHeaderExt)); // confirmed_safe_unsafe_usage |
| 1002 | − pSliceInLayer[iNextSliceIdc].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = iFirstMbIdxOfNextSlice; | |
| 1002 | + ppSliceInLayer[iNextSliceIdc]->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = iFirstMbIdxOfNextSlice; | |
| 1003 | 1003 | WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdxOfNextSlice, iNextSliceIdc, |
| 1004 | 1004 | (kiLastMbIdxInPartition - iFirstMbIdxOfNextSlice + 1), sizeof (uint16_t)); |
| 1005 | 1005 | |