History

Multi-thread-fixed:RBC#1680:ppSliceInLayer instead of pSliceInLayer for all slice buffer management

huade committed 9 years ago

Commit 8ff579b1 parent 01e31ff11 files · +162 −153Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 11 files). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+45−41
@@ -81,7 +81,7 @@ void UpdateMbListNeighborParallel (SDqLayer* pCurDq, · 80 unmodified lines
8181 SMB* pMbList,
8282 const int32_t uiSliceIdc) {
8383 SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx;
84− SSlice* pUpdateSlice = &pCurDq->sLayerInfo.pSliceInLayer[uiSliceIdc];
84+ SSlice* pUpdateSlice = pCurDq->ppSliceInLayer[uiSliceIdc];
8585 const int32_t kiMbWidth = pSliceCtx->iMbWidth;
8686 int32_t iIdx = pUpdateSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
8787 const int32_t kiEndMbInSlice = iIdx + pUpdateSlice->iCountMbNumInSlice - 1;
@@ -94,7 +94,7 @@ void UpdateMbListNeighborParallel (SDqLayer* pCurDq, · 6 unmodified lines
9494
9595 void CalcSliceComplexRatio (SDqLayer* pCurDq) {
9696 SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx;
97− SSlice* pSliceInLayer = pCurDq->sLayerInfo.pSliceInLayer;
97+ SSlice** ppSliceInLayer = pCurDq->ppSliceInLayer;
9898 int32_t iSumAv = 0;
9999 const int32_t kiSliceCount = pSliceCtx->iSliceNumInFrame;
100100 int32_t iSliceIdx = 0;
@@ -103,23 +103,24 @@ void CalcSliceComplexRatio (SDqLayer* pCurDq) { · 2 unmodified lines
103103 WelsEmms();
104104
105105 while (iSliceIdx < kiSliceCount) {
106− iAvI[iSliceIdx] = WELS_DIV_ROUND (INT_MULTIPLY * pSliceInLayer[iSliceIdx].iCountMbNumInSlice,
107− pSliceInLayer[iSliceIdx].uiSliceConsumeTime);
106+ iAvI[iSliceIdx] = WELS_DIV_ROUND (INT_MULTIPLY * ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice,
107+ ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime);
108108 MT_TRACE_LOG (NULL, WELS_LOG_DEBUG, "[MT] CalcSliceComplexRatio(), uiSliceConsumeTime[%d]= %d us, slice_run= %d",
109109 iSliceIdx,
110− pSliceInLayer[iSliceIdx].uiSliceConsumeTime, pSliceInLayer[iSliceIdx].iCountMbNumInSlice);
110+ ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime, ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice);
111111 iSumAv += iAvI[iSliceIdx];
112112
113113 ++ iSliceIdx;
114114 }
115115 while (-- iSliceIdx >= 0) {
116− pSliceInLayer[iSliceIdx].iSliceComplexRatio = WELS_DIV_ROUND (INT_MULTIPLY * iAvI[iSliceIdx], iSumAv);
116+ ppSliceInLayer[iSliceIdx]->iSliceComplexRatio = WELS_DIV_ROUND (INT_MULTIPLY * iAvI[iSliceIdx], iSumAv);
117117 }
118118 }
119119
120−int32_t NeedDynamicAdjust (SSlice* pSliceInLayer, const int32_t iSliceNum) {
121− if (NULL == pSliceInLayer)
120+int32_t NeedDynamicAdjust (SSlice** ppSliceInLayer, const int32_t iSliceNum) {
121+ if ( NULL == ppSliceInLayer ) {
122122 return false;
123+ }
123124
124125 uint32_t uiTotalConsume = 0;
125126 int32_t iSliceIdx = 0;
@@ -128,7 +129,10 @@ int32_t NeedDynamicAdjust (SSlice* pSliceInLayer, const int32_t iSliceNum) { · 2 unmodified lines
128129 WelsEmms();
129130
130131 while (iSliceIdx < iSliceNum) {
131− uiTotalConsume += pSliceInLayer[iSliceIdx].uiSliceConsumeTime;
132+ if ( NULL == ppSliceInLayer[iSliceIdx] ) {
133+ return false;
134+ }
135+ uiTotalConsume += ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime;
132136 iSliceIdx ++;
133137 }
134138 if (uiTotalConsume == 0) {
@@ -143,7 +147,7 @@ int32_t NeedDynamicAdjust (SSlice* pSliceInLayer, const int32_t iSliceNum) { · 8 unmodified lines
143147 float fRmse = .0f; // root mean square error of pSlice consume ratios
144148 const float kfMeanRatio = 1.0f / iSliceNum;
145149 do {
146− const float fRatio = 1.0f * pSliceInLayer[iSliceIdx].uiSliceConsumeTime / uiTotalConsume;
150+ const float fRatio = 1.0f * ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime / uiTotalConsume;
147151 const float fDiffRatio = fRatio - kfMeanRatio;
148152 fRmse += (fDiffRatio * fDiffRatio);
149153 ++ iSliceIdx;
@@ -170,7 +174,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 20 unmodified lines
170174 SDqLayer* pCurDqLayer,
171175 int32_t iCurDid) {
172176 SSliceCtx* pSliceCtx = &pCurDqLayer->sSliceEncCtx;
173− SSlice* pSliceInLayer = pCurDqLayer->sLayerInfo.pSliceInLayer;
177+ SSlice** ppSliceInLayer = pCurDqLayer->ppSliceInLayer;
174178 const int32_t kiCountSliceNum = pSliceCtx->iSliceNumInFrame;
175179 const int32_t kiCountNumMb = pSliceCtx->iMbNumInFrame;
176180 int32_t iMinimalMbNum =
@@ -212,7 +216,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 35 unmodified lines
212216
213217 iSliceIdx = 0;
214218 while (iSliceIdx + 1 < kiCountSliceNum) {
215− int32_t iNumMbAssigning = WELS_DIV_ROUND (kiCountNumMb * pSliceInLayer[iSliceIdx].iSliceComplexRatio, INT_MULTIPLY);
219+ int32_t iNumMbAssigning = WELS_DIV_ROUND (kiCountNumMb * ppSliceInLayer[iSliceIdx]->iSliceComplexRatio, INT_MULTIPLY);
216220
217221 // GOM boundary aligned
218222 if (pCtx->pSvcParam->iRCMode != RC_OFF_MODE) {
@@ -235,8 +239,8 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 16 unmodified lines
235239 iRunLen[iSliceIdx] = iNumMbAssigning;
236240 MT_TRACE_LOG (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
237241 "[MT] DynamicAdjustSlicing(), uiSliceIdx= %d, iSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",
238− iSliceIdx, pSliceInLayer[iSliceIdx].iSliceComplexRatio * 1.0f / INT_MULTIPLY,
239− pSliceInLayer[iSliceIdx].iCountMbNumInSlice,
242+ iSliceIdx, ppSliceInLayer[iSliceIdx]->iSliceComplexRatio * 1.0f / INT_MULTIPLY,
243+ ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice,
240244 iNumMbAssigning);
241245 ++ iSliceIdx;
242246 iMaximalMbNum = iMbNumLeft - (kiCountSliceNum - iSliceIdx - 1) * iMinimalMbNum; // get maximal num_mb in left parts
@@ -244,9 +248,8 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 1 unmodified line
244248 iRunLen[iSliceIdx] = iMbNumLeft;
245249 MT_TRACE_LOG (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
246250 "[MT] DynamicAdjustSlicing(), iSliceIdx= %d, pSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",
247− iSliceIdx, pSliceInLayer[iSliceIdx].iSliceComplexRatio * 1.0f / INT_MULTIPLY,
248− pSliceInLayer[iSliceIdx].iCountMbNumInSlice, iMbNumLeft);
249−
251+ iSliceIdx, ppSliceInLayer[iSliceIdx]->iSliceComplexRatio * 1.0f / INT_MULTIPLY,
252+ ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice, iMbNumLeft);
250253 pCurDqLayer->bNeedAdjustingSlicing = !DynamicAdjustSlicePEncCtxAll (pCurDqLayer, iRunLen);
251254 }
252255
@@ -438,7 +441,7 @@ void ReleaseMtResource (sWelsEncCtx** ppCtx) { · 185 unmodified lines
438441 int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32_t iSliceCount) {
439442 SWelsSvcCodingParam* pCodingParam = pCtx->pSvcParam;
440443 SSpatialLayerConfig* pDlp = &pCodingParam->sSpatialLayers[pCtx->uiDependencyId];
441− SSlice* pSliceInlayer = pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer;
444+ SSlice** ppSliceInlayer = pCtx->pCurDqLayer->ppSliceInLayer;
442445 SWelsSliceBs* pSliceBs = NULL;
443446 const bool kbIsDynamicSlicingMode = (pDlp->sSliceArgument.uiSliceMode == SM_SIZELIMITED_SLICE);
444447
@@ -449,7 +452,7 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 4 unmodified lines
449452 if (!kbIsDynamicSlicingMode) {
450453 iNalIdxBase = pLbi->iNalCount = 0;
451454 while (iSliceIdx < iSliceCount) {
452− pSliceBs = &pSliceInlayer[iSliceIdx].sSliceBs;
455+ pSliceBs = &ppSliceInlayer[iSliceIdx]->sSliceBs;
453456 if (pSliceBs != NULL && pSliceBs->uiBsPos > 0) {
454457 int32_t iNalIdx = 0;
455458 const int32_t iCountNal = pSliceBs->iNalIndex;
@@ -484,7 +487,7 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 28 unmodified lines
484487
485488 iSliceIdx = iPartitionIdx;
486489 while (iIdx < kiCountSlicesCoded) {
487− pSliceBs = &pSliceInlayer[iSliceIdx].sSliceBs;
490+ pSliceBs = &ppSliceInlayer[iSliceIdx]->sSliceBs;
488491 if (pSliceBs != NULL && pSliceBs->uiBsPos > 0) {
489492 memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
490493 pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
@@ -600,7 +603,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 109 unmodified lines
600603 int64_t iSliceStart = 0;
601604 bool bDsaFlag = false;
602605 iSliceIdx = pPrivateData->iSliceIndex;
603− pSlice = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx];
606+ pSlice = pCurDq->ppSliceInLayer[iSliceIdx];
604607 pSliceBs = &pSlice->sSliceBs;
605608
606609 bDsaFlag = ((pParamD->sSliceArgument.uiSliceMode == SM_FIXEDSLCNUM_SLICE) &&
@@ -653,14 +656,14 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 46 unmodified lines
653656 pEncPEncCtx->pFuncList->pfDeblocking.pfDeblockingFilterSlice (pCurDq, pEncPEncCtx->pFuncList, iSliceIdx);
654657
655658 if (bDsaFlag) {
656− pEncPEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer[iSliceIdx].uiSliceConsumeTime = (uint32_t) (
659+ pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime = (uint32_t) (
657660 WelsTime() - iSliceStart);
658661 MT_TRACE_LOG (& (pEncPEncCtx->sLogCtx), WELS_LOG_INFO,
659662 "[MT] CodingSliceThreadProc(), coding_idx %d, uiSliceIdx %d, uiSliceConsumeTime %d, iSliceSize %d, iFirstMbInSlice %d, count_num_mb_in_slice %d",
660663 pEncPEncCtx->iCodingIndex, iSliceIdx,
661− pEncPEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer[iSliceIdx].uiSliceConsumeTime, iSliceSize,
662− pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice,
663− pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].iCountMbNumInSlice);
664+ pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]->uiSliceConsumeTime, iSliceSize,
665+ pCurDq->ppSliceInLayer[iSliceIdx]->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice,
666+ pCurDq->ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice);
664667 }
665668
666669 #if defined(SLICE_INFO_OUTPUT)
@@ -690,7 +693,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 23 unmodified lines
690693 int32_t iAnyMbLeftInPartition = kiEndMbInPartition - kiFirstMbInPartition;
691694 SSpatialLayerInternal* pParamInternal = &pCodingParam->sDependencyLayers[kiCurDid];
692695 iSliceIdx = pPrivateData->iSliceIndex;
693− SSliceHeaderExt* pStartSliceHeaderExt = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceHeaderExt;
696+ SSliceHeaderExt* pStartSliceHeaderExt = &pCurDq->ppSliceInLayer[iSliceIdx]->sSliceHeaderExt;
694697 pStartSliceHeaderExt->sSliceHeader.iFirstMbInSlice = kiFirstMbInPartition;
695698 pCurDq->pNumSliceCodedOfPartition[kiPartitionId] =
696699 1; // one pSlice per partition intialized, dynamic slicing inside
@@ -712,7 +715,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 15 unmodified lines
712715 }
713716
714717 SetOneSliceBsBufferUnderMultithread (pEncPEncCtx, kiPartitionId, iSliceIdx);
715− pSlice = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx];
718+ pSlice = pCurDq->ppSliceInLayer[iSliceIdx];
716719 pSliceBs = &pSlice->sSliceBs;
717720
718721 pSliceBs->uiBsPos = 0;
@@ -772,7 +775,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 53 unmodified lines
772775 MT_TRACE_LOG (& (pEncPEncCtx->sLogCtx), WELS_LOG_INFO,
773776 "[MT] CodingSliceThreadProc(), coding_idx %d, iPartitionId %d, uiSliceIdx %d, iSliceSize %d, count_mb_slice %d, iEndMbInPartition %d, pCurDq->pLastCodedMbIdxOfPartition[%d] %d\n",
774777 pEncPEncCtx->iCodingIndex, kiPartitionId, iSliceIdx, iSliceSize,
775− pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].iCountMbNumInSlice,
778+ pCurDq->ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice,
776779 kiEndMbInPartition, kiPartitionId, pCurDq->pLastCodedMbIdxOfPartition[kiPartitionId]);
777780
778781 iAnyMbLeftInPartition = kiEndMbInPartition - (1 + pCurDq->pLastCodedMbIdxOfPartition[kiPartitionId]);
@@ -840,7 +843,7 @@ int32_t FiredSliceThreads (sWelsEncCtx* pCtx, SSliceThreadPrivateData* pPriData, · 61 unmodified lines
840843 const int32_t kiEventCnt = uiNumThreads;
841844 int32_t iLayerBsIdx = pCtx->pOut->iLayerBsIndex;
842845 SLayerBSInfo* pLbi = &pFrameBsInfo->sLayerInfo[iLayerBsIdx];
843− SSlice* pSliceInLayer = pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer;
846+ SSlice** ppSliceInLayer = pCtx->pCurDqLayer->ppSliceInLayer;
844847
845848
846849 if (pPriData == NULL || pFrameBsInfo == NULL || pLbi == NULL || kiEventCnt <= 0 || pEventsList == NULL) {
@@ -854,7 +857,7 @@ int32_t FiredSliceThreads (sWelsEncCtx* pCtx, SSliceThreadPrivateData* pPriData, · 7 unmodified lines
854857 if (bIsDynamicSlicingMode) {
855858 iEndMbIdx = pSliceCtx->iMbNumInFrame;
856859 for (iIdx = kiEventCnt - 1; iIdx >= 0; --iIdx) {
857− const int32_t iFirstMbIdx = pSliceInLayer[iIdx].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
860+ const int32_t iFirstMbIdx = ppSliceInLayer[iIdx]->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
858861 pPriData[iIdx].iStartMbIndex = iFirstMbIdx;
859862 pPriData[iIdx].iEndMbIndex = iEndMbIdx;
860863 iEndMbIdx = iFirstMbIdx;
@@ -897,7 +900,8 @@ int32_t AdjustBaseLayer (sWelsEncCtx* pCtx) { · 36 unmodified lines
897900 pCtx->pCurDqLayer = pCurDq;
898901
899902 // do not need adjust due to not different at both slices of consumed time
900− iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[0]->sLayerInfo.pSliceInLayer, pCurDq->sSliceEncCtx.iSliceNumInFrame);
903+ iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[0]->ppSliceInLayer
904+ , pCurDq->sSliceEncCtx.iSliceNumInFrame);
901905 if (iNeedAdj)
902906 DynamicAdjustSlicing (pCtx,
903907 pCurDq,
@@ -929,7 +933,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 25 unmodified lines
929933
930934 if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
931935 // do not need adjust due to not different at both slices of consumed time
932− iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[iCurDid - 1]->sLayerInfo.pSliceInLayer,
936+ iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[iCurDid - 1]->ppSliceInLayer,
933937 pCtx->pCurDqLayer->sSliceEncCtx.iSliceNumInFrame);
934938 if (iNeedAdj)
935939 DynamicAdjustSlicing (pCtx,
@@ -938,7 +942,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 2 unmodified lines
938942 );
939943 } else { // use temporal layer for complexity estimation
940944 // do not need adjust due to not different at both slices of consumed time
941− iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[iCurDid]->sLayerInfo.pSliceInLayer,
945+ iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[iCurDid]->ppSliceInLayer,
942946 pCtx->pCurDqLayer->sSliceEncCtx.iSliceNumInFrame);
943947 if (iNeedAdj)
944948 DynamicAdjustSlicing (pCtx,
@@ -964,12 +968,12 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 19 unmodified lines
964968 #if defined(MT_DEBUG)
965969 void TrackSliceComplexities (sWelsEncCtx* pCtx, const int32_t iCurDid) {
966970 const int32_t kiCountSliceNum = pCtx->pCurDqLayer->sSliceEncCtx.iSliceNumInFrame;
967− SSlice* pSliceInLayer = pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer;
971+ SSlice** ppSliceInLayer = pCtx->pCurDqLayer->ppSliceInLayer;
968972 if (kiCountSliceNum > 0) {
969973 int32_t iSliceIdx = 0;
970974 do {
971975 fprintf (pCtx->pSliceThreading->pFSliceDiff, "%6.3f complexity pRatio at iDid %d pSlice %d\n",
972− pSliceInLayer[iSliceIdx].iSliceComplexRatio, iCurDid, iSliceIdx);
976+ ppSliceInLayer[iSliceIdx]->iSliceComplexRatio, iCurDid, iSliceIdx);
973977 ++ iSliceIdx;
974978 } while (iSliceIdx < kiCountSliceNum);
975979 }
@@ -987,9 +991,9 @@ void TrackSliceConsumeTime (sWelsEncCtx* pCtx, int32_t* pDidList, const int32_t · 11 unmodified lines
987991 pPara = pCtx->pSvcParam;
988992 while (iSpatialIdx < iSpatialNum) {
989993 const int32_t kiDid = pDidList[iSpatialIdx];
990− SSliceArgument* pSliceArgument = &pPara->sSpatialLayers[kiDid].sSliceArgument;
994+ SSliceArgument* pSliceArgument = &pPara->sSpatialLayers[kiDid].sSliceArgument;
991995 SDqLayer* pCurDq = pCtx->ppDqLayerList[kiDid];
992− SSlice* pSliceInLayer = pCurDq->sLayerInfo.pSliceInLayer;
996+ SSlice** ppSliceInLayer = pCurDq->ppSliceInLayer;
993997 SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx;
994998 const uint32_t kuiCountSliceNum = pSliceCtx->iSliceNumInFrame;
995999 if (pCtx->pSliceThreading) {
@@ -1002,9 +1006,9 @@ void TrackSliceConsumeTime (sWelsEncCtx* pCtx, int32_t* pDidList, const int32_t · 6 unmodified lines
10021006 int32_t iMaxI = 0;
10031007 while (i < kuiCountSliceNum) {
10041008 fprintf (pCtx->pSliceThreading->pFSliceDiff, "%6d us consume_time coding_idx %d iDid %d pSlice %d\n",
1005− pSliceInLayer[i].uiSliceConsumeTime, pCtx->iCodingIndex, kiDid, i /*/ 1000*/);
1006− if (pSliceInLayer[i].uiSliceConsumeTime > uiMaxT) {
1007− uiMaxT = pSliceInLayer[i].uiSliceConsumeTime;
1009+ ppSliceInLayer[i]->uiSliceConsumeTime, pCtx->iCodingIndex, kiDid, i /*/ 1000*/);
1010+ if (ppSliceInLayer[i]->uiSliceConsumeTime > uiMaxT) {
1011+ uiMaxT = ppSliceInLayer[i]->uiSliceConsumeTime;
10081012 iMaxI = i;
10091013 }
10101014 ++ i;
@@ -1019,7 +1023,7 @@ void TrackSliceConsumeTime (sWelsEncCtx* pCtx, int32_t* pDidList, const int32_t · 8 unmodified lines
10191023 #endif//#if defined(MT_DEBUG)
10201024
10211025 void SetOneSliceBsBufferUnderMultithread (sWelsEncCtx* pCtx, const int32_t kiThreadIdx, const int32_t iSliceIdx) {
1022− SWelsSliceBs* pSliceBs = &pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceBs;
1026+ SWelsSliceBs* pSliceBs = &pCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx]->sSliceBs;
10231027 pSliceBs->pBsBuffer = pCtx->pSliceThreading->pThreadBsBuffer[kiThreadIdx];
10241028 pSliceBs->uiBsPos = 0;
10251029 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t