History

astyle code style for enc

Guangwei Wang committed 9 years ago

Commit 3d150f01 parent bc8317915 files · +184 −172Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+15−15
@@ -93,7 +93,7 @@ void CalcSliceComplexRatio (SDqLayer* pCurDq) { · 92 unmodified lines
9393 int32_t iSliceIdx = 0;
9494 int32_t iAvI[MAX_SLICES_NUM];
9595
96− assert(kiSliceCount <= MAX_SLICES_NUM);
96+ assert (kiSliceCount <= MAX_SLICES_NUM);
9797 WelsEmms();
9898
9999 while (iSliceIdx < kiSliceCount) {
@@ -112,7 +112,7 @@ void CalcSliceComplexRatio (SDqLayer* pCurDq) { · 12 unmodified lines
112112 }
113113
114114 int32_t NeedDynamicAdjust (SSlice** ppSliceInLayer, const int32_t iSliceNum) {
115− if ( NULL == ppSliceInLayer ) {
115+ if (NULL == ppSliceInLayer) {
116116 return false;
117117 }
118118
@@ -123,7 +123,7 @@ int32_t NeedDynamicAdjust (SSlice** ppSliceInLayer, const int32_t iSliceNum) { · 4 unmodified lines
123123 WelsEmms();
124124
125125 while (iSliceIdx < iSliceNum) {
126− if ( NULL == ppSliceInLayer[iSliceIdx] ) {
126+ if (NULL == ppSliceInLayer[iSliceIdx]) {
127127 return false;
128128 }
129129
@@ -232,7 +232,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 102 unmodified lines
232232 return;
233233 }
234234 iRunLen[iSliceIdx] = iNumMbAssigning;
235− MT_TRACE_LOG (&(pCtx->sLogCtx), WELS_LOG_DEBUG,
235+ MT_TRACE_LOG (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
236236 "[MT] DynamicAdjustSlicing(), iSliceIdx= %d, iSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",
237237 iSliceIdx, ppSliceInLayer[iSliceIdx]->iSliceComplexRatio * 1.0f / INT_MULTIPLY,
238238 ppSliceInLayer[iSliceIdx]->iCountMbNumInSlice,
@@ -437,24 +437,24 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 198 unmodified lines
437437 while (iSliceIdx < iSliceCount) {
438438 pSliceBs = &ppSliceInlayer[iSliceIdx]->sSliceBs;
439439 if (pSliceBs != NULL && pSliceBs->uiBsPos > 0) {
440− int32_t iNalIdx = 0;
441− const int32_t iCountNal = pSliceBs->iNalIndex;
440+ int32_t iNalIdx = 0;
441+ const int32_t iCountNal = pSliceBs->iNalIndex;
442442
443443 #if MT_DEBUG_BS_WR
444− assert (pSliceBs->bSliceCodedFlag);
444+ assert (pSliceBs->bSliceCodedFlag);
445445 #endif//MT_DEBUG_BS_WR
446446
447− memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
448− pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
447+ memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
448+ pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
449449
450− iLayerSize += pSliceBs->uiBsPos;
450+ iLayerSize += pSliceBs->uiBsPos;
451451
452− while (iNalIdx < iCountNal) {
452+ while (iNalIdx < iCountNal) {
453453 pLbi->pNalLengthInByte[iNalIdxBase + iNalIdx] = pSliceBs->iNalLen[iNalIdx];
454454 ++ iNalIdx;
455− }
456− pLbi->iNalCount += iCountNal;
457− iNalIdxBase += iCountNal;
455+ }
456+ pLbi->iNalCount += iCountNal;
457+ iNalIdxBase += iCountNal;
458458 }
459459 ++ iSliceIdx;
460460 }
@@ -615,7 +615,7 @@ void TrackSliceConsumeTime (sWelsEncCtx* pCtx, int32_t* pDidList, const int32_t · 154 unmodified lines
615615 int32_t iMaxI = 0;
616616 while (i < kuiCountSliceNum) {
617617 fprintf (pCtx->pSliceThreading->pFSliceDiff, "%6d us consume_time coding_idx %d iDid %d pSlice %d\n",
618− ppSliceInLayer[i]->uiSliceConsumeTime, pCtx->iCodingIndex, kiDid, i /*/ 1000*/);
618+ ppSliceInLayer[i]->uiSliceConsumeTime, pCtx->iCodingIndex, kiDid, i /*/ 1000*/);
619619 if (ppSliceInLayer[i]->uiSliceConsumeTime > uiMaxT) {
620620 uiMaxT = ppSliceInLayer[i]->uiSliceConsumeTime;
621621 iMaxI = i;

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