Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -764,7 +764,7 @@ static void InitMbInfo (sWelsEncCtx* pEnc, SMB* pList, SDqLayer* pLayer, con · 763 unmodified lines | ||
| 764 | 764 | int32_t iMbHeight = pLayer->iMbHeight; |
| 765 | 765 | int32_t iIdx; |
| 766 | 766 | int32_t iMbNum = iMbWidth * iMbHeight; |
| 767 | − SSliceCtx* pSliceCtx = pLayer->pSliceEncCtx; | |
| 767 | + SSliceCtx* pSliceCtx = &pLayer->sSliceEncCtx; | |
| 768 | 768 | uint32_t uiNeighborAvail; |
| 769 | 769 | const int32_t kiOffset = (kiDlayerId & 0x01) * kiMaxMbNum; |
| 770 | 770 | SMVUnitXY (*pLayerMvUnitBlock4x4)[MB_BLOCK4x4_NUM] = (SMVUnitXY (*)[MB_BLOCK4x4_NUM]) ( |
| @@ -1361,7 +1361,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 590 unmodified lines | ||
| 1361 | 1361 | |
| 1362 | 1362 | // Not using FMO in SVC coding so far, come back if need FMO |
| 1363 | 1363 | { |
| 1364 | − iResult = InitSlicePEncCtx (& (*ppCtx)->pSliceCtxList[iDlayerIndex], | |
| 1364 | + iResult = InitSlicePEncCtx (&(*ppCtx)->ppDqLayerList[iDlayerIndex]->sSliceEncCtx, | |
| 1365 | 1365 | (*ppCtx)->pMemAlign, |
| 1366 | 1366 | false, |
| 1367 | 1367 | pSps->iMbWidth, |
| @@ -1373,7 +1373,6 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 5 unmodified lines | ||
| 1373 | 1373 | FreeMemorySvc (ppCtx); |
| 1374 | 1374 | return iResult; |
| 1375 | 1375 | } |
| 1376 | − (*ppCtx)->ppDqLayerList[iDlayerIndex]->pSliceEncCtx = & (*ppCtx)->pSliceCtxList[iDlayerIndex]; | |
| 1377 | 1376 | } |
| 1378 | 1377 | pDqIdc->iSpsId = iSpsId; |
| 1379 | 1378 | pDqIdc->iPpsId = iPpsId; |
| @@ -1860,10 +1859,6 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 480 unmodified lines | ||
| 1860 | 1859 | (*ppCtx)->ppRefPicListExt = (SRefList**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SRefList*), "ppRefPicListExt"); |
| 1861 | 1860 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppRefPicListExt), FreeMemorySvc (ppCtx)) |
| 1862 | 1861 | |
| 1863 | − // pSlice context list | |
| 1864 | − (*ppCtx)->pSliceCtxList = (SSliceCtx*)pMa->WelsMallocz (kiNumDependencyLayers * sizeof (SSliceCtx), "pSliceCtxList"); | |
| 1865 | − WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceCtxList), FreeMemorySvc (ppCtx)) | |
| 1866 | − | |
| 1867 | 1862 | (*ppCtx)->ppDqLayerList = (SDqLayer**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SDqLayer*), "ppDqLayerList"); |
| 1868 | 1863 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppDqLayerList), FreeMemorySvc (ppCtx)) |
| 1869 | 1864 | |
| @@ -2096,8 +2091,8 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 226 unmodified lines | ||
| 2096 | 2091 | int32_t iSliceIdx = 0; |
| 2097 | 2092 | int32_t iSliceNum = GetInitialSliceNum (pDq->iMbWidth, pDq->iMbHeight, &pDlp->sSliceArgument); |
| 2098 | 2093 | if (pDlp->sSliceArgument.uiSliceMode == SM_SIZELIMITED_SLICE && pCtx->iActiveThreadsNum == 1) { |
| 2099 | − if (iSliceNum < pDq->pSliceEncCtx->iMaxSliceNumConstraint) { | |
| 2100 | − iSliceNum = pDq->pSliceEncCtx->iMaxSliceNumConstraint; | |
| 2094 | + if (iSliceNum < pDq->sSliceEncCtx.iMaxSliceNumConstraint) { | |
| 2095 | + iSliceNum = pDq->sSliceEncCtx.iMaxSliceNumConstraint; | |
| 2101 | 2096 | } |
| 2102 | 2097 | } |
| 2103 | 2098 | if (iSliceNum < 1) |
| @@ -2125,6 +2120,11 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 21 unmodified lines | ||
| 2125 | 2120 | pDq->pFeatureSearchPreparation = NULL; |
| 2126 | 2121 | } |
| 2127 | 2122 | |
| 2123 | + SSliceCtx* pSliceCtx = &pDq->sSliceEncCtx; | |
| 2124 | + if (NULL != pSliceCtx) { | |
| 2125 | + UninitSlicePEncCtx (pSliceCtx, pMa); | |
| 2126 | + } | |
| 2127 | + | |
| 2128 | 2128 | pMa->WelsFree (pDq, "pDq"); |
| 2129 | 2129 | pDq = NULL; |
| 2130 | 2130 | pCtx->ppDqLayerList[ilayer] = NULL; |
| @@ -2158,19 +2158,6 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 27 unmodified lines | ||
| 2158 | 2158 | pCtx->ppRefPicListExt = NULL; |
| 2159 | 2159 | } |
| 2160 | 2160 | |
| 2161 | − // pSlice context list | |
| 2162 | − if (NULL != pCtx->pSliceCtxList && pParam != NULL) { | |
| 2163 | − ilayer = 0; | |
| 2164 | − while (ilayer < pParam->iSpatialLayerNum) { | |
| 2165 | − SSliceCtx* pSliceCtx = &pCtx->pSliceCtxList[ilayer]; | |
| 2166 | − if (NULL != pSliceCtx) | |
| 2167 | − UninitSlicePEncCtx (pSliceCtx, pMa); | |
| 2168 | − ++ ilayer; | |
| 2169 | − } | |
| 2170 | − pMa->WelsFree (pCtx->pSliceCtxList, "pSliceCtxList"); | |
| 2171 | − pCtx->pSliceCtxList = NULL; | |
| 2172 | − } | |
| 2173 | − | |
| 2174 | 2161 | // VAA |
| 2175 | 2162 | if (NULL != pCtx->pVaa) { |
| 2176 | 2163 | if (pCtx->pSvcParam->bEnableAdaptiveQuant) { //free mem |
| @@ -2758,14 +2745,14 @@ int32_t PicPartitionNumDecision (sWelsEncCtx* pCtx) { · 581 unmodified lines | ||
| 2758 | 2745 | void WelsInitCurrentQBLayerMltslc (sWelsEncCtx* pCtx) { |
| 2759 | 2746 | //pData init |
| 2760 | 2747 | SDqLayer* pCurDq = pCtx->pCurDqLayer; |
| 2761 | − SSliceCtx* pSliceCtx = (pCurDq->pSliceEncCtx); | |
| 2748 | + SSliceCtx* pSliceCtx = &(pCurDq->sSliceEncCtx); | |
| 2762 | 2749 | |
| 2763 | 2750 | //mb_neighbor |
| 2764 | 2751 | DynslcUpdateMbNeighbourInfoListForAllSlices (pSliceCtx, pCurDq->sMbDataP); |
| 2765 | 2752 | } |
| 2766 | 2753 | |
| 2767 | 2754 | void UpdateSlicepEncCtxWithPartition (SDqLayer* pCurDq, int32_t iPartitionNum) { |
| 2768 | − SSliceCtx* pSliceCtx = pCurDq->pSliceEncCtx; | |
| 2755 | + SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx; | |
| 2769 | 2756 | const int32_t kiMbNumInFrame = pSliceCtx->iMbNumInFrame; |
| 2770 | 2757 | int32_t iCountMbNumPerPartition = kiMbNumInFrame; |
| 2771 | 2758 | int32_t iAssignableMbLeft = kiMbNumInFrame; |
| @@ -2799,7 +2786,7 @@ void UpdateSlicepEncCtxWithPartition (SDqLayer* pCurDq, int32_t iPartitionNum) { · 27 unmodified lines | ||
| 2799 | 2786 | |
| 2800 | 2787 | void WelsInitCurrentDlayerMltslc (sWelsEncCtx* pCtx, int32_t iPartitionNum) { |
| 2801 | 2788 | SDqLayer* pCurDq = pCtx->pCurDqLayer; |
| 2802 | − SSliceCtx* pSliceCtx = pCurDq->pSliceEncCtx; | |
| 2789 | + SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx; | |
| 2803 | 2790 | |
| 2804 | 2791 | UpdateSlicepEncCtxWithPartition (pCurDq, iPartitionNum); |
| 2805 | 2792 | |
| @@ -2877,7 +2864,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 71 unmodified lines | ||
| 2877 | 2864 | if (fDlp->sSliceArgument.uiSliceMode == SM_SIZELIMITED_SLICE) // need get extra slices for update |
| 2878 | 2865 | iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceArgument); |
| 2879 | 2866 | else |
| 2880 | − iSliceCount = GetCurrentSliceNum (pCurDq->pSliceEncCtx); | |
| 2867 | + iSliceCount = GetCurrentSliceNum (&pCurDq->sSliceEncCtx); | |
| 2881 | 2868 | assert (iSliceCount > 0); |
| 2882 | 2869 | |
| 2883 | 2870 | int32_t iCurPpsId = pDqIdc->iPpsId; |
| @@ -3140,7 +3127,7 @@ static inline void WelsSwapDqLayers (sWelsEncCtx* pCtx, const int32_t kiNextDqId · 256 unmodified lines | ||
| 3140 | 3127 | */ |
| 3141 | 3128 | static inline void PrefetchReferencePicture (sWelsEncCtx* pCtx, const EVideoFrameType keFrameType) { |
| 3142 | 3129 | SSlice* pSliceBase = &pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer[0]; |
| 3143 | − const int32_t kiSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx); | |
| 3130 | + const int32_t kiSliceCount = GetCurrentSliceNum (&pCtx->pCurDqLayer->sSliceEncCtx); | |
| 3144 | 3131 | int32_t iIdx = 0; |
| 3145 | 3132 | uint8_t uiRefIdx = -1; |
| 3146 | 3133 | |
| @@ -4019,7 +4006,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 872 unmodified lines | ||
| 4019 | 4006 | } |
| 4020 | 4007 | // for dynamic slicing single threading.. |
| 4021 | 4008 | else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc <= 1)) { |
| 4022 | − const int32_t kiLastMbInFrame = pCtx->pCurDqLayer->pSliceEncCtx->iMbNumInFrame; | |
| 4009 | + const int32_t kiLastMbInFrame = pCtx->pCurDqLayer->sSliceEncCtx.iMbNumInFrame; | |
| 4023 | 4010 | pCtx->iEncoderError = WelsCodeOnePicPartition (pCtx, pFbi, pLayerBsInfo, &iNalIdxInLayer, &iLayerSize, 0, |
| 4024 | 4011 | kiLastMbInFrame, 0); |
| 4025 | 4012 | WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS) |
| @@ -4028,7 +4015,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2 unmodified lines | ||
| 4028 | 4015 | int32_t iRet = 0; |
| 4029 | 4016 | // THREAD_FULLY_FIRE_MODE/THREAD_PICK_UP_MODE for any mode of non-SM_SIZELIMITED_SLICE |
| 4030 | 4017 | if ((SM_SIZELIMITED_SLICE != pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) { |
| 4031 | − iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx); | |
| 4018 | + iSliceCount = GetCurrentSliceNum (&pCtx->pCurDqLayer->sSliceEncCtx); | |
| 4032 | 4019 | if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed |
| 4033 | 4020 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 4034 | 4021 | "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d) at iDid= %d uiSliceMode= %d, iSliceCount= %d!", |
| @@ -4061,7 +4048,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 26 unmodified lines | ||
| 4061 | 4048 | iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0], |
| 4062 | 4049 | &pCtx->pSliceThreading->pReadySliceCodingEvent[0], |
| 4063 | 4050 | &pCtx->pSliceThreading->pThreadMasterEvent[0], |
| 4064 | − pFbi, kiPartitionCnt, pCtx->pCurDqLayer->pSliceEncCtx, true); | |
| 4051 | + pFbi, kiPartitionCnt, &pCtx->pCurDqLayer->sSliceEncCtx, true); | |
| 4065 | 4052 | if (iRet) { |
| 4066 | 4053 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 4067 | 4054 | "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!", |
| @@ -4078,7 +4065,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 10 unmodified lines | ||
| 4078 | 4065 | const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag; |
| 4079 | 4066 | int32_t iSliceIdx = 0; |
| 4080 | 4067 | |
| 4081 | − iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx); | |
| 4068 | + iSliceCount = GetCurrentSliceNum (&pCtx->pCurDqLayer->sSliceEncCtx); | |
| 4082 | 4069 | while (iSliceIdx < iSliceCount) { |
| 4083 | 4070 | int32_t iSliceSize = 0; |
| 4084 | 4071 | int32_t iPayloadSize = 0; |
| @@ -4314,7 +4301,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 229 unmodified lines | ||
| 4314 | 4301 | && pSvcParam->bUseLoadBalancing |
| 4315 | 4302 | && pSvcParam->iMultipleThreadIdc > 1 && |
| 4316 | 4303 | pSvcParam->iMultipleThreadIdc >= pParam->sSliceArgument.uiSliceNum) { |
| 4317 | − CalcSliceComplexRatio (pCtx->pSliceThreading->pSliceComplexRatio[iCurDid], pCtx->pCurDqLayer->pSliceEncCtx, | |
| 4304 | + CalcSliceComplexRatio (pCtx->pSliceThreading->pSliceComplexRatio[iCurDid], &pCtx->pCurDqLayer->sSliceEncCtx, | |
| 4318 | 4305 | pCtx->pSliceThreading->pSliceConsumeTime[iCurDid]); |
| 4319 | 4306 | #if defined(MT_DEBUG) |
| 4320 | 4307 | TrackSliceComplexities (pCtx, iCurDid); |
| @@ -4740,7 +4727,7 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 419 unmodified lines | ||
| 4740 | 4727 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; |
| 4741 | 4728 | |
| 4742 | 4729 | int32_t iCountNals = pCtx->pOut->iCountNals; |
| 4743 | − int32_t iMaxSliceNumOld = pCurLayer->pSliceEncCtx->iMaxSliceNumConstraint; | |
| 4730 | + int32_t iMaxSliceNumOld = pCurLayer->sSliceEncCtx.iMaxSliceNumConstraint; | |
| 4744 | 4731 | int32_t iMaxSliceNum = iMaxSliceNumOld; |
| 4745 | 4732 | iCountNals += iMaxSliceNum * (pCtx->pSvcParam->iSpatialLayerNum + pCtx->bNeedPrefixNalFlag); |
| 4746 | 4733 | iMaxSliceNum *= SLICE_NUM_EXPAND_COEF; |
| @@ -4820,9 +4807,9 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 73 unmodified lines | ||
| 4820 | 4807 | return ENC_RETURN_MEMALLOCERR; |
| 4821 | 4808 | } |
| 4822 | 4809 | memset (pFirstMbInSlice, 0, sizeof (int32_t) * iMaxSliceNum); |
| 4823 | − memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4824 | − pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice"); | |
| 4825 | − pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice; | |
| 4810 | + memcpy (pFirstMbInSlice, pCurLayer->sSliceEncCtx.pFirstMbInSlice, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4811 | + pMA->WelsFree (pCurLayer->sSliceEncCtx.pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice"); | |
| 4812 | + pCurLayer->sSliceEncCtx.pFirstMbInSlice = pFirstMbInSlice; | |
| 4826 | 4813 | |
| 4827 | 4814 | int32_t* pCountMbNumInSlice = (int32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int32_t), |
| 4828 | 4815 | "pSliceSeg->pCountMbNumInSlice"); |
| @@ -4831,14 +4818,14 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 2 unmodified lines | ||
| 4831 | 4818 | "CWelsH264SVCEncoder::DynSliceRealloc: realloc pCountMbNumInSlice not successful"); |
| 4832 | 4819 | return ENC_RETURN_MEMALLOCERR; |
| 4833 | 4820 | } |
| 4834 | − memcpy (pCountMbNumInSlice, pCurLayer->pSliceEncCtx->pCountMbNumInSlice, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4821 | + memcpy (pCountMbNumInSlice, pCurLayer->sSliceEncCtx.pCountMbNumInSlice, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4835 | 4822 | uiSliceIdx = iMaxSliceNumOld; |
| 4836 | 4823 | while (uiSliceIdx < iMaxSliceNum) { |
| 4837 | − pCountMbNumInSlice[uiSliceIdx] = pCurLayer->pSliceEncCtx->iMbNumInFrame; | |
| 4824 | + pCountMbNumInSlice[uiSliceIdx] = pCurLayer->sSliceEncCtx.iMbNumInFrame; | |
| 4838 | 4825 | uiSliceIdx++; |
| 4839 | 4826 | } |
| 4840 | − pMA->WelsFree (pCurLayer->pSliceEncCtx->pCountMbNumInSlice, "pSliceSeg->pCountMbNumInSlice"); | |
| 4841 | − pCurLayer->pSliceEncCtx->pCountMbNumInSlice = pCountMbNumInSlice; | |
| 4827 | + pMA->WelsFree (pCurLayer->sSliceEncCtx.pCountMbNumInSlice, "pSliceSeg->pCountMbNumInSlice"); | |
| 4828 | + pCurLayer->sSliceEncCtx.pCountMbNumInSlice = pCountMbNumInSlice; | |
| 4842 | 4829 | |
| 4843 | 4830 | uint32_t* pSliceConsumeTime = (uint32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (uint32_t), |
| 4844 | 4831 | "pSliceSeg->pSliceConsumeTime"); |
| @@ -4847,9 +4834,9 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 2 unmodified lines | ||
| 4847 | 4834 | "CWelsH264SVCEncoder::DynSliceRealloc: realloc pSliceConsumeTime not successful"); |
| 4848 | 4835 | return ENC_RETURN_MEMALLOCERR; |
| 4849 | 4836 | } |
| 4850 | − memcpy (pSliceConsumeTime, pCurLayer->pSliceEncCtx->pSliceConsumeTime, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4851 | − pMA->WelsFree (pCurLayer->pSliceEncCtx->pSliceConsumeTime, "pSliceSeg->pSliceConsumeTime"); | |
| 4852 | − pCurLayer->pSliceEncCtx->pSliceConsumeTime = pSliceConsumeTime; | |
| 4837 | + memcpy (pSliceConsumeTime, pCurLayer->sSliceEncCtx.pSliceConsumeTime, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4838 | + pMA->WelsFree (pCurLayer->sSliceEncCtx.pSliceConsumeTime, "pSliceSeg->pSliceConsumeTime"); | |
| 4839 | + pCurLayer->sSliceEncCtx.pSliceConsumeTime = pSliceConsumeTime; | |
| 4853 | 4840 | |
| 4854 | 4841 | //deal with rate control variables |
| 4855 | 4842 | const int32_t kiCurDid = pCtx->uiDependencyId; |
| @@ -4869,7 +4856,7 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 13 unmodified lines | ||
| 4869 | 4856 | pSORC->iCalculatedQpSlice = pCtx->iGlobalQp; |
| 4870 | 4857 | pSORC->iTotalQpSlice = 0; |
| 4871 | 4858 | pSORC->iTotalMbSlice = 0; |
| 4872 | − pSORC->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pCurLayer->pSliceEncCtx->pCountMbNumInSlice[uiSliceIdx], | |
| 4859 | + pSORC->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pCurLayer->sSliceEncCtx.pCountMbNumInSlice[uiSliceIdx], | |
| 4873 | 4860 | INT_MULTIPLY); |
| 4874 | 4861 | pSORC->iFrameBitsSlice = 0; |
| 4875 | 4862 | pSORC->iGomBitsSlice = 0; |
| @@ -4881,7 +4868,7 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 5 unmodified lines | ||
| 4881 | 4868 | |
| 4882 | 4869 | if (pCtx->iMaxSliceCount < iMaxSliceNum) |
| 4883 | 4870 | pCtx->iMaxSliceCount = iMaxSliceNum; |
| 4884 | − pCurLayer->pSliceEncCtx->iMaxSliceNumConstraint = iMaxSliceNum; | |
| 4871 | + pCurLayer->sSliceEncCtx.iMaxSliceNumConstraint = iMaxSliceNum; | |
| 4885 | 4872 | return ENC_RETURN_SUCCESS; |
| 4886 | 4873 | } |
| 4887 | 4874 | |
| @@ -4896,7 +4883,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 8 unmodified lines | ||
| 4896 | 4883 | ) { |
| 4897 | 4884 | |
| 4898 | 4885 | SDqLayer* pCurLayer = pCtx->pCurDqLayer; |
| 4899 | − SSliceCtx* pSliceCtx = pCurLayer->pSliceEncCtx; | |
| 4886 | + SSliceCtx* pSliceCtx = &pCurLayer->sSliceEncCtx; | |
| 4900 | 4887 | int32_t iNalIdxInLayer = *pNalIdxInLayer; |
| 4901 | 4888 | int32_t iSliceIdx = iStartSliceIdx; |
| 4902 | 4889 | const int32_t kiSliceStep = pCtx->iActiveThreadsNum; |