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/decoder/core/src/decoder_core.cpp (1 of 82 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+19−19
@@ -105,7 +105,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 104 unmodified lines
105105 return 0;
106106 }
107107
108−inline bool_t CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool_t bStoreRefBasePicFlag,
108+inline bool CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool bStoreRefBasePicFlag,
109109 uint8_t uiDidMax, uint8_t uiLayerDqId, uint8_t uiTargetDqId) {
110110 return ((iCurDid == uiDidMax) && (iCurQid == BASE_QUALITY_ID) && (bStoreRefBasePicFlag)) // store base
111111 || (uiLayerDqId == uiTargetDqId); // target layer
@@ -201,7 +201,7 @@ int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) { · 89 unmodified lines
201201 }
202202
203203 int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSliceHeader pSh, PSps pSps,
204− const bool_t kbIdrFlag) {
204+ const bool kbIdrFlag) {
205205 PRefPicMarking const kpRefMarking = &pSh->sRefMarking;
206206
207207 if (kbIdrFlag) {
@@ -238,7 +238,7 @@ int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSli · 30 unmodified lines
238238 return ERR_NONE;
239239 }
240240
241−bool_t FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalExt) {
241+bool FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalExt) {
242242 if (pShExt == NULL || pNalExt == NULL)
243243 return false;
244244
@@ -392,7 +392,7 @@ int32_t CheckPpsId (PWelsDecoderContext pCtx, PPps* ppPps, uint32_t uiPpsId) { · 147 unmodified lines
392392 }
393393
394394 int32_t CheckSpsId (PWelsDecoderContext pCtx, PSubsetSps* ppSubsetSps, PSps* ppSps, int32_t iSpsId,
395− bool_t bExtensionFlag) {
395+ bool bExtensionFlag) {
396396 PSps pSpsList = pCtx->sSpsBuffer;
397397 PSubsetSps pSubspsList = pCtx->sSubsetSpsBuffer;
398398
@@ -455,7 +455,7 @@ int32_t CheckSpsId (PWelsDecoderContext pCtx, PSubsetSps* ppSubsetSps, PSps* ppS · 56 unmodified lines
455455 * decode_slice_header_avc
456456 * Parse slice header of bitstream in avc for storing data structure
457457 */
458−int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool_t kbExtensionFlag) {
458+int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool kbExtensionFlag) {
459459 PNalUnit const kpCurNal = pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiAvailUnitsNum - 1];
460460
461461 PNalUnitHeaderExt pNalHeaderExt = NULL;
@@ -469,8 +469,8 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 7 unmodified lines
469469 int32_t iRet = ERR_NONE;
470470 uint8_t uiSliceType = 0;
471471 uint8_t uiQualityId = BASE_QUALITY_ID;
472− bool_t bIdrFlag = false;
473− bool_t bSgChangeCycleInvolved = false; // involved slice group change cycle ?
472+ bool bIdrFlag = false;
473+ bool bSgChangeCycleInvolved = false; // involved slice group change cycle ?
474474
475475 if (kpCurNal == NULL) {
476476 return ERR_INFO_OUT_OF_MEMORY;
@@ -484,7 +484,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 7 unmodified lines
484484
485485 if (pSliceHeadExt) {
486486 SRefBasePicMarking sBaseMarking;
487− const bool_t kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
487+ const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
488488 memcpy (&sBaseMarking, &pSliceHeadExt->sRefBasePicMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
489489 memset (pSliceHeadExt, 0, sizeof (SSliceHeaderExt));
490490 pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag;
@@ -619,7 +619,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 128 unmodified lines
619619 if (kbExtensionFlag) {
620620 uiQualityId = pNalHeaderExt->uiQualityId;
621621 } else if (uiSliceType == P_SLICE || uiSliceType == SP_SLICE || uiSliceType == B_SLICE) {
622− const bool_t kbBipredFlag = (B_SLICE == uiSliceType);
622+ const bool kbBipredFlag = (B_SLICE == uiSliceType);
623623 if (kbBipredFlag) {
624624 WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): kbBipredFlag = 1 not supported.\n");
625625 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_BIPRED);
@@ -820,7 +820,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 194 unmodified lines
820820 * pSrc: mark as decoded prefix NAL
821821 * ppDst: succeeded VCL NAL based AVC (I/P Slice)
822822 */
823−bool_t PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
823+bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
824824 PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL;
825825 PSliceHeaderExt pShExtD = NULL;
826826 PPrefixNalUnit pPrefixS = NULL;
@@ -1297,7 +1297,7 @@ void_t RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerP · 470 unmodified lines
12971297 int32_t iCurNalDependId, iCurNalQualityId, iCurNalTId, iCurNalFrameNum, iCurNalPoc, iCurNalFirstMb, iCurIdx,
12981298 iFinalIdxNoInterLayerPred;
12991299
1300− bool_t bMultiSliceFind = false;
1300+ bool bMultiSliceFind = false;
13011301
13021302 iFinalIdxNoInterLayerPred = 0;
13031303 iCurIdx = *pIdxNoInterLayerPred - 1;
@@ -1332,7 +1332,7 @@ void_t RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerP · 28 unmodified lines
13321332 }
13331333 }
13341334
1335−bool_t CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerPred) {
1335+bool CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerPred) {
13361336 int32_t iEndIdx = pCurAu->uiEndPos;
13371337 int32_t iCurAuPoc =
13381338 pCurAu->pNalUnitsList[pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
@@ -1347,7 +1347,7 @@ bool_t CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerP · 8 unmodified lines
13471347 return true;
13481348 }
13491349
1350−bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
1350+bool CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
13511351 PAccessUnit pCurAu = pCtx->pAccessUnitList;
13521352 const int32_t kiEndPos = pCurAu->uiEndPos;
13531353 int32_t iIdxNoInterLayerPred = 0;
@@ -1391,7 +1391,7 @@ bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) { · 37 unmodified lines
13911391 pCurAu->pNalUnitsList[pCurAu->uiEndPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iMbHeight << 4;
13921392 } else { //P_SLICE
13931393 //step 1: search uiDependencyId equal to pCtx->cur_seq_interval_target_dependency_id
1394− bool_t bGetDependId = false;
1394+ bool bGetDependId = false;
13951395 int32_t iIdxDependId = 0;
13961396
13971397 iIdxDependId = kiEndPos;
@@ -1406,7 +1406,7 @@ bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) { · 8 unmodified lines
14061406
14071407 //step 2: switch according to whether or not find the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
14081408 if (bGetDependId) { //get the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
1409− bool_t bGetNoInterPredFront = false;
1409+ bool bGetNoInterPredFront = false;
14101410 //step 2a: search iNoInterLayerPredFlag [0....iIdxDependId]
14111411 iIdxNoInterLayerPred = iIdxDependId;
14121412 while (iIdxNoInterLayerPred >= 0) {
@@ -1650,7 +1650,7 @@ void_t WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps · 237 unmodified lines
16501650 }
16511651 }
16521652
1653−int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool_t kbFirstSlice, int32_t iPoc) {
1653+int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool kbFirstSlice, int32_t iPoc) {
16541654 int32_t iRet = ERR_NONE;
16551655 if (kbFirstSlice)
16561656 iRet = WelsInitRefList (pCtx, iPoc);
@@ -1718,7 +1718,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 61 unmodified lines
17181718 int16_t iLastIdD = -1, iLastIdQ = -1;
17191719 int16_t iCurrIdD = 0, iCurrIdQ = 0;
17201720 uint8_t uiNalRefIdc = 0;
1721− bool_t bFreshSliceAvailable =
1721+ bool bFreshSliceAvailable =
17221722 true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
17231723 PPicture pStoreBasePic = NULL;
17241724
@@ -1774,7 +1774,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 49 unmodified lines
17741774 * Loop decoding for slices (even FMO and/ multiple slices) within a dq layer
17751775 */
17761776 while (iIdx <= iEndIdx) {
1777− bool_t bReconstructSlice;
1777+ bool bReconstructSlice;
17781778 iCurrIdQ = pNalCur->sNalHeaderExt.uiQualityId;
17791779 iCurrIdD = pNalCur->sNalHeaderExt.uiDependencyId;
17801780 pSh = &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
@@ -1823,7 +1823,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 42 unmodified lines
18231823 InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec);
18241824
18251825 if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) {
1826− const bool_t kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
1826+ const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
18271827 || (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR);
18281828 // Subclause 8.2.5.2 Decoding process for gaps in frame_num
18291829 if (!kbIdrFlag &&

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