History

Multi-thread-fixed:RBC#1715:refactoring for slice boundary info init/update module

huade committed 9 years ago

Commit e448da81 parent 74b9a3f8 files · +87 −71Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+11−3
@@ -81,10 +81,9 @@ void UpdateMbListNeighborParallel (SDqLayer* pCurDq, · 80 unmodified lines
8181 SMB* pMbList,
8282 const int32_t uiSliceIdc) {
8383 SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx;
84− SSlice* pUpdateSlice = pCurDq->ppSliceInLayer[uiSliceIdc];
8584 const int32_t kiMbWidth = pSliceCtx->iMbWidth;
86− int32_t iIdx = pUpdateSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
87− const int32_t kiEndMbInSlice = iIdx + pUpdateSlice->iCountMbNumInSlice - 1;
85+ int32_t iIdx = pCurDq->pFirstMbIdxOfSlice[uiSliceIdc];
86+ const int32_t kiEndMbInSlice = iIdx + pCurDq->pCountMbNumInSlice[uiSliceIdc] - 1;
8887
8988 do {
9089 UpdateMbNeighbor (pCurDq, &pMbList[iIdx], kiMbWidth, uiSliceIdc);
@@ -638,6 +637,15 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 547 unmodified lines
638637 WelsLoadNalForSlice (pSliceBs, eNalType, eNalRefIdc);
639638 pCurSlice = pEncPEncCtx->pCurDqLayer->ppSliceInLayer[iSliceIdx];
640639 assert (iSliceIdx == (int) pCurSlice->uiSliceIdx);
640+
641+ iReturn = SetSliceBoundaryInfo(pEncPEncCtx->pCurDqLayer, pCurSlice, iSliceIdx);
642+ if (ENC_RETURN_SUCCESS != iReturn) {
643+ uiThrdRet = iReturn;
644+ WELS_THREAD_SIGNAL_AND_BREAK (pEncPEncCtx->pSliceThreading->pSliceCodedEvent,
645+ pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent,
646+ iEventIdx);
647+ }
648+
641649 iReturn = WelsCodeOneSlice (pEncPEncCtx, pCurSlice, eNalType);
642650 if (ENC_RETURN_SUCCESS != iReturn) {
643651 uiThrdRet = iReturn;

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