History

Convert tabs to spaces before comments

Martin Storsjö committed 11 years ago

Commit 78e0ec61 parent 3052b7a57 files · +278 −278Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+12−12
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656 #include "svc_encode_slice.h"
5757 #include "deblocking.h"
5858 #include "svc_enc_golomb.h"
59−#include "crt_util_safe_x.h" // for safe crt like calls
59+#include "crt_util_safe_x.h" // for safe crt like calls
6060 #include "rc.h"
6161
6262 #include "cpu.h"
@@ -225,7 +225,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 162 unmodified lines
225225 iMinimalMbNum = iNumMbInEachGom;
226226 }
227227
228− if (kiCountSliceNum < 2 || (kiCountSliceNum & 0x01)) // we need suppose uiSliceNum is even for multiple threading
228+ if (kiCountSliceNum < 2 || (kiCountSliceNum & 0x01)) // we need suppose uiSliceNum is even for multiple threading
229229 return;
230230
231231 iMaximalMbNum = kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum;
@@ -252,7 +252,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 20 unmodified lines
252252 assert (iNumMbAssigning > 0);
253253
254254 iMbNumLeft -= iNumMbAssigning;
255− if (iMbNumLeft <= 0) { // error due to we can not support slice_skip now yet, do not adjust this time
255+ if (iMbNumLeft <= 0) { // error due to we can not support slice_skip now yet, do not adjust this time
256256 assert (0);
257257 return;
258258 }
@@ -543,7 +543,7 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 284 unmodified lines
543543 assert (pSliceBs->bSliceCodedFlag);
544544 #endif//MT_DEBUG_BS_WR
545545
546− memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
546+ memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
547547 pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
548548
549549 iLayerSize += pSliceBs->uiBsPos;
@@ -575,7 +575,7 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 25 unmodified lines
575575 int32_t iNalIdx = 0;
576576 const int32_t iCountNal = pSliceBs->iNalIndex;
577577
578− memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
578+ memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
579579 pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
580580
581581 iLayerSize += pSliceBs->uiBsPos;
@@ -714,7 +714,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 132 unmodified lines
714714 iWaitRet = WelsMultipleEventsWaitSingleBlocking (iEventCount,
715715 &pEventsList[0],
716716 &pEncPEncCtx->pSliceThreading->pThreadMasterEvent[iEventIdx]); // blocking until at least one event is signalled
717− if (WELS_THREAD_ERROR_WAIT_OBJECT_0 == iWaitRet) { // start pSlice coding signal waited
717+ if (WELS_THREAD_ERROR_WAIT_OBJECT_0 == iWaitRet) { // start pSlice coding signal waited
718718 SLayerBSInfo* pLbi = pPrivateData->pLayerBs;
719719 const int32_t kiCurDid = pEncPEncCtx->uiDependencyId;
720720 const int32_t kiCurTid = pEncPEncCtx->uiTemporalId;
@@ -822,7 +822,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 101 unmodified lines
822822 #endif//MT_DEBUG_BS_WR
823823
824824 WelsEventSignal (
825− &pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
825+ &pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
826826 WelsEventSignal (
827827 &pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent);
828828 } else { // for SM_DYN_SLICE parallelization
@@ -925,10 +925,10 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 96 unmodified lines
925925 iSliceIdx += kiSliceIdxStep;
926926 }
927927
928− if (uiThrdRet) // any exception??
928+ if (uiThrdRet) // any exception??
929929 break;
930930
931− WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
931+ WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
932932 WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent);
933933 }
934934 } else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 1 == iWaitRet) { // exit thread signal
@@ -940,7 +940,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 5 unmodified lines
940940 pCurDq = pEncPEncCtx->pCurDqLayer;
941941 UpdateMbListNeighborParallel (pCurDq->pSliceEncCtx, pCurDq->sMbDataP, iSliceIdx);
942942 WelsEventSignal (
943− &pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]); // mean finished update pMb list for this pSlice
943+ &pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]); // mean finished update pMb list for this pSlice
944944 } else { // WELS_THREAD_ERROR_WAIT_TIMEOUT, or WELS_THREAD_ERROR_WAIT_FAILED
945945 WelsLog (& (pEncPEncCtx->sLogCtx), WELS_LOG_WARNING,
946946 "[MT] CodingSliceThreadProc(), waiting pReadySliceCodingEvent[%d] failed(%d) and thread%d terminated!", iEventIdx,
@@ -1061,7 +1061,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 114 unmodified lines
10611061 && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid -
10621062 1].sSliceCfg.sSliceArgument.uiSliceNum);
10631063
1064− if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
1064+ if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
10651065 // do not need adjust due to not different at both slices of consumed time
10661066 iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[iCurDid - 1],
10671067 pCtx->pCurDqLayer->pSliceEncCtx->iSliceNumInFrame);
@@ -1071,7 +1071,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 3 unmodified lines
10711071 pCtx->pSliceThreading->pSliceComplexRatio[iCurDid - 1],
10721072 iCurDid
10731073 );
1074− } else { // use temporal layer for complexity estimation
1074+ } else { // use temporal layer for complexity estimation
10751075 // do not need adjust due to not different at both slices of consumed time
10761076 iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[iCurDid],
10771077 pCtx->pCurDqLayer->pSliceEncCtx->iSliceNumInFrame);

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