History

Merge pull request #2716 from shihuade/MultiThread_V11.0_Rename

rename variables, change thread idx to bufferIdx,which lead to misunderstanding

sijchen committed 9 years ago

Commit 14725d42 parents 08f19b6 3fc24c37 files · +122 −125Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+9−10
@@ -923,9 +923,9 @@ int32_t InitMbListD (sWelsEncCtx** ppCtx) { · 922 unmodified lines
923923 void FreeSliceInLayer (SDqLayer* pDq, CMemoryAlign* pMa) {
924924 int32_t iIdx = 0;
925925 for (; iIdx < MAX_THREADS_NUM; iIdx ++) {
926− FreeSliceBuffer (pDq->sSliceThreadInfo[iIdx].pSliceInThread,
927− pDq->sSliceThreadInfo[iIdx].iMaxSliceNum,
928− pMa, "pSliceInThread");
926+ FreeSliceBuffer (pDq->sSliceBufferInfo[iIdx].pSliceBuffer,
927+ pDq->sSliceBufferInfo[iIdx].iMaxSliceNum,
928+ pMa, "pSliceBuffer");
929929 }
930930 }
931931
@@ -3643,7 +3643,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2711 unmodified lines
36433643 if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer
36443644 int32_t iSliceSize = 0;
36453645 int32_t iPayloadSize = 0;
3646− SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[0].pSliceInThread[0];
3646+ SSlice* pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[0].pSliceBuffer[0];
36473647
36483648 if (pCtx->bNeedPrefixNalFlag) {
36493649 pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType,
@@ -3777,7 +3777,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 127 unmodified lines
37773777 } else { // for non-dynamic-slicing mode single threading branch..
37783778 const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
37793779 int32_t iSliceIdx = 0;
3780− uint32_t uiTheadIdx = 0;
37813780 SSlice* pCurSlice = NULL;
37823781
37833782 iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer);
@@ -3795,7 +3794,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 11 unmodified lines
37953794
37963795 WelsLoadNal (pCtx->pOut, eNalType, eNalRefIdc);
37973796
3798− pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iSliceIdx];
3797+ pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[0].pSliceBuffer[iSliceIdx];
37993798 assert (iSliceIdx == pCurSlice->iSliceIdx);
38003799 pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx);
38013800
@@ -4450,8 +4449,8 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 648 unmodified lines
44504449 ) {
44514450
44524451 SDqLayer* pCurLayer = pCtx->pCurDqLayer;
4453− uint32_t uiTheadIdx = 0;
4454− SSlice* pStartSlice = &pCurLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iStartSliceIdx];
4452+ uint32_t uSlcBuffIdx = 0;
4453+ SSlice* pStartSlice = &pCurLayer->sSliceBufferInfo[uSlcBuffIdx].pSliceBuffer[iStartSliceIdx];
44554454 int32_t iNalIdxInLayer = *pNalIdxInLayer;
44564455 int32_t iSliceIdx = iStartSliceIdx;
44574456 const int32_t kiSliceStep = pCtx->iActiveThreadsNum;
@@ -4471,7 +4470,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 13 unmodified lines
44714470 int32_t iPayloadSize = 0;
44724471 SSlice* pCurSlice = NULL;
44734472
4474− if (iSliceIdx >= (pCurLayer->sSliceThreadInfo[uiTheadIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[]
4473+ if (iSliceIdx >= (pCurLayer->sSliceBufferInfo[uSlcBuffIdx].iMaxSliceNum - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[]
44754474 if (pCtx->iActiveThreadsNum == 1) {
44764475 //only single thread support re-alloc now
44774476 if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) {
@@ -4495,7 +4494,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 17 unmodified lines
44954494 }
44964495
44974496 WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc);
4498− pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo[uiTheadIdx].pSliceInThread[iSliceIdx];
4497+ pCurSlice = &pCtx->pCurDqLayer->sSliceBufferInfo[uSlcBuffIdx].pSliceBuffer[iSliceIdx];
44994498 pCurSlice->iSliceIdx = iSliceIdx;
45004499
45014500 iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType);

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