History

Remove tabs where a simple space is just enough

Martin Storsjö committed 11 years ago

Commit ca51ee01 parent 51efa5754 files · +769 −772Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+201−202
@@ -450,7 +450,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 449 unmodified lines
450450 WelsLog (pLogCtx, WELS_LOG_DEBUG,
451451 "ParamValidationExt(), uiSliceNum(%d) you set for SM_FIXEDSLCNUM_SLICE, now turn to SM_SINGLE_SLICE type!",
452452 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
453− pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
453+ pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
454454 break;
455455 }
456456 if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
@@ -477,8 +477,8 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 20 unmodified lines
477477 }
478478 // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
479479 if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
480− pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
481− pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
480+ pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
481+ pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
482482 break;
483483 }
484484 }
@@ -515,7 +515,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 30 unmodified lines
515515 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {
516516 WelsLog (pLogCtx, WELS_LOG_WARNING,
517517 "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!");
518− pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
518+ pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
519519 break;
520520 }
521521 if ((pCodingParam->iRCMode != RC_OFF_MODE) && pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1) {
@@ -523,8 +523,8 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 1 unmodified line
523523 }
524524 // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
525525 if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
526− pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
527− pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
526+ pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
527+ pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
528528 break;
529529 }
530530 }
@@ -540,7 +540,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 9 unmodified lines
540540 iMbHeight, MAX_SLICES_NUM);
541541 return ENC_RETURN_UNSUPPORTED_PARA;
542542 }
543− pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;
543+ pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;
544544
545545 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0) {
546546 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!",
@@ -682,7 +682,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 135 unmodified lines
682682 if (NULL == pParam || NULL == ppCtx || NULL == *ppCtx)
683683 return 1;
684684
685− iNumDependencyLayers = pParam->iSpatialLayerNum;
685+ iNumDependencyLayers = pParam->iSpatialLayerNum;
686686
687687 do {
688688 SSpatialLayerConfig* pDLayer = &pParam->sSpatialLayers[iDIndex];
@@ -748,7 +748,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 59 unmodified lines
748748 if (NULL != pCountLayers)
749749 *pCountLayers = iCountNumLayers;
750750 if (NULL != pCountNals)
751− *pCountNals = iCountNumNals;
751+ *pCountNals = iCountNumNals;
752752 return 0;
753753 }
754754
@@ -874,7 +874,7 @@ int32_t AllocMbCacheAligned (SMbCache* pMbCache, CMemoryAlign* pMa) { · 119 unmodified lines
874874 pMbCache->pPrevIntra4x4PredModeFlag = (bool*)pMa->WelsMalloc (16 * sizeof (bool),
875875 "pMbCache->pPrevIntra4x4PredModeFlag");
876876 WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pPrevIntra4x4PredModeFlag));
877− pMbCache->pRemIntra4x4PredModeFlag = (int8_t*)pMa->WelsMalloc (16 * sizeof (int8_t),
877+ pMbCache->pRemIntra4x4PredModeFlag = (int8_t*)pMa->WelsMalloc (16 * sizeof (int8_t),
878878 "pMbCache->pRemIntra4x4PredModeFlag");
879879 WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pRemIntra4x4PredModeFlag));
880880 pMbCache->pDct = (SDCTCoeff*)pMa->WelsMalloc (sizeof (SDCTCoeff), "pMbCache->pDct");
@@ -1001,7 +1001,7 @@ int32_t FindExistingSps (SWelsSvcCodingParam* pParam, const bool kbUseSubsetSps, · 120 unmodified lines
10011001 const int32_t iDlayerCount, const int32_t iSpsNumInUse,
10021002 SWelsSPS* pSpsArray,
10031003 SSubsetSps* pSubsetArray, bool bSVCBaseLayer) {
1004− SSpatialLayerConfig* pDlayerParam = &pParam->sSpatialLayers[iDlayerIndex];
1004+ SSpatialLayerConfig* pDlayerParam = &pParam->sSpatialLayers[iDlayerIndex];
10051005
10061006 assert (iSpsNumInUse <= MAX_SPS_COUNT);
10071007 if (!kbUseSubsetSps) {
@@ -1096,7 +1096,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 88 unmodified lines
10961096 const int32_t kiNeedFeatureStorage = (pParam->iUsageType != SCREEN_CONTENT_REAL_TIME) ? 0 :
10971097 ((kiFeatureStrategyIndex << 16) + ((kiMe16x16 & 0x00FF) << 8) + (kiMe8x8 & 0x00FF));
10981098
1099− iDlayerIndex = 0;
1099+ iDlayerIndex = 0;
11001100 while (iDlayerIndex < iDlayerCount) {
11011101 SRefList* pRefList = NULL;
11021102 uint32_t i = 0;
@@ -1111,21 +1111,21 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 8 unmodified lines
11111111 WelsGetEncBlockStrideOffset ((*ppCtx)->pStrideTab->pStrideEncBlockOffset[iDlayerIndex], iPicWidth, iPicChromaWidth);
11121112
11131113 // pRef list
1114− pRefList = (SRefList*)pMa->WelsMallocz (sizeof (SRefList), "pRefList");
1114+ pRefList = (SRefList*)pMa->WelsMallocz (sizeof (SRefList), "pRefList");
11151115 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pRefList), FreeMemorySvc (ppCtx))
11161116 do {
1117− pRefList->pRef[i] = AllocPicture (pMa, kiWidth, kiHeight, true,
1118− (iDlayerIndex == iDlayerCount - 1) ? kiNeedFeatureStorage : 0); // to use actual size of current layer
1117+ pRefList->pRef[i] = AllocPicture (pMa, kiWidth, kiHeight, true,
1118+ (iDlayerIndex == iDlayerCount - 1) ? kiNeedFeatureStorage : 0); // to use actual size of current layer
11191119 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pRefList->pRef[i]), FreeMemorySvc (ppCtx))
11201120 ++ i;
11211121 } while (i < 1 + iNumRef);
11221122
11231123 pRefList->pNextBuffer = pRefList->pRef[0];
1124− (*ppCtx)->ppRefPicListExt[iDlayerIndex] = pRefList;
1124+ (*ppCtx)->ppRefPicListExt[iDlayerIndex] = pRefList;
11251125 ++ iDlayerIndex;
11261126 }
11271127
1128− iDlayerIndex = 0;
1128+ iDlayerIndex = 0;
11291129 while (iDlayerIndex < iDlayerCount) {
11301130 SDqLayer* pDqLayer = NULL;
11311131 SSpatialLayerConfig* pDlayer = &pParam->sSpatialLayers[iDlayerIndex];
@@ -1158,8 +1158,8 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 26 unmodified lines
11581158 pDqLayer->iMbWidth = kiMbW;
11591159 pDqLayer->iMbHeight = kiMbH;
11601160 {
1161− int32_t iSliceIdx = 0;
1162− pDqLayer->sLayerInfo.pSliceInLayer = (SSlice*)pMa->WelsMallocz (sizeof (SSlice) * iMaxSliceNum, "pSliceInLayer");
1161+ int32_t iSliceIdx = 0;
1162+ pDqLayer->sLayerInfo.pSliceInLayer = (SSlice*)pMa->WelsMallocz (sizeof (SSlice) * iMaxSliceNum, "pSliceInLayer");
11631163
11641164 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pDqLayer->sLayerInfo.pSliceInLayer), FreeMemorySvc (ppCtx))
11651165 if (iMaxSliceNum > 1) {
@@ -1201,20 +1201,20 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 35 unmodified lines
12011201 if (SM_SINGLE_SLICE == pDlayer->sSliceCfg.uiSliceMode) {
12021202 //iLoopFilterDisableIdc: will be 0 or 1 under single_slice
12031203 if (2 == pParam->iLoopFilterDisableIdc) {
1204− pDqLayer->iLoopFilterDisableIdc = 0;
1204+ pDqLayer->iLoopFilterDisableIdc = 0;
12051205 }
12061206 //bDeblockingParallelFlag
12071207 pDqLayer->bDeblockingParallelFlag = false;
12081208 } else {
12091209 //multi-pSlice
12101210 if (0 == pDqLayer->iLoopFilterDisableIdc) {
1211− pDqLayer->bDeblockingParallelFlag = false;
1211+ pDqLayer->bDeblockingParallelFlag = false;
12121212 }
12131213 }
12141214
12151215 //
12161216 if (kiNeedFeatureStorage && iDlayerIndex == iDlayerCount - 1) {
1217− pDqLayer->pFeatureSearchPreparation = static_cast<SFeatureSearchPreparation*> (pMa->WelsMallocz (sizeof (
1217+ pDqLayer->pFeatureSearchPreparation = static_cast<SFeatureSearchPreparation*> (pMa->WelsMallocz (sizeof (
12181218 SFeatureSearchPreparation), "pFeatureSearchPreparation"));
12191219 WELS_VERIFY_RETURN_PROC_IF (1, NULL == pDqLayer->pFeatureSearchPreparation, FreeMemorySvc (ppCtx));
12201220 int32_t iReturn = RequestFeatureSearchPreparation (pMa, pDlayer->iVideoWidth, pDlayer->iVideoHeight,
@@ -1225,7 +1225,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 4 unmodified lines
12251225 pDqLayer->pFeatureSearchPreparation = NULL;
12261226 }
12271227
1228− (*ppCtx)->ppDqLayerList[iDlayerIndex] = pDqLayer;
1228+ (*ppCtx)->ppDqLayerList[iDlayerIndex] = pDqLayer;
12291229
12301230 ++ iDlayerIndex;
12311231 }
@@ -1233,10 +1233,10 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 1 unmodified line
12331233 // for dynamically malloc for parameter sets memory instead of maximal items for standard to reduce size, 3/18/2010
12341234 const int32_t kiNeededSpsNum = (*ppCtx)->GetNeededSpsNum();
12351235 const int32_t kiNeededSubsetSpsNum = (*ppCtx)->GetNeededSubsetSpsNum();
1236− (*ppCtx)->pSpsArray = (SWelsSPS*)pMa->WelsMalloc (kiNeededSpsNum * sizeof (SWelsSPS), "pSpsArray");
1236+ (*ppCtx)->pSpsArray = (SWelsSPS*)pMa->WelsMalloc (kiNeededSpsNum * sizeof (SWelsSPS), "pSpsArray");
12371237 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSpsArray), FreeMemorySvc (ppCtx))
12381238 if (kiNeededSubsetSpsNum > 0) {
1239− (*ppCtx)->pSubsetArray = (SSubsetSps*)pMa->WelsMalloc (kiNeededSubsetSpsNum * sizeof (SSubsetSps), "pSubsetArray");
1239+ (*ppCtx)->pSubsetArray = (SSubsetSps*)pMa->WelsMalloc (kiNeededSubsetSpsNum * sizeof (SSubsetSps), "pSubsetArray");
12401240 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSubsetArray), FreeMemorySvc (ppCtx))
12411241 } else {
12421242 (*ppCtx)->pSubsetArray = NULL;
@@ -1256,7 +1256,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 13 unmodified lines
12561256
12571257 // PPS
12581258 const int32_t kiNeededPpsNum = (*ppCtx)->GetNeededPpsNum();
1259− (*ppCtx)->pPPSArray = (SWelsPPS*)pMa->WelsMalloc (kiNeededPpsNum * sizeof (SWelsPPS), "pPPSArray");
1259+ (*ppCtx)->pPPSArray = (SWelsPPS*)pMa->WelsMalloc (kiNeededPpsNum * sizeof (SWelsPPS), "pPPSArray");
12601260 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pPPSArray), FreeMemorySvc (ppCtx))
12611261
12621262 // copy from existing if the pointer exists
@@ -1272,17 +1272,17 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 9 unmodified lines
12721272 (*ppCtx)->pPSOVector = NULL;
12731273 }
12741274
1275− (*ppCtx)->pDqIdcMap = (SDqIdc*)pMa->WelsMallocz (iDlayerCount * sizeof (SDqIdc), "pDqIdcMap");
1275+ (*ppCtx)->pDqIdcMap = (SDqIdc*)pMa->WelsMallocz (iDlayerCount * sizeof (SDqIdc), "pDqIdcMap");
12761276 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pDqIdcMap), FreeMemorySvc (ppCtx))
12771277
1278− iDlayerIndex = 0;
1278+ iDlayerIndex = 0;
12791279 while (iDlayerIndex < iDlayerCount) {
12801280 SDqIdc* pDqIdc = & (*ppCtx)->pDqIdcMap[iDlayerIndex];
12811281 const bool bUseSubsetSps = (!pParam->bSimulcastAVC) && (iDlayerIndex > BASE_DEPENDENCY_ID);
12821282 SSpatialLayerConfig* pDlayerParam = &pParam->sSpatialLayers[iDlayerIndex];
12831283 bool bSvcBaselayer = (!pParam->bSimulcastAVC) && (iDlayerCount > BASE_DEPENDENCY_ID)
12841284 && (iDlayerIndex == BASE_DEPENDENCY_ID);
1285− pDqIdc->uiSpatialId = iDlayerIndex;
1285+ pDqIdc->uiSpatialId = iDlayerIndex;
12861286
12871287 if (! (SPS_LISTING & pParam->eSpsPpsIdStrategy)) {
12881288 WelsGenerateNewSps (*ppCtx, bUseSubsetSps, iDlayerIndex,
@@ -1337,7 +1337,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 48 unmodified lines
13371337 }
13381338
13391339 if (! (SPS_PPS_LISTING == pParam->eSpsPpsIdStrategy)) {
1340− pPps = & (*ppCtx)->pPPSArray[iPpsId];
1340+ pPps = & (*ppCtx)->pPPSArray[iPpsId];
13411341 // initialize pPps
13421342 WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps, pParam->iEntropyCodingModeFlag != 0);
13431343 } else {
@@ -1353,7 +1353,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 9 unmodified lines
13531353 pPps = & ((*ppCtx)->pPPSArray[kiFoundPpsId]);
13541354 } else {
13551355 iPpsId = ((*ppCtx)->sPSOVector.uiInUsePpsNum++);
1356− pPps = & (*ppCtx)->pPPSArray[iPpsId];
1356+ pPps = & (*ppCtx)->pPPSArray[iPpsId];
13571357 WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps, pParam->iEntropyCodingModeFlag != 0);
13581358 }
13591359 }
@@ -1372,10 +1372,10 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 12 unmodified lines
13721372 FreeMemorySvc (ppCtx);
13731373 return iResult;
13741374 }
1375− (*ppCtx)->ppDqLayerList[iDlayerIndex]->pSliceEncCtx = & (*ppCtx)->pSliceCtxList[iDlayerIndex];
1375+ (*ppCtx)->ppDqLayerList[iDlayerIndex]->pSliceEncCtx = & (*ppCtx)->pSliceCtxList[iDlayerIndex];
13761376 }
1377− pDqIdc->iSpsId = iSpsId;
1378− pDqIdc->iPpsId = iPpsId;
1377+ pDqIdc->iSpsId = iSpsId;
1378+ pDqIdc->iPpsId = iPpsId;
13791379
13801380 (*ppCtx)->sPSOVector.bPpsIdMappingIntoSubsetsps[iPpsId] = bUseSubsetSps;
13811381
@@ -1438,7 +1438,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 56 unmodified lines
14381438 return 1;
14391439 (*ppCtx)->pStrideTab = pPtr;
14401440
1441− iCntTid = pParam->iTemporalLayerNum > 1 ? 2 : 1;
1441+ iCntTid = pParam->iTemporalLayerNum > 1 ? 2 : 1;
14421442
14431443 iSpatialIdx = 0;
14441444 while (iSpatialIdx < kiNumSpatialLayers) {
@@ -1459,11 +1459,11 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 14 unmodified lines
14591459 // Adaptive size_cs, size_fdec by implementation dependency
14601460 iTemporalIdx = 0;
14611461 while (iTemporalIdx < iCntTid) {
1462− const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
1462+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
14631463
14641464 iSpatialIdx = 0;
14651465 while (iSpatialIdx < kiNumSpatialLayers) {
1466− SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[iSpatialIdx];
1466+ SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[iSpatialIdx];
14671467
14681468 const int32_t kiWidthPad = WELS_ALIGN (fDlp->iVideoWidth, 16) + (PADDING_LENGTH << 1);
14691469 iLineSizeY[iSpatialIdx][kbBaseTemporalFlag] = WELS_ALIGN (kiWidthPad, 32);
@@ -1492,7 +1492,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 22 unmodified lines
14921492
14931493 iTemporalIdx = 0;
14941494 while (iTemporalIdx < iCntTid) {
1495− const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
1495+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
14961496
14971497 iSpatialIdx = 0;
14981498 while (iSpatialIdx < iCountLayersNeedCs[kbBaseTemporalFlag]) {
@@ -1502,7 +1502,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 3 unmodified lines
15021502
15031503 WelsGetEncBlockStrideOffset ((int32_t*)pBaseDec, kiLumaWidth, kiChromaWidth);
15041504
1505− pPtr->pStrideDecBlockOffset[kiActualSpatialIdx][kbBaseTemporalFlag] = (int32_t*)pBaseDec;
1505+ pPtr->pStrideDecBlockOffset[kiActualSpatialIdx][kbBaseTemporalFlag] = (int32_t*)pBaseDec;
15061506 pBaseDec += kiUnit1Size;
15071507
15081508 ++ iSpatialIdx;
@@ -1511,7 +1511,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 2 unmodified lines
15111511 }
15121512 iTemporalIdx = 0;
15131513 while (iTemporalIdx < iCntTid) {
1514− const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
1514+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
15151515
15161516 iSpatialIdx = 0;
15171517 while (iSpatialIdx < kiNumSpatialLayers) {
@@ -1523,12 +1523,12 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 5 unmodified lines
15231523 while (i < iCountLayersNeedCs[kbBaseTemporalFlag]) {
15241524 const int32_t kiActualIdx = iMapSpatialIdx[i][kbBaseTemporalFlag];
15251525 if (kiActualIdx == iSpatialIdx) {
1526− bInMap = true;
1526+ bInMap = true;
15271527 break;
15281528 }
15291529 if (!bMatchFlag) {
1530− iMatchIndex = kiActualIdx;
1531− bMatchFlag = true;
1530+ iMatchIndex = kiActualIdx;
1531+ bMatchFlag = true;
15321532 }
15331533 ++ i;
15341534 }
@@ -1539,7 +1539,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 4 unmodified lines
15391539 }
15401540
15411541 // not in spatial map and assign match one to it
1542− pPtr->pStrideDecBlockOffset[iSpatialIdx][kbBaseTemporalFlag] =
1542+ pPtr->pStrideDecBlockOffset[iSpatialIdx][kbBaseTemporalFlag] =
15431543 pPtr->pStrideDecBlockOffset[iMatchIndex][kbBaseTemporalFlag];
15441544
15451545 ++ iSpatialIdx;
@@ -1615,7 +1615,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 69 unmodified lines
16151615 }
16161616
16171617 memset (pRowY, 0, iRowSize);
1618− iMaxMbHeight = sMbSizeMap[kiNumSpatialLayers - 1].iCountMbNum / sMbSizeMap[kiNumSpatialLayers - 1].iMbWidth;
1618+ iMaxMbHeight = sMbSizeMap[kiNumSpatialLayers - 1].iCountMbNum / sMbSizeMap[kiNumSpatialLayers - 1].iMbWidth;
16191619 i = 0;
16201620 for (;;) {
16211621 ENFORCE_STACK_ALIGN_1D (int16_t, t, 4, 16)
@@ -1761,18 +1761,18 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 139 unmodified lines
17611761 while (iIndex < pParam->iSpatialLayerNum) {
17621762 SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[iIndex];
17631763
1764− fCompressRatioThr = COMPRESS_RATIO_THR;
1764+ fCompressRatioThr = COMPRESS_RATIO_THR;
17651765
17661766 iLayerBsSize = WELS_ROUND (((3 * fDlp->iVideoWidth * fDlp->iVideoHeight) >> 1) * fCompressRatioThr) +
17671767 MAX_MACROBLOCK_SIZE_IN_BYTE_x2;
1768− iLayerBsSize = WELS_ALIGN (iLayerBsSize, 4); // 4 bytes alinged
1768+ iLayerBsSize = WELS_ALIGN (iLayerBsSize, 4); // 4 bytes alinged
17691769 iVclLayersBsSizeCount += iLayerBsSize;
17701770 ++ iIndex;
17711771 }
17721772 iTargetSpatialBsSize = iLayerBsSize;
17731773 iCountBsLen = iNonVclLayersBsSizeCount + iVclLayersBsSizeCount;
17741774
1775− pParam->iNumRefFrame = WELS_CLIP3 (pParam->iNumRefFrame, MIN_REF_PIC_COUNT,
1775+ pParam->iNumRefFrame = WELS_CLIP3 (pParam->iNumRefFrame, MIN_REF_PIC_COUNT,
17761776 (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME ? MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA :
17771777 MAX_REFERENCE_PICTURE_COUNT_NUM_SCREEN));
17781778
@@ -1791,15 +1791,15 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 12 unmodified lines
17911791
17921792 if (pParam->iMultipleThreadIdc > 1) {
17931793 const int32_t iTotalLength = iCountBsLen + (iTargetSpatialBsSize * ((*ppCtx)->iMaxSliceCount - 1));
1794− (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iTotalLength, "pFrameBs");
1794+ (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iTotalLength, "pFrameBs");
17951795 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pFrameBs), FreeMemorySvc (ppCtx))
17961796 (*ppCtx)->iFrameBsSize = iTotalLength;
17971797 } else {
1798− (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iCountBsLen, "pFrameBs");
1798+ (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iCountBsLen, "pFrameBs");
17991799 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pFrameBs), FreeMemorySvc (ppCtx))
1800− (*ppCtx)->iFrameBsSize = iCountBsLen;
1800+ (*ppCtx)->iFrameBsSize = iCountBsLen;
18011801 }
1802− (*ppCtx)->iPosBsBuffer = 0;
1802+ (*ppCtx)->iPosBsBuffer = 0;
18031803
18041804 // for pSlice bs buffers
18051805 if (pParam->iMultipleThreadIdc > 1 && RequestMtResource (ppCtx, pParam, iCountBsLen, iTargetSpatialBsSize)) {
@@ -1824,12 +1824,12 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 18 unmodified lines
18241824 (pMa->WelsMallocz (iCountMaxMbNum * 2 * MB_BLOCK8x8_NUM * sizeof (int8_t), "pRefIndexBlock4x4"));
18251825 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pRefIndexBlock4x4), FreeMemorySvc (ppCtx))
18261826
1827− (*ppCtx)->pSadCostMb = static_cast<int32_t*>
1827+ (*ppCtx)->pSadCostMb = static_cast<int32_t*>
18281828 (pMa->WelsMallocz (iCountMaxMbNum * sizeof (int32_t), "pSadCostMb"));
18291829 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSadCostMb), FreeMemorySvc (ppCtx))
18301830
18311831 (*ppCtx)->bEncCurFrmAsIdrFlag = true; // make sure first frame is IDR
1832− (*ppCtx)->iGlobalQp = 26; // global qp in default
1832+ (*ppCtx)->iGlobalQp = 26; // global qp in default
18331833
18341834 (*ppCtx)->pLtr = (SLTRState*)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SLTRState), "SLTRState");
18351835 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pLtr), FreeMemorySvc (ppCtx))
@@ -1838,14 +1838,14 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 2 unmodified lines
18381838 ResetLtrState (& (*ppCtx)->pLtr[i]);
18391839 }
18401840
1841− (*ppCtx)->ppRefPicListExt = (SRefList**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SRefList*), "ppRefPicListExt");
1841+ (*ppCtx)->ppRefPicListExt = (SRefList**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SRefList*), "ppRefPicListExt");
18421842 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppRefPicListExt), FreeMemorySvc (ppCtx))
18431843
18441844 // pSlice context list
1845− (*ppCtx)->pSliceCtxList = (SSliceCtx*)pMa->WelsMallocz (kiNumDependencyLayers * sizeof (SSliceCtx), "pSliceCtxList");
1845+ (*ppCtx)->pSliceCtxList = (SSliceCtx*)pMa->WelsMallocz (kiNumDependencyLayers * sizeof (SSliceCtx), "pSliceCtxList");
18461846 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceCtxList), FreeMemorySvc (ppCtx))
18471847
1848− (*ppCtx)->ppDqLayerList = (SDqLayer**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SDqLayer*), "ppDqLayerList");
1848+ (*ppCtx)->ppDqLayerList = (SDqLayer**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SDqLayer*), "ppDqLayerList");
18491849 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppDqLayerList), FreeMemorySvc (ppCtx))
18501850
18511851 // stride tables
@@ -1863,7 +1863,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 11 unmodified lines
18631863
18641864 //pVaa memory allocation
18651865 if (pParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
1866− (*ppCtx)->pVaa = (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa");
1866+ (*ppCtx)->pVaa = (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa");
18671867 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx))
18681868 if (RequestMemoryVaaScreen ((*ppCtx)->pVaa, pMa, (*ppCtx)->pSvcParam->iMaxNumRefFrame, iCountMaxMbNum << 2)) {
18691869 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!");
@@ -1871,7 +1871,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 1 unmodified line
18711871 return 1;
18721872 }
18731873 } else {
1874− (*ppCtx)->pVaa = (SVAAFrameInfo*)pMa->WelsMallocz (sizeof (SVAAFrameInfo), "pVaa");
1874+ (*ppCtx)->pVaa = (SVAAFrameInfo*)pMa->WelsMallocz (sizeof (SVAAFrameInfo), "pVaa");
18751875 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx))
18761876 }
18771877
@@ -1939,12 +1939,12 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 61 unmodified lines
19391939 MvdCostInit ((*ppCtx)->pMvdCostTable, kuiMvdInterTableStride); //should put to a better place?
19401940
19411941 if ((*ppCtx)->ppRefPicListExt[0] != NULL && (*ppCtx)->ppRefPicListExt[0]->pRef[0] != NULL)
1942− (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0];
1942+ (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0];
19431943 else
1944− (*ppCtx)->pDecPic = NULL; // error here
1944+ (*ppCtx)->pDecPic = NULL; // error here
19451945
1946− (*ppCtx)->pSps = & (*ppCtx)->pSpsArray[0];
1947− (*ppCtx)->pPps = & (*ppCtx)->pPPSArray[0];
1946+ (*ppCtx)->pSps = & (*ppCtx)->pSpsArray[0];
1947+ (*ppCtx)->pPps = & (*ppCtx)->pPPSArray[0];
19481948
19491949 return 0;
19501950 }
@@ -1957,10 +1957,10 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 6 unmodified lines
19571957 */
19581958 void FreeMemorySvc (sWelsEncCtx** ppCtx) {
19591959 if (NULL != *ppCtx) {
1960− sWelsEncCtx* pCtx = *ppCtx;
1961− CMemoryAlign* pMa = pCtx->pMemAlign;
1960+ sWelsEncCtx* pCtx = *ppCtx;
1961+ CMemoryAlign* pMa = pCtx->pMemAlign;
19621962 SWelsSvcCodingParam* pParam = pCtx->pSvcParam;
1963− int32_t ilayer = 0;
1963+ int32_t ilayer = 0;
19641964
19651965 // SStrideTables
19661966 if (NULL != pCtx->pStrideTab) {
@@ -2034,12 +2034,12 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 67 unmodified lines
20342034
20352035 if (NULL != pCtx->pMvUnitBlock4x4) {
20362036 pMa->WelsFree (pCtx->pMvUnitBlock4x4, "pMvUnitBlock4x4");
2037− pCtx->pMvUnitBlock4x4 = NULL;
2037+ pCtx->pMvUnitBlock4x4 = NULL;
20382038 }
20392039
20402040 if (NULL != pCtx->pRefIndexBlock4x4) {
20412041 pMa->WelsFree (pCtx->pRefIndexBlock4x4, "pRefIndexBlock4x4");
2042− pCtx->pRefIndexBlock4x4 = NULL;
2042+ pCtx->pRefIndexBlock4x4 = NULL;
20432043 }
20442044
20452045 if (NULL != pCtx->ppMbListD) {
@@ -2066,7 +2066,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 20 unmodified lines
20662066 ilayer = 0;
20672067 if (NULL != pCtx->ppDqLayerList && pParam != NULL) {
20682068 while (ilayer < pParam->iSpatialLayerNum) {
2069− SDqLayer* pDq = pCtx->ppDqLayerList[ilayer];
2069+ SDqLayer* pDq = pCtx->ppDqLayerList[ilayer];
20702070 SSpatialLayerConfig* pDlp = &pCtx->pSvcParam->sSpatialLayers[ilayer];
20712071
20722072 const bool kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sSliceCfg.uiSliceMode);
@@ -2093,9 +2093,9 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 20 unmodified lines
20932093 }
20942094 if (kbIsDynamicSlicing) {
20952095 pMa->WelsFree (pDq->pNumSliceCodedOfPartition, "pNumSliceCodedOfPartition");
2096− pDq->pNumSliceCodedOfPartition = NULL;
2096+ pDq->pNumSliceCodedOfPartition = NULL;
20972097 pMa->WelsFree (pDq->pLastCodedMbIdxOfPartition, "pLastCodedMbIdxOfPartition");
2098− pDq->pLastCodedMbIdxOfPartition = NULL;
2098+ pDq->pLastCodedMbIdxOfPartition = NULL;
20992099 pMa->WelsFree (pDq->pLastMbIdxOfPartition, "pLastMbIdxOfPartition");
21002100 pDq->pLastMbIdxOfPartition = NULL;
21012101 }
@@ -2119,7 +2119,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 17 unmodified lines
21192119 if (NULL != pCtx->ppRefPicListExt && pParam != NULL) {
21202120 ilayer = 0;
21212121 while (ilayer < pParam->iSpatialLayerNum) {
2122− SRefList* pRefList = pCtx->ppRefPicListExt[ilayer];
2122+ SRefList* pRefList = pCtx->ppRefPicListExt[ilayer];
21232123 if (NULL != pRefList) {
21242124 int32_t iRef = 0;
21252125 do {
@@ -2143,7 +2143,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 17 unmodified lines
21432143 if (NULL != pCtx->pSliceCtxList && pParam != NULL) {
21442144 ilayer = 0;
21452145 while (ilayer < pParam->iSpatialLayerNum) {
2146− SSliceCtx* pSliceCtx = &pCtx->pSliceCtxList[ilayer];
2146+ SSliceCtx* pSliceCtx = &pCtx->pSliceCtxList[ilayer];
21472147 if (NULL != pSliceCtx)
21482148 UninitSlicePEncCtx (pSliceCtx, pMa);
21492149 ++ ilayer;
@@ -2163,21 +2163,21 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 13 unmodified lines
21632163 }
21642164
21652165 pMa->WelsFree (pCtx->pVaa->pVaaBackgroundMbFlag, "pVaa->pVaaBackgroundMbFlag");
2166− pCtx->pVaa->pVaaBackgroundMbFlag = NULL;
2166+ pCtx->pVaa->pVaaBackgroundMbFlag = NULL;
21672167 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSad8x8, "pVaa->sVaaCalcInfo.sad8x8");
2168− pCtx->pVaa->sVaaCalcInfo.pSad8x8 = NULL;
2168+ pCtx->pVaa->sVaaCalcInfo.pSad8x8 = NULL;
21692169 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSsd16x16, "pVaa->sVaaCalcInfo.pSsd16x16");
2170− pCtx->pVaa->sVaaCalcInfo.pSsd16x16 = NULL;
2170+ pCtx->pVaa->sVaaCalcInfo.pSsd16x16 = NULL;
21712171 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSum16x16, "pVaa->sVaaCalcInfo.pSum16x16");
2172− pCtx->pVaa->sVaaCalcInfo.pSum16x16 = NULL;
2172+ pCtx->pVaa->sVaaCalcInfo.pSum16x16 = NULL;
21732173 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16, "pVaa->sVaaCalcInfo.pSumOfSquare16x16");
2174− pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16 = NULL;
2174+ pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16 = NULL;
21752175
21762176 if (pCtx->pSvcParam->bEnableBackgroundDetection) { //BGD control
21772177 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8, "pVaa->sVaaCalcInfo.pSumOfDiff8x8");
2178− pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8 = NULL;
2178+ pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8 = NULL;
21792179 pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pMad8x8, "pVaa->sVaaCalcInfo.pMad8x8");
2180− pCtx->pVaa->sVaaCalcInfo.pMad8x8 = NULL;
2180+ pCtx->pVaa->sVaaCalcInfo.pMad8x8 = NULL;
21812181 }
21822182 if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME)
21832183 ReleaseMemoryVaaScreen (pCtx->pVaa, pMa, pCtx->pSvcParam->iMaxNumRefFrame);
@@ -2236,12 +2236,12 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 52 unmodified lines
22362236 // NOTE: Per design, in case MT/DYNAMIC_SLICE_ASSIGN enabled, for SM_FIXEDSLCNUM_SLICE mode,
22372237 // uiSliceNum of current spatial layer settings equals to uiCpuCores number; SM_DYN_SLICE mode,
22382238 // uiSliceNum intials as uiCpuCores also, stay tuned dynamically slicing in future
2239− pSlcArg->uiSliceNum = iSliceNum; // used fixed one
2239+ pSlcArg->uiSliceNum = iSliceNum; // used fixed one
22402240
22412241 switch (pMso->uiSliceMode) {
22422242 case SM_DYN_SLICE:
2243− iMaxSliceCount = AVERSLICENUM_CONSTRAINT;
2244− break; // go through for SM_DYN_SLICE?
2243+ iMaxSliceCount = AVERSLICENUM_CONSTRAINT;
2244+ break; // go through for SM_DYN_SLICE?
22452245 case SM_FIXEDSLCNUM_SLICE:
22462246 if (iSliceNum > iMaxSliceCount)
22472247 iMaxSliceCount = iSliceNum;
@@ -2274,7 +2274,7 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 26 unmodified lines
22742274 WelsLog (pLogCtx, WELS_LOG_DEBUG,
22752275 "InitSliceSettings(), uiSliceNum(%d) you set for SM_AUTO_SLICE, now turn to SM_SINGLE_SLICE type!",
22762276 pDlp->sSliceCfg.sSliceArgument.uiSliceNum);
2277− pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
2277+ pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
22782278 break;
22792279 }
22802280 if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
@@ -2297,13 +2297,13 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 16 unmodified lines
22972297 WelsLog (pLogCtx, WELS_LOG_ERROR,
22982298 "InitSliceSettings(), invalid uiSliceMbNum (%d) settings!,now turn to SM_SINGLE_SLICE type",
22992299 pDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
2300− pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
2301− pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
2300+ pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
2301+ pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
23022302 }
23032303 // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
23042304 if (kiMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
2305− pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
2306− pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
2305+ pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
2306+ pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
23072307 break;
23082308 }
23092309 break;
@@ -2314,13 +2314,13 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 4 unmodified lines
23142314 ++ iSpatialIdx;
23152315 } while (iSpatialIdx < iSpatialNum);
23162316
2317− pCodingParam->iCountThreadsNum = WELS_MIN (kiCpuCores, iMaxSliceCount);
2318− pCodingParam->iMultipleThreadIdc = pCodingParam->iCountThreadsNum;
2317+ pCodingParam->iCountThreadsNum = WELS_MIN (kiCpuCores, iMaxSliceCount);
2318+ pCodingParam->iMultipleThreadIdc = pCodingParam->iCountThreadsNum;
23192319 if (pCodingParam->iLoopFilterDisableIdc == 0
23202320 && pCodingParam->iMultipleThreadIdc != 1) // Loop filter requested to be enabled, with threading enabled
23212321 pCodingParam->iLoopFilterDisableIdc =
23222322 2; // Disable loop filter on slice boundaries since that's not allowed with multithreading
2323− *pMaxSliceCount = iMaxSliceCount;
2323+ *pMaxSliceCount = iMaxSliceCount;
23242324
23252325 return ENC_RETURN_SUCCESS;
23262326 }
@@ -2378,9 +2378,8 @@ void OutputCpuFeaturesLog (SLogContext* pLogCtx, uint32_t uiCpuFeatureFlags, uin · 51 unmodified lines
23782378 int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t& iSliceNum,
23792379 int32_t& iCacheLineSize, uint32_t& uiCpuFeatureFlags) {
23802380 // for cpu features detection, Only detect once??
2381− int32_t uiCpuCores =
2382− 0; // number of logic processors on physical processor package, zero logic processors means HTT not supported
2383− uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
2381+ int32_t uiCpuCores = 0; // number of logic processors on physical processor package, zero logic processors means HTT not supported
2382+ uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
23842383
23852384 #ifdef X86_ASM
23862385 if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_128)
@@ -2388,12 +2387,12 @@ int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCoding · 1 unmodified line
23882387 else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_64)
23892388 iCacheLineSize = 64;
23902389 else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_32)
2391− iCacheLineSize = 32;
2390+ iCacheLineSize = 32;
23922391 else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_16)
2393− iCacheLineSize = 16;
2392+ iCacheLineSize = 16;
23942393 OutputCpuFeaturesLog (pLogCtx, uiCpuFeatureFlags, uiCpuCores, iCacheLineSize);
23952394 #else
2396− iCacheLineSize = 16; // 16 bytes aligned in default
2395+ iCacheLineSize = 16; // 16 bytes aligned in default
23972396 #endif//X86_ASM
23982397
23992398 #if defined(DYNAMIC_DETECT_CPU_CORES)
@@ -2405,14 +2404,14 @@ int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCoding · 5 unmodified lines
24052404 uiCpuCores = DynamicDetectCpuCores();
24062405 // So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms,
24072406 // for client application here it is constrained by maximal to MAX_THREADS_NUM
2408− if (uiCpuCores > MAX_THREADS_NUM) // MAX_THREADS_NUM
2409− uiCpuCores = MAX_THREADS_NUM; // MAX_THREADS_NUM
2410− else if (uiCpuCores < 1) // just for safe
2411− uiCpuCores = 1;
2407+ if (uiCpuCores > MAX_THREADS_NUM) // MAX_THREADS_NUM
2408+ uiCpuCores = MAX_THREADS_NUM; // MAX_THREADS_NUM
2409+ else if (uiCpuCores < 1) // just for safe
2410+ uiCpuCores = 1;
24122411 }
24132412 #endif//DYNAMIC_DETECT_CPU_CORES
24142413
2415− uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
2414+ uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
24162415
24172416 if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) {
24182417 WelsLog (pLogCtx, WELS_LOG_ERROR, "GetMultipleThreadIdc(), InitSliceSettings failed.");
@@ -2440,12 +2439,12 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 21 unmodified lines
24402439 return 1;
24412440 }
24422441
2443− iRet = ParamValidationExt (pLogCtx, pCodingParam);
2442+ iRet = ParamValidationExt (pLogCtx, pCodingParam);
24442443 if (iRet != 0) {
24452444 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), ParamValidationExt failed return %d.", iRet);
24462445 return iRet;
24472446 }
2448− iRet = pCodingParam->DetermineTemporalSettings();
2447+ iRet = pCodingParam->DetermineTemporalSettings();
24492448 if (iRet != ENC_RETURN_SUCCESS) {
24502449 WelsLog (pLogCtx, WELS_LOG_ERROR,
24512450 "WelsInitEncoderExt(), DetermineTemporalSettings failed return %d (check in/out frame rate and temporal layer setting! -- in/out = 2^x, x <= temppral_layer_num)",
@@ -2459,9 +2458,9 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 7 unmodified lines
24592458 }
24602459
24612460
2462− *ppCtx = NULL;
2461+ *ppCtx = NULL;
24632462
2464− pCtx = static_cast<sWelsEncCtx*> (malloc (sizeof (sWelsEncCtx)));
2463+ pCtx = static_cast<sWelsEncCtx*> (malloc (sizeof (sWelsEncCtx)));
24652464
24662465 WELS_VERIFY_RETURN_IF (1, (NULL == pCtx))
24672466 memset (pCtx, 0, sizeof (sWelsEncCtx));
@@ -2485,8 +2484,8 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 17 unmodified lines
24852484 }
24862485 InitFunctionPointers (pCtx, pCtx->pSvcParam, uiCpuFeatureFlags);
24872486
2488− pCtx->iActiveThreadsNum = pCodingParam->iCountThreadsNum;
2489− pCtx->iMaxSliceCount = iSliceNum;
2487+ pCtx->iActiveThreadsNum = pCodingParam->iCountThreadsNum;
2488+ pCtx->iMaxSliceCount = iSliceNum;
24902489 iRet = RequestMemorySvc (&pCtx, pExistingParasetList);
24912490 if (iRet != 0) {
24922491 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), RequestMemorySvc failed return %d.", iRet);
@@ -2528,7 +2527,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 35 unmodified lines
25282527
25292528 pCtx->iStatisticsLogInterval = STATISTICS_LOG_INTERVAL_MS;
25302529
2531− *ppCtx = pCtx;
2530+ *ppCtx = pCtx;
25322531
25332532 WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsInitEncoderExt(), pCtx= 0x%p.", (void*)pCtx);
25342533
@@ -2663,7 +2662,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 128 unmodified lines
26632662 * \brief get temporal level due to configuration and coding context
26642663 */
26652664 int32_t GetTemporalLevel (SSpatialLayerInternal* fDlp, const int32_t kiFrameNum, const int32_t kiGopSize) {
2666− const int32_t kiCodingIdx = kiFrameNum & (kiGopSize - 1);
2665+ const int32_t kiCodingIdx = kiFrameNum & (kiGopSize - 1);
26672666
26682667 return fDlp->uiCodingIdx2TemporalId[kiCodingIdx];
26692668 }
@@ -2687,7 +2686,7 @@ void DynslcUpdateMbNeighbourInfoListForAllSlices (SSliceCtx* pSliceCtx, SMB* pMb · 17 unmodified lines
26872686 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
26882687
26892688 uiSliceIdc = WelsMbToSliceIdc (pSliceCtx, kiMbXY);
2690− pMb->uiSliceIdc = uiSliceIdc;
2689+ pMb->uiSliceIdc = uiSliceIdc;
26912690 iLeftXY = kiMbXY - 1;
26922691 iTopXY = kiMbXY - kiMbWidth;
26932692 iLeftTopXY = iTopXY - 1;
@@ -2710,7 +2709,7 @@ void DynslcUpdateMbNeighbourInfoListForAllSlices (SSliceCtx* pSliceCtx, SMB* pMb · 16 unmodified lines
27102709 if (bRightTop) {
27112710 uiNeighborAvailFlag |= TOPRIGHT_MB_POS;
27122711 }
2713− pMb->uiNeighborAvail = (uint8_t)uiNeighborAvailFlag;
2712+ pMb->uiNeighborAvail = (uint8_t)uiNeighborAvailFlag;
27142713
27152714 ++ iIdx;
27162715 } while (iIdx <= kiEndMbInSlice);
@@ -2720,9 +2719,9 @@ void DynslcUpdateMbNeighbourInfoListForAllSlices (SSliceCtx* pSliceCtx, SMB* pMb · 3 unmodified lines
27202719 * TUNE back if number of picture partition decision algorithm based on past if available
27212720 */
27222721 int32_t PicPartitionNumDecision (sWelsEncCtx* pCtx) {
2723− int32_t iPartitionNum = 1;
2722+ int32_t iPartitionNum = 1;
27242723 if (pCtx->pSvcParam->iMultipleThreadIdc > 1) {
2725− iPartitionNum = pCtx->pSvcParam->iCountThreadsNum;
2724+ iPartitionNum = pCtx->pSvcParam->iCountThreadsNum;
27262725 }
27272726 return iPartitionNum;
27282727 }
@@ -2744,25 +2743,25 @@ void UpdateSlicepEncCtxWithPartition (SSliceCtx* pSliceCtx, int32_t iPartitionNu · 15 unmodified lines
27442743 int32_t i/*, j*/;
27452744
27462745 if (iPartitionNum <= 0)
2747− iPartitionNum = 1;
2746+ iPartitionNum = 1;
27482747 else if (iPartitionNum > AVERSLICENUM_CONSTRAINT)
2749− iPartitionNum = AVERSLICENUM_CONSTRAINT; // AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO
2750− iCountMbNumPerPartition /= iPartitionNum;
2751− pSliceCtx->iSliceNumInFrame = iPartitionNum;
2748+ iPartitionNum = AVERSLICENUM_CONSTRAINT; // AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO
2749+ iCountMbNumPerPartition /= iPartitionNum;
2750+ pSliceCtx->iSliceNumInFrame = iPartitionNum;
27522751 i = 0;
27532752 while (i < iPartitionNum) {
27542753 if (i + 1 == iPartitionNum) {
2755− pSliceCtx->pCountMbNumInSlice[i] = iAssignableMbLeft;
2754+ pSliceCtx->pCountMbNumInSlice[i] = iAssignableMbLeft;
27562755 } else {
2757− pSliceCtx->pCountMbNumInSlice[i] = iCountMbNumPerPartition;
2756+ pSliceCtx->pCountMbNumInSlice[i] = iCountMbNumPerPartition;
27582757 }
2759− pSliceCtx->pFirstMbInSlice[i] = iFirstMbIdx;
2758+ pSliceCtx->pFirstMbInSlice[i] = iFirstMbIdx;
27602759
27612760 WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdx, i,
27622761 pSliceCtx->pCountMbNumInSlice[i], sizeof (uint16_t));
27632762
27642763 // for next partition(or pSlice)
2765− iFirstMbIdx += pSliceCtx->pCountMbNumInSlice[i];
2764+ iFirstMbIdx += pSliceCtx->pCountMbNumInSlice[i];
27662765 iAssignableMbLeft -= pSliceCtx->pCountMbNumInSlice[i];
27672766 ++ i;
27682767 }
@@ -2843,7 +2842,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 74 unmodified lines
28432842 if (NULL == pCurDq)
28442843 return;
28452844
2846− pCurDq->pDecPic = pDecPic;
2845+ pCurDq->pDecPic = pDecPic;
28472846
28482847 if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE) // need get extra slices for update
28492848 iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceCfg);
@@ -2900,7 +2899,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 50 unmodified lines
29002899 iIdx = 1;
29012900 while (iIdx < iSliceCount) {
29022901 ++ pSlice;
2903− pSlice->bSliceHeaderExtFlag = pBaseSlice->bSliceHeaderExtFlag;
2902+ pSlice->bSliceHeaderExtFlag = pBaseSlice->bSliceHeaderExtFlag;
29042903 ++ iIdx;
29052904 }
29062905
@@ -2920,9 +2919,9 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 13 unmodified lines
29202919 pCurDq->iCsStride[2] = pDecPic->iLineSize[2];
29212920
29222921 if (pCurDq->pRefLayer != NULL) {
2923− pCurDq->bBaseLayerAvailableFlag = true;
2922+ pCurDq->bBaseLayerAvailableFlag = true;
29242923 } else {
2925− pCurDq->bBaseLayerAvailableFlag = false;
2924+ pCurDq->bBaseLayerAvailableFlag = false;
29262925 }
29272926 }
29282927
@@ -3018,7 +3017,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 89 unmodified lines
30183017 pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaaOnScreen;
30193018
30203019 //ME related func pointers
3021− SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
3020+ SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
30223021 if (pVaaExt->sScrollDetectInfo.bScrollDetectFlag
30233022 && (pVaaExt->sScrollDetectInfo.iScrollMvX | pVaaExt->sScrollDetectInfo.iScrollMvY)) {
30243023 pFuncList->pfSetScrollingMv = SetScrollingMvToMd;
@@ -3039,7 +3038,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 14 unmodified lines
30393038 pFeatureSearchPreparation->iHighFreMbCount = 0;
30403039
30413040 //calculate bFMESwitchFlag
3042− SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
3041+ SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
30433042 const int32_t kiMbSize = pCurLayer->iMbHeight * pCurLayer->iMbWidth;
30443043 pFeatureSearchPreparation->bFMESwitchFlag = CalcFMESwitchFlag (pFeatureSearchPreparation->uiFMEGoodFrameCount,
30453044 pFeatureSearchPreparation->iHighFreMbCount * 100 / kiMbSize, pCtx->pVaa->sVaaCalcInfo.iFrameSad / kiMbSize,
@@ -3120,7 +3119,7 @@ static inline void PrefetchReferencePicture (sWelsEncCtx* pCtx, const EVideoFram · 74 unmodified lines
31203119
31213120 iIdx = 0;
31223121 while (iIdx < kiSliceCount) {
3123− pSliceBase->sSliceHeaderExt.sSliceHeader.uiRefIndex = uiRefIdx;
3122+ pSliceBase->sSliceHeaderExt.sSliceHeader.uiRefIndex = uiRefIdx;
31243123 ++ pSliceBase;
31253124 ++ iIdx;
31263125 }
@@ -3144,7 +3143,7 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 17 unmodified lines
31443143 uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs;
31453144
31463145 //update current layer's pCodingParam
3147− sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs -
3146+ sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs -
31483147 kiEncId; //for current parameter set, change its id_delta
31493148 //write pso pData for next update:
31503149 sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id
@@ -3160,7 +3159,7 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 9 unmodified lines
31603159 }
31613160
31623161 int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNalSize) {
3163− int iNal = pCtx->pOut->iNalIndex;
3162+ int iNal = pCtx->pOut->iNalIndex;
31643163 WelsLoadNal (pCtx->pOut, NAL_UNIT_SPS, NRI_PRI_HIGHEST);
31653164
31663165 WelsWriteSpsNal (&pCtx->pSpsArray[kiSpsIdx], &pCtx->pOut->sBsWrite,
@@ -3173,13 +3172,13 @@ int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNa · 6 unmodified lines
31733172 &iNalSize);
31743173 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
31753174
3176− pCtx->iPosBsBuffer += iNalSize;
3175+ pCtx->iPosBsBuffer += iNalSize;
31773176 return ENC_RETURN_SUCCESS;
31783177 }
31793178
31803179 int32_t WelsWriteOnePPS (sWelsEncCtx* pCtx, const int32_t kiPpsIdx, int32_t& iNalSize) {
31813180 //TODO
3182− int32_t iNal = pCtx->pOut->iNalIndex;
3181+ int32_t iNal = pCtx->pOut->iNalIndex;
31833182 /* generate picture parameter set */
31843183 WelsLoadNal (pCtx->pOut, NAL_UNIT_PPS, NRI_PRI_HIGHEST);
31853184 WelsWritePpsSyntax (&pCtx->pPPSArray[kiPpsIdx], &pCtx->pOut->sBsWrite,
@@ -3192,7 +3191,7 @@ int32_t WelsWriteOnePPS (sWelsEncCtx* pCtx, const int32_t kiPpsIdx, int32_t& iNa · 6 unmodified lines
31923191 &iNalSize);
31933192 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
31943193
3195− pCtx->iPosBsBuffer += iNalSize;
3194+ pCtx->iPosBsBuffer += iNalSize;
31963195 return ENC_RETURN_SUCCESS;
31973196 }
31983197
@@ -3254,12 +3253,12 @@ int32_t WelsWriteParameterSets (sWelsEncCtx* pCtx, int32_t* pNalLen, int32_t* pN · 55 unmodified lines
32543253 }
32553254
32563255 /* generate sequence parameters set */
3257− iId = (SPS_LISTING & pCtx->pSvcParam->eSpsPpsIdStrategy) ? iIdx : 0;
3256+ iId = (SPS_LISTING & pCtx->pSvcParam->eSpsPpsIdStrategy) ? iIdx : 0;
32583257
32593258 WelsWriteOneSPS (pCtx, iId, iNalLength);
32603259
32613260 pNalLen[iCountNal] = iNalLength;
3262− iSize += iNalLength;
3261+ iSize += iNalLength;
32633262
32643263 ++ iIdx;
32653264 ++ iCountNal;
@@ -3268,7 +3267,7 @@ int32_t WelsWriteParameterSets (sWelsEncCtx* pCtx, int32_t* pNalLen, int32_t* pN · 2 unmodified lines
32683267 /* write all Subset SPS */
32693268 iIdx = 0;
32703269 while (iIdx < pCtx->iSubsetSpsNum) {
3271− iNal = pCtx->pOut->iNalIndex;
3270+ iNal = pCtx->pOut->iNalIndex;
32723271
32733272 if (INCREASING_ID == pCtx->pSvcParam->eSpsPpsIdStrategy) {
32743273 #if _DEBUG
@@ -3281,7 +3280,7 @@ int32_t WelsWriteParameterSets (sWelsEncCtx* pCtx, int32_t* pNalLen, int32_t* pN · 6 unmodified lines
32813280 MAX_SPS_COUNT);
32823281 }
32833282
3284− iId = iIdx;
3283+ iId = iIdx;
32853284
32863285 /* generate Subset SPS */
32873286 WelsLoadNal (pCtx->pOut, NAL_UNIT_SUBSET_SPS, NRI_PRI_HIGHEST);
@@ -3320,7 +3319,7 @@ int32_t WelsWriteParameterSets (sWelsEncCtx* pCtx, int32_t* pNalLen, int32_t* pN · 32 unmodified lines
33203319 WelsWriteOnePPS (pCtx, iIdx, iNalLength);
33213320
33223321 pNalLen[iCountNal] = iNalLength;
3323− iSize += iNalLength;
3322+ iSize += iNalLength;
33243323
33253324 ++ iIdx;
33263325 ++ iCountNal;
@@ -3357,7 +3356,7 @@ static inline int32_t AddPrefixNal (sWelsEncCtx* pCtx, · 30 unmodified lines
33573356 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
33583357 iPayloadSize = pNalLen[*pNalIdxInLayer];
33593358
3360− pCtx->iPosBsBuffer += iPayloadSize;
3359+ pCtx->iPosBsBuffer += iPayloadSize;
33613360
33623361 (*pNalIdxInLayer) ++;
33633362 } else { // No Prefix NAL Unit RBSP syntax here, but need add NAL Unit Header extension
@@ -3373,7 +3372,7 @@ static inline int32_t AddPrefixNal (sWelsEncCtx* pCtx, · 9 unmodified lines
33733372 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
33743373 iPayloadSize = pNalLen[*pNalIdxInLayer];
33753374
3376− pCtx->iPosBsBuffer += iPayloadSize;
3375+ pCtx->iPosBsBuffer += iPayloadSize;
33773376
33783377 (*pNalIdxInLayer) ++;
33793378 }
@@ -3429,7 +3428,7 @@ int32_t ForceCodingIDR (sWelsEncCtx* pCtx) { · 49 unmodified lines
34293428 return 1;
34303429
34313430 pCtx->bEncCurFrmAsIdrFlag = true;
3432− pCtx->iCodingIndex = 0;
3431+ pCtx->iCodingIndex = 0;
34333432 pCtx->bCheckWindowStatusRefreshFlag = false;
34343433 return 0;
34353434 }
@@ -3707,9 +3706,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 271 unmodified lines
37073706 int32_t i = 0, j = 0, k = 0;
37083707 #endif//_DEBUG
37093708
3710− pCtx->iEncoderError = ENC_RETURN_SUCCESS;
3711− pCtx->bCurFrameMarkedAsSceneLtr = false;
3712− pFbi->iLayerNum = 0; // for initialization
3709+ pCtx->iEncoderError = ENC_RETURN_SUCCESS;
3710+ pCtx->bCurFrameMarkedAsSceneLtr = false;
3711+ pFbi->iLayerNum = 0; // for initialization
37133712 pFbi->uiTimeStamp = pSrcPic->uiTimeStamp;
37143713 // perform csc/denoise/downsample/padding, generate spatial layers
37153714 iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);
@@ -3753,11 +3752,11 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 37 unmodified lines
37533752 pCtx->iContinualSkipFrames = 0;
37543753 InitFrameCoding (pCtx, eFrameType);
37553754
3756− iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex,
3755+ iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex,
37573756 pSvcParam->uiGopSize);
3758− pCtx->uiTemporalId = iCurTid;
3757+ pCtx->uiTemporalId = iCurTid;
37593758
3760− pLayerBsInfo->pBsBuf = pCtx->pFrameBs ;
3759+ pLayerBsInfo->pBsBuf = pCtx->pFrameBs ;
37613760 pLayerBsInfo->pNalLengthInByte = pCtx->pOut->pNalLen;
37623761
37633762 if (eFrameType == videoFrameTypeIDR) {
@@ -3807,8 +3806,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 43 unmodified lines
38073806 case SM_DYN_SLICE: {
38083807 int32_t iPicIPartitionNum = PicPartitionNumDecision (pCtx);
38093808 // MT compatibility
3810− pCtx->iActiveThreadsNum =
3811− iPicIPartitionNum; // we try to active number of threads, equal to number of picture partitions
3809+ pCtx->iActiveThreadsNum =
3810+ iPicIPartitionNum; // we try to active number of threads, equal to number of picture partitions
38123811 WelsInitCurrentDlayerMltslc (pCtx, iPicIPartitionNum);
38133812 break;
38143813 }
@@ -3818,8 +3817,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3 unmodified lines
38183817 }
38193818
38203819 /* coding each spatial layer, only one sQualityStat layer within spatial support */
3821− int32_t iSliceCount = 1;
3822− if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info writing as follows
3820+ int32_t iSliceCount = 1;
3821+ if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info writing as follows
38233822 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d)!", iLayerNum,
38243823 MAX_LAYER_NUM_OF_FRAME);
38253824 return ENC_RETURN_UNSUPPORTED_PARA;
@@ -3832,20 +3831,20 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 6 unmodified lines
38323831 (pSvcParam->iSpatialLayerNum > 1))));
38333832
38343833 if (eFrameType == videoFrameTypeP) {
3835− eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE : NAL_UNIT_CODED_SLICE_EXT;
3834+ eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE : NAL_UNIT_CODED_SLICE_EXT;
38363835 } else if (eFrameType == videoFrameTypeIDR) {
3837− eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE_IDR : NAL_UNIT_CODED_SLICE_EXT;
3836+ eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE_IDR : NAL_UNIT_CODED_SLICE_EXT;
38383837 }
38393838 if (iCurTid == 0 || pCtx->eSliceType == I_SLICE)
3840− eNalRefIdc = NRI_PRI_HIGHEST;
3839+ eNalRefIdc = NRI_PRI_HIGHEST;
38413840 else if (iCurTid == pSvcParam->iDecompStages)
3842− eNalRefIdc = NRI_PRI_LOWEST;
3841+ eNalRefIdc = NRI_PRI_LOWEST;
38433842 else if (1 + iCurTid == pSvcParam->iDecompStages)
3844− eNalRefIdc = NRI_PRI_LOW;
3845− else // more details for other temporal layers?
3846− eNalRefIdc = NRI_PRI_HIGHEST;
3847− pCtx->eNalType = eNalType;
3848− pCtx->eNalPriority = eNalRefIdc;
3843+ eNalRefIdc = NRI_PRI_LOW;
3844+ else // more details for other temporal layers?
3845+ eNalRefIdc = NRI_PRI_HIGHEST;
3846+ pCtx->eNalType = eNalType;
3847+ pCtx->eNalPriority = eNalRefIdc;
38493848
38503849 pCtx->pDecPic = pCtx->ppRefPicListExt[iCurDid]->pNextBuffer;
38513850 #if defined(ENABLE_FRAME_DUMP) || defined(ENABLE_PSNR_CALC)
@@ -3887,11 +3886,11 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 35 unmodified lines
38873886 PreprocessSliceCoding (pCtx); // MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer()
38883887
38893888 //TODO Complexity Calculation here for screen content
3890− iLayerSize = 0;
3889+ iLayerSize = 0;
38913890
38923891 if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) { // only one slice within a sQualityStat layer
38933892 int32_t iSliceSize = 0;
3894− int32_t iPayloadSize = 0;
3893+ int32_t iPayloadSize = 0;
38953894
38963895 if (pCtx->bNeedPrefixNalFlag) {
38973896 pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType,
@@ -3935,8 +3934,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 37 unmodified lines
39353934 int32_t iRet = 0;
39363935 // THREAD_FULLY_FIRE_MODE/THREAD_PICK_UP_MODE for any mode of non-SM_DYN_SLICE
39373936 if ((SM_DYN_SLICE != pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
3938− iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
3939− if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed
3937+ iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
3938+ if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed
39403939 WelsLog (pLogCtx, WELS_LOG_ERROR,
39413940 "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d) at iDid= %d uiSliceMode= %d, iSliceCount= %d!",
39423941 iLayerNum, MAX_LAYER_NUM_OF_FRAME, iCurDid, pParam->sSliceCfg.uiSliceMode, iSliceCount);
@@ -3954,7 +3953,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 11 unmodified lines
39543953 int64_t t_bs_append = 0;
39553954 #endif
39563955
3957− pCtx->iActiveThreadsNum = iSliceCount;
3956+ pCtx->iActiveThreadsNum = iSliceCount;
39583957 // to fire slice coding threads
39593958 iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
39603959 &pCtx->pSliceThreading->pReadySliceCodingEvent[0],
@@ -4011,8 +4010,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 50 unmodified lines
40114010 while (1) {
40124011 if (iIndexOfSliceToBeCoded >= iSliceCount && iNumThreadsRunning <= 0)
40134012 break;
4014− WELS_THREAD_ERROR_CODE lwait = 0;
4015− int32_t iEventId = -1;
4013+ WELS_THREAD_ERROR_CODE lwait = 0;
4014+ int32_t iEventId = -1;
40164015
40174016 lwait = WelsMultipleEventsWaitSingleBlocking (iNumThreadsScheduled,
40184017 &pCtx->pSliceThreading->pSliceCodedEvent[0],
@@ -4022,7 +4021,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3 unmodified lines
40224021 if (iIndexOfSliceToBeCoded < iSliceCount) {
40234022 // pick up succeeding slice for threading
40244023 // thread_id equal to iEventId per implementation here
4025− pCtx->pSliceThreading->pThreadPEncCtx[iEventId].iSliceIndex = iIndexOfSliceToBeCoded;
4024+ pCtx->pSliceThreading->pThreadPEncCtx[iEventId].iSliceIndex = iIndexOfSliceToBeCoded;
40264025 WelsEventSignal (&pCtx->pSliceThreading->pReadySliceCodingEvent[iEventId]);
40274026 WelsEventSignal (&pCtx->pSliceThreading->pThreadMasterEvent[iEventId]);
40284027
@@ -4040,7 +4039,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 11 unmodified lines
40404039 }
40414040 // THREAD_FULLY_FIRE_MODE && SM_DYN_SLICE
40424041 else if ((SM_DYN_SLICE == pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
4043− const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum; //pSvcParam->iCountThreadsNum;
4042+ const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum; //pSvcParam->iCountThreadsNum;
40444043
40454044 // to fire slice coding threads
40464045 iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
@@ -4059,11 +4058,11 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 12 unmodified lines
40594058 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
40604059
40614060 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, kiPartitionCnt);
4062− } else { // for non-dynamic-slicing mode single threading branch..
4063− const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
4064− int32_t iSliceIdx = 0;
4061+ } else { // for non-dynamic-slicing mode single threading branch..
4062+ const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
4063+ int32_t iSliceIdx = 0;
40654064
4066− iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
4065+ iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
40674066 while (iSliceIdx < iSliceCount) {
40684067 int32_t iSliceSize = 0;
40694068 int32_t iPayloadSize = 0;
@@ -4161,19 +4160,19 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 91 unmodified lines
41614160 #endif//ENABLE_FRAME_DUMP
41624161
41634162 #if defined(ENABLE_PSNR_CALC)
4164− fSnrY = WelsCalcPsnr (fsnr->pData[0],
4163+ fSnrY = WelsCalcPsnr (fsnr->pData[0],
41654164 fsnr->iLineSize[0],
41664165 pEncPic->pData[0],
41674166 pEncPic->iLineSize[0],
41684167 iCurWidth,
41694168 iCurHeight);
4170− fSnrU = WelsCalcPsnr (fsnr->pData[1],
4169+ fSnrU = WelsCalcPsnr (fsnr->pData[1],
41714170 fsnr->iLineSize[1],
41724171 pEncPic->pData[1],
41734172 pEncPic->iLineSize[1],
41744173 (iCurWidth >> 1),
41754174 (iCurHeight >> 1));
4176− fSnrV = WelsCalcPsnr (fsnr->pData[2],
4175+ fSnrV = WelsCalcPsnr (fsnr->pData[2],
41774176 fsnr->iLineSize[2],
41784177 pEncPic->pData[2],
41794178 pEncPic->iLineSize[2],
@@ -4231,8 +4230,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 51 unmodified lines
42314230
42324231 #endif//MB_TYPES_CHECK
42334232 {
4234− ++ pCtx->sStatData[iCurDid][0].sSliceData.iSliceCount[pCtx->eSliceType]; // for multiple slices coding
4235− pCtx->sStatData[iCurDid][0].sSliceData.iSliceSize[pCtx->eSliceType] += (iLayerSize << 3); // bits
4233+ ++ pCtx->sStatData[iCurDid][0].sSliceData.iSliceCount[pCtx->eSliceType]; // for multiple slices coding
4234+ pCtx->sStatData[iCurDid][0].sSliceData.iSliceSize[pCtx->eSliceType] += (iLayerSize << 3); // bits
42364235 }
42374236 #endif//STAT_OUTPUT
42384237
@@ -4240,7 +4239,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 1 unmodified line
42404239 ++ iLayerNum;
42414240 ++ pLayerBsInfo;
42424241
4243− pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
4242+ pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
42444243 pLayerBsInfo->pNalLengthInByte = (pLayerBsInfo - 1)->pNalLengthInByte + iCountNal;
42454244
42464245 if (pSvcParam->iPaddingFlag && pCtx->pWelsSvcRc[pCtx->uiDependencyId].iPaddingSize > 0) {
@@ -4334,8 +4333,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 87 unmodified lines
43344333 }
43354334
43364335 ++ pCtx->iCodingIndex;
4337− pCtx->eLastNalPriority = eNalRefIdc;
4338− pFbi->iLayerNum = iLayerNum;
4336+ pCtx->eLastNalPriority = eNalRefIdc;
4337+ pFbi->iLayerNum = iLayerNum;
43394338 pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
43404339
43414340 WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iSubSeqId = %d,iFrameSize = %d",
@@ -4383,19 +4382,19 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 41 unmodified lines
43834382 * SVC adjustment results in new requirement in memory blocks adjustment
43844383 */
43854384 int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewParam) {
4386− SWelsSvcCodingParam* pOldParam = NULL;
4385+ SWelsSvcCodingParam* pOldParam = NULL;
43874386 int32_t iReturn = ENC_RETURN_SUCCESS;
43884387 int8_t iIndexD = 0;
43894388 bool bNeedReset = false;
4390− int16_t iSliceNum = 1; // number of slices used
4391− int32_t iCacheLineSize = 16; // on chip cache line size in byte
4389+ int16_t iSliceNum = 1; // number of slices used
4390+ int32_t iCacheLineSize = 16; // on chip cache line size in byte
43924391 uint32_t uiCpuFeatureFlags = 0;
43934392
4394− if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam) return 1;
4393+ if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam) return 1;
43954394
43964395 /* Check validation in new parameters */
4397− iReturn = ParamValidationExt (& (*ppCtx)->sLogCtx, pNewParam);
4398− if (iReturn != ENC_RETURN_SUCCESS) return iReturn;
4396+ iReturn = ParamValidationExt (& (*ppCtx)->sLogCtx, pNewParam);
4397+ if (iReturn != ENC_RETURN_SUCCESS) return iReturn;
43994398
44004399 iReturn = GetMultipleThreadIdc (& (*ppCtx)->sLogCtx, pNewParam, iSliceNum, iCacheLineSize, uiCpuFeatureFlags);
44014400 if (iReturn != ENC_RETURN_SUCCESS) {
@@ -4404,7 +4403,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 2 unmodified lines
44044403 return iReturn;
44054404 }
44064405
4407− pOldParam = (*ppCtx)->pSvcParam;
4406+ pOldParam = (*ppCtx)->pSvcParam;
44084407
44094408 if (pOldParam->iUsageType != pNewParam->iUsageType) {
44104409 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR,
@@ -4446,7 +4445,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 35 unmodified lines
44464445 pOldParam->sSpatialLayers[iIndexD].iVideoHeight != pNewParam->sSpatialLayers[iIndexD].iVideoHeight ||
44474446 kpOldDlp->iActualWidth != kpNewDlp->iActualWidth ||
44484447 kpOldDlp->iActualHeight != kpNewDlp->iActualHeight) {
4449− bNeedReset = true;
4448+ bNeedReset = true;
44504449 break;
44514450 }
44524451
@@ -4454,7 +4453,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 1 unmodified line
44544453 ||
44554454 pOldParam->sSpatialLayers[iIndexD].sSliceCfg.sSliceArgument.uiSliceNum !=
44564455 pNewParam->sSpatialLayers[iIndexD].sSliceCfg.sSliceArgument.uiSliceNum) {
4457− bNeedReset = true;
4456+ bNeedReset = true;
44584457 break;
44594458 }
44604459
@@ -4576,17 +4575,17 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 115 unmodified lines
45764575 }
45774576 pOldParam->iDecompStages = pNewParam->iDecompStages;
45784577 /* denoise control */
4579− pOldParam->bEnableDenoise = pNewParam->bEnableDenoise;
4578+ pOldParam->bEnableDenoise = pNewParam->bEnableDenoise;
45804579
45814580 /* background detection control */
4582− pOldParam->bEnableBackgroundDetection = pNewParam->bEnableBackgroundDetection;
4581+ pOldParam->bEnableBackgroundDetection = pNewParam->bEnableBackgroundDetection;
45834582
45844583 /* adaptive quantization control */
4585− pOldParam->bEnableAdaptiveQuant = pNewParam->bEnableAdaptiveQuant;
4584+ pOldParam->bEnableAdaptiveQuant = pNewParam->bEnableAdaptiveQuant;
45864585
45874586 /* int32_t term reference control */
4588− pOldParam->bEnableLongTermReference = pNewParam->bEnableLongTermReference;
4589− pOldParam->iLtrMarkPeriod = pNewParam->iLtrMarkPeriod;
4587+ pOldParam->bEnableLongTermReference = pNewParam->bEnableLongTermReference;
4588+ pOldParam->iLtrMarkPeriod = pNewParam->iLtrMarkPeriod;
45904589
45914590 // keep below values unchanged as before
45924591 pOldParam->bEnableSSEI = pNewParam->bEnableSSEI;
@@ -4606,7 +4605,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 13 unmodified lines
46064605 pOldParam->iPaddingFlag = pNewParam->iPaddingFlag;
46074606
46084607 /* Layer definition */
4609− pOldParam->bPrefixNalAddingCtrl = pNewParam->bPrefixNalAddingCtrl;
4608+ pOldParam->bPrefixNalAddingCtrl = pNewParam->bPrefixNalAddingCtrl;
46104609
46114610 // d
46124611 iIndexD = 0;
@@ -4641,13 +4640,13 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 28 unmodified lines
46414640 }
46424641
46434642 int32_t WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue) {
4644− SWelsSvcCodingParam sConfig;
4643+ SWelsSvcCodingParam sConfig;
46454644 int32_t iNumRefFrame = 1;
46464645 int32_t iRet = 0;
46474646 memcpy (&sConfig, (*ppCtx)->pSvcParam, sizeof (SWelsSvcCodingParam));
46484647 sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference;
46494648 sConfig.iLTRRefNum = pLTRValue->iLTRRefNum;
4650− int32_t uiGopSize = 1 << (sConfig.iTemporalLayerNum - 1);
4649+ int32_t uiGopSize = 1 << (sConfig.iTemporalLayerNum - 1);
46514650 if (sConfig.iUsageType == SCREEN_CONTENT_REAL_TIME) {
46524651 if (sConfig.bEnableLongTermReference) {
46534652 sConfig.iLTRRefNum = LONG_TERM_REF_NUM_SCREEN;//WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
@@ -4662,9 +4661,9 @@ int32_t WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConf · 8 unmodified lines
46624661 } else {
46634662 sConfig.iLTRRefNum = 0;
46644663 }
4665− iNumRefFrame = ((uiGopSize >> 1) > 1) ? ((uiGopSize >> 1) + sConfig.iLTRRefNum) : (MIN_REF_PIC_COUNT +
4664+ iNumRefFrame = ((uiGopSize >> 1) > 1) ? ((uiGopSize >> 1) + sConfig.iLTRRefNum) : (MIN_REF_PIC_COUNT +
46664665 sConfig.iLTRRefNum);
4667− iNumRefFrame = WELS_CLIP3 (iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
4666+ iNumRefFrame = WELS_CLIP3 (iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
46684667
46694668 }
46704669 if (iNumRefFrame > sConfig.iMaxNumRefFrame) {
@@ -4803,7 +4802,7 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 132 unmodified lines
48034802 memcpy (pSlcingOverRc, pCtx->pWelsSvcRc[kiCurDid].pSlicingOverRc, sizeof (SRCSlicing) * iMaxSliceNumOld);
48044803 uiSliceIdx = iMaxSliceNumOld;
48054804 SRCSlicing* pSORC = &pSlcingOverRc[uiSliceIdx];
4806− const int32_t kiBitsPerMb = WELS_DIV_ROUND (pCtx->pWelsSvcRc[kiCurDid].iTargetBits * INT_MULTIPLY,
4805+ const int32_t kiBitsPerMb = WELS_DIV_ROUND (pCtx->pWelsSvcRc[kiCurDid].iTargetBits * INT_MULTIPLY,
48074806 pCtx->pWelsSvcRc[kiCurDid].iNumberMbFrame);
48084807 while (uiSliceIdx < iMaxSliceNum) {
48094808 pSORC->iComplexityIndexSlice = 0;

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