History

Use bool instead of bool_t

bool is one of the built in, standard types in C++, there's no need for a typedef for it.

Martin Storsjö committed 12 years ago

Commit 2b77fe71 parent 17d7b5d82 files · +468 −471Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+25−25
@@ -636,10 +636,10 @@ static void InitMbInfo (sWelsEncCtx* pEnc, SMB* pList, SDqLayer* pLayer, con · 635 unmodified lines
636636 &pEnc->pRefIndexBlock4x4[MB_BLOCK8x8_NUM * kiOffset]);
637637
638638 for (iIdx = 0; iIdx < iMbNum; iIdx++) {
639− bool_t bLeft;
640− bool_t bTop;
641− bool_t bLeftTop;
642− bool_t bRightTop;
639+ bool bLeft;
640+ bool bTop;
641+ bool bLeftTop;
642+ bool bRightTop;
643643 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
644644 uint8_t uiSliceIdc;
645645
@@ -740,7 +740,7 @@ int32_t AllocMbCacheAligned (SMbCache* pMbCache, CMemoryAlign* pMa) { · 94 unmodified lines
740740 WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pMemPredBlk4));
741741 pMbCache->pBufferInterPredMe = (uint8_t*)pMa->WelsMalloc (4 * 640 * sizeof (uint8_t), "pMbCache->pBufferInterPredMe");
742742 WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pBufferInterPredMe));
743− pMbCache->pPrevIntra4x4PredModeFlag = (bool_t*)pMa->WelsMalloc (16 * sizeof (bool_t),
743+ pMbCache->pPrevIntra4x4PredModeFlag = (bool*)pMa->WelsMalloc (16 * sizeof (bool),
744744 "pMbCache->pPrevIntra4x4PredModeFlag");
745745 WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pPrevIntra4x4PredModeFlag));
746746 pMbCache->pRemIntra4x4PredModeFlag = (int8_t*)pMa->WelsMalloc (16 * sizeof (int8_t),
@@ -1000,7 +1000,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 253 unmodified lines
10001000 iDlayerIndex = 0;
10011001 while (iDlayerIndex < iDlayerCount) {
10021002 SDqIdc* pDqIdc = & (*ppCtx)->pDqIdcMap[iDlayerIndex];
1003− const bool_t bUseSubsetSps = (iDlayerIndex > BASE_DEPENDENCY_ID);
1003+ const bool bUseSubsetSps = (iDlayerIndex > BASE_DEPENDENCY_ID);
10041004 SDLayerParam* pDlayerParam = &pParam->sDependencyLayers[iDlayerIndex];
10051005
10061006 pDqIdc->uiSpatialId = iDlayerIndex;
@@ -1120,7 +1120,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 113 unmodified lines
11201120 // Adaptive size_cs, size_fdec by implementation dependency
11211121 iTemporalIdx = 0;
11221122 while (iTemporalIdx < iCntTid) {
1123− const bool_t kbBaseTemporalFlag = (iTemporalIdx == 0);
1123+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
11241124
11251125 iSpatialIdx = 0;
11261126 while (iSpatialIdx < kiNumSpatialLayers) {
@@ -1153,7 +1153,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 26 unmodified lines
11531153
11541154 iTemporalIdx = 0;
11551155 while (iTemporalIdx < iCntTid) {
1156− const bool_t kbBaseTemporalFlag = (iTemporalIdx == 0);
1156+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
11571157
11581158 iSpatialIdx = 0;
11591159 while (iSpatialIdx < iCountLayersNeedCs[kbBaseTemporalFlag]) {
@@ -1172,13 +1172,13 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 12 unmodified lines
11721172 }
11731173 iTemporalIdx = 0;
11741174 while (iTemporalIdx < iCntTid) {
1175− const bool_t kbBaseTemporalFlag = (iTemporalIdx == 0);
1175+ const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
11761176
11771177 iSpatialIdx = 0;
11781178 while (iSpatialIdx < kiNumSpatialLayers) {
11791179 int32_t iMatchIndex = 0;
1180− bool_t bInMap = false;
1181− bool_t bMatchFlag = false;
1180+ bool bInMap = false;
1181+ bool bMatchFlag = false;
11821182
11831183 i = 0;
11841184 while (i < iCountLayersNeedCs[kbBaseTemporalFlag]) {
@@ -1667,7 +1667,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 482 unmodified lines
16671667 while (ilayer < pParam->iNumDependencyLayer) {
16681668 SDqLayer* pDq = pCtx->ppDqLayerList[ilayer];
16691669 SDLayerParam* pDlp = &pCtx->pSvcParam->sDependencyLayers[ilayer];
1670− const bool_t kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sMso.uiSliceMode);
1670+ const bool kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sMso.uiSliceMode);
16711671
16721672 // pDq layers
16731673 if (NULL != pDq) {
@@ -2312,10 +2312,10 @@ void DynslcUpdateMbNeighbourInfoListForAllSlices (SSliceCtx* pSliceCtx, SMB* pMb · 638 unmodified lines
23122312 const int32_t kiMbXY = pMb->iMbXY;
23132313 const int32_t kiMbX = pMb->iMbX;
23142314 const int32_t kiMbY = pMb->iMbY;
2315− bool_t bLeft;
2316− bool_t bTop;
2317− bool_t bLeftTop;
2318− bool_t bRightTop;
2315+ bool bLeft;
2316+ bool bTop;
2317+ bool bLeftTop;
2318+ bool bRightTop;
23192319 int32_t uiSliceIdc;
23202320 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
23212321
@@ -2550,7 +2550,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 228 unmodified lines
25502550 SSlice* pBaseSlice = &pCurDq->sLayerInfo.pSliceInLayer[0];
25512551 SSlice* pSlice = NULL;
25522552 const uint8_t kiCurDid = pCtx->uiDependencyId;
2553− const bool_t kbUseSubsetSpsFlag = (kiCurDid > BASE_DEPENDENCY_ID);
2553+ const bool kbUseSubsetSpsFlag = (kiCurDid > BASE_DEPENDENCY_ID);
25542554 SDLayerParam* fDlp = &pParam->sDependencyLayers[kiCurDid];
25552555 SNalUnitHeaderExt* pNalHdExt = &pCurDq->sLayerInfo.sNalHeaderExt;
25562556 SNalUnitHeader* pNalHd = &pNalHdExt->sNalHeader;
@@ -2638,7 +2638,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 81 unmodified lines
26382638
26392639 void PreprocessSliceCoding (sWelsEncCtx* pCtx) {
26402640 SDqLayer* pCurLayer = pCtx->pCurDqLayer;
2641− const bool_t kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag;
2641+ const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag;
26422642
26432643 /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */
26442644
@@ -2766,7 +2766,7 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 121 unmodified lines
27662766
27672767 const int32_t kiEncId = kiCurEncoderParaSetId;
27682768 const uint32_t kuiPrevIdInBs = sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] + kiEncId;//mark current_id
2769− const bool_t* kpUsedIdPointer = &sParaSetOffsetVariable->bUsedParaSetIdInBs[0];
2769+ const bool* kpUsedIdPointer = &sParaSetOffsetVariable->bUsedParaSetIdInBs[0];
27702770 uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs;
27712771
27722772 #if _DEBUG
@@ -2817,7 +2817,7 @@ int32_t WelsWriteParameterSets (sWelsEncCtx* pCtx, int32_t* pNalLen, int32_t* pN · 44 unmodified lines
28172817 while (iIdx < pCtx->iSpsNum) {
28182818 SDqIdc* pDqIdc = &pCtx->pDqIdcMap[iIdx];
28192819 const int32_t kiDid = pDqIdc->uiSpatialId;
2820− const bool_t kbUsingSubsetSps = (kiDid > BASE_DEPENDENCY_ID);
2820+ const bool kbUsingSubsetSps = (kiDid > BASE_DEPENDENCY_ID);
28212821
28222822 iNal = pCtx->pOut->iNalIndex;
28232823
@@ -3009,7 +3009,7 @@ int32_t PostProcDynamicSlicingBsWriting (sWelsEncCtx* pCtx, SLayerBSInfo* pLayer · 185 unmodified lines
30093009 // uiSliceIdx: 0 1 2 3 4 5 6 7 8 9 10
30103010 iCheckingIdx = 0;
30113011 while (true) {
3012− bool_t bMatchFlag = false;
3012+ bool bMatchFlag = false;
30133013 iPartitionIdx = 0;
30143014 while (iPartitionIdx < kiPartitionCnt) {
30153015 const int32_t coded_slice_cnt = pCurDq->pNumSliceCodedOfPartition[iPartitionIdx];
@@ -3124,7 +3124,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur · 108 unmodified lines
31243124 EWelsNalRefIdc eNalRefIdc = NRI_PRI_LOWEST;
31253125 int8_t iCurDid = 0;
31263126 int8_t iCurTid = 0;
3127− bool_t bAvcBased = false;
3127+ bool bAvcBased = false;
31283128 #if defined(ENABLE_PSNR_CALC)
31293129 float snr_y = .0f, snr_u = .0f, snr_v = .0f;
31303130 #endif//ENABLE_PSNR_CALC
@@ -3531,7 +3531,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur · 400 unmodified lines
35313531 } else // for non-dynamic-slicing mode single threading branch..
35323532 #endif//MT_ENABLED
35333533 {
3534− const bool_t bNeedPrefix = pCtx->bNeedPrefixNalFlag;
3534+ const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
35353535 int32_t iSliceIdx = 0;
35363536
35373537 iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
@@ -3810,7 +3810,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 272 unmodified lines
38103810 SWelsSvcCodingParam* pOldParam = NULL;
38113811 int32_t iReturn = 0;
38123812 int8_t iIndexD = 0;
3813− bool_t bNeedReset = false;
3813+ bool bNeedReset = false;
38143814
38153815 if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam) return 1;
38163816
@@ -4006,7 +4006,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 189 unmodified lines
40064006 int32_t iAnyMbLeftInPartition = iEndMbInPartition - iFirstMbInPartition;
40074007 const EWelsNalUnitType keNalType = pCtx->eNalType;
40084008 const EWelsNalRefIdc keNalRefIdc = pCtx->eNalPriority;
4009− const bool_t kbNeedPrefix = pCtx->bNeedPrefixNalFlag;
4009+ const bool kbNeedPrefix = pCtx->bNeedPrefixNalFlag;
40104010
40114011 //init
40124012 {

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