History

Use bool_t instead of BOOL_T

One bool typedef is already more than enough, two is too many.

Martin Storsjö committed 12 years ago

Commit 17d7b5d1 parent 0f7a95824 files · +82 −83Browse files

Unified · Split

24 files
  1. codec/common/macros.h +1 −1
  2. codec/common/typedefs.h +0 −1
  3. codec/decoder/core/src/deblocking.cpp +2 −2
  4. codec/decoder/core/src/decoder_core.cpp +2 −2
  5. codec/encoder/core/inc/md.h +1 −1
  6. codec/encoder/core/inc/nal_encap.h +3 −3
  7. codec/encoder/core/inc/ref_list_mgr_svc.h +2 −2
  8. codec/encoder/core/inc/slice_multi_threading.h +2 −2
  9. codec/encoder/core/inc/svc_base_layer_md.h +7 −7
  10. codec/encoder/core/inc/svc_enc_golomb.h +1 −1
  11. codec/encoder/core/inc/svc_encode_mb.h +2 −2
  12. codec/encoder/core/inc/svc_encode_slice.h +1 −1
  13. codec/encoder/core/inc/wels_func_ptr_def.h +3 −3
  14. codec/encoder/core/src/deblocking.cpp +8 −8
  15. codec/encoder/core/src/encoder_ext.cpp +9 −9
  16. codec/encoder/core/src/md.cpp +1 −1
  17. codec/encoder/core/src/ratectl.cpp +1 −1
  18. codec/encoder/core/src/ref_list_mgr_svc.cpp +2 −2
  19. codec/encoder/core/src/slice_multi_threading.cpp +8 −8
  20. codec/encoder/core/src/svc_base_layer_md.cpp +10 −10
  21. codec/encoder/core/src/svc_encode_mb.cpp +2 −2
  22. codec/encoder/core/src/svc_encode_slice.cpp +9 −9
  23. codec/encoder/core/src/svc_mode_decision.cpp +3 −3
  24. codec/encoder/plus/inc/welsEncoderExt.h +2 −2
codec/common/macros.h+1−1
@@ -276,7 +276,7 @@ return x; · 275 unmodified lines
276276 #define BUTTERFLY4x8(dw) (((uint64_t)(dw)<<32) | (dw))
277277 #endif//BUTTERFLY4x8
278278
279−static inline BOOL_T WELS_POWER2_IF (uint32_t v) {
279+static inline bool_t WELS_POWER2_IF (uint32_t v) {
280280 return (v && ! (v & (v - 1)));
281281 }
282282
codec/common/typedefs.h+0−1
@@ -70,7 +70,6 @@ typedef char str_t; · 69 unmodified lines
7070 #define EPSN (0.000001f) // (1e-6) // desired float precision
7171
7272 typedef bool bool_t;
73−typedef int32_t BOOL_T;
7473
7574 #ifndef FALSE
7675 #define FALSE ((int32_t)0)
codec/decoder/core/src/deblocking.cpp+2−2
@@ -252,8 +252,8 @@ int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterId · 251 unmodified lines
252252 int32_t iMbY = pCurDqLayer->iMbY;
253253 int32_t iMbX = pCurDqLayer->iMbX;
254254 int32_t iMbXy = pCurDqLayer->iMbXyIndex;
255− BOOL_T bLeftFlag = FALSE;
256− BOOL_T bTopFlag = FALSE;
255+ bool_t bLeftFlag = FALSE;
256+ bool_t bTopFlag = FALSE;
257257
258258 if (2 == iFilterIdc) {
259259 bLeftFlag = (iMbX > 0) && (pCurDqLayer->pSliceIdc[iMbXy] == pCurDqLayer->pSliceIdc[iMbXy - 1]);
codec/decoder/core/src/decoder_core.cpp+2−2
@@ -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_t CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool_t 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
@@ -1774,7 +1774,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1662 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_t bReconstructSlice;
17781778 iCurrIdQ = pNalCur->sNalHeaderExt.uiQualityId;
17791779 iCurrIdD = pNalCur->sNalHeaderExt.uiDependencyId;
17801780 pSh = &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
codec/encoder/core/inc/md.h+1−1
@@ -130,7 +130,7 @@ void PredictSadSkip (int8_t* pRefIndexCache, bool_t* pMbSkipCache, int32_t* pSad · 129 unmodified lines
130130
131131 // for pfGetVarianceFromIntraVaa function ptr adaptive by CPU features, 6/7/2010
132132 void InitIntraAnalysisVaaInfo (SWelsFuncPtrList* pFuncList, const uint32_t kuiCpuFlag);
133−BOOL_T MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
133+bool_t MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
134134
135135 uint8_t MdInterAnalysisVaaInfo_c (int32_t* pSad8x8);
136136
codec/encoder/core/inc/nal_encap.h+3−3
@@ -73,7 +73,7 @@ int32_t iCountNals; // count number of NAL in list · 72 unmodified lines
7373 // SVC: num_sps (MAX_D) + num_pps (MAX_D) + num_vcl (MAX_D * MAX_Q)
7474 int32_t iNalIndex; // coding NAL currently, 0 based
7575
76−// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
76+// bool_t bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
7777 } SWelsEncoderOutput;
7878
7979 //#define MT_DEBUG_BS_WR 0 // for MT debugging if needed
@@ -91,9 +91,9 @@ SWelsNalRaw sNalList[2]; // nal list, PREFIX NAL(if applicable) + SLICE NAL · 11 unmodified lines
9191 int32_t iNalLen[2];
9292 int32_t iNalIndex; // coding NAL currently, 0 based
9393
94−// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
94+// bool_t bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
9595 #if MT_DEBUG_BS_WR
96−BOOL_T bSliceCodedFlag;
96+bool_t bSliceCodedFlag;
9797 #endif//MT_DEBUG_BS_WR
9898 } SWelsSliceBs;
9999
codec/encoder/core/inc/ref_list_mgr_svc.h+2−2
@@ -77,11 +77,11 @@ void WelsResetRefList (sWelsEncCtx* pCtx); · 76 unmodified lines
7777 /*
7878 * update reference picture list
7979 */
80−BOOL_T WelsUpdateRefList (sWelsEncCtx* pCtx);
80+bool_t WelsUpdateRefList (sWelsEncCtx* pCtx);
8181 /*
8282 * build reference picture list
8383 */
84−BOOL_T WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
84+bool_t WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
8585
8686 /*
8787 * update syntax for reference base related
codec/encoder/core/inc/slice_multi_threading.h+2−2
@@ -98,10 +98,10 @@ void ResetCountBsSizeInPartitions (uint32_t* pCountBsSizeList, const int32_t kiP · 97 unmodified lines
9898
9999 #ifdef _WIN32
100100 int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT* pEventsList, SLayerBSInfo* pLayerBsInfo,
101− const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
101+ const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool_t kbIsDynamicSlicingMode);
102102 #else
103103 int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT** ppEventsList, SLayerBSInfo* pLayerBsInfo,
104− const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
104+ const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool_t kbIsDynamicSlicingMode);
105105 #endif//_WIN32
106106
107107 int32_t DynamicDetectCpuCores();
codec/encoder/core/inc/svc_base_layer_md.h+7−7
@@ -57,7 +57,7 @@ int32_t WelsMdIntraFinePartitionVaa (void* pEncCtx, void* pWelsMd, SMB* pCurMb, · 56 unmodified lines
5757 void WelsMdIntraMb (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
5858
5959 void WelsMdBackgroundMbEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache, SSlice* pSlice, bool_t bSkipMbFlag);
60−BOOL_T WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
60+bool_t WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
6161 int32_t WelsMdP16x16 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb);
6262
6363 int32_t WelsMdP16x8 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice);
@@ -67,17 +67,17 @@ int32_t WelsMdP8x8 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWe · 3 unmodified lines
6767 /*static*/ void WelsMdInterFinePartition (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
6868 /*static*/ void WelsMdInterFinePartitionVaa (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
6969 void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
70−BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
71−//BOOL_T svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
70+bool_t WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
71+//bool_t svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
7272 void WelsMdInterMb (void* pEncCtx, void* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused);
7373
7474 //both used in BL and EL
7575 //void wels_md_inter_init ( SWelsMD* pMd, const uint8_t ref_idx, const bool_t is_highest_dlayer_flag );
7676
7777 bool_t WelsMdInterJudgeBGDPskip (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
78− BOOL_T* bKeepSkip);
78+ bool_t* bKeepSkip);
7979 bool_t WelsMdInterJudgeBGDPskipFalse (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
80− BOOL_T* bKeepSkip);
80+ bool_t* bKeepSkip);
8181
8282 void WelsMdInterUpdateBGDInfo (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t kbCollocatedPredFlag,
8383 const int32_t kiRefPictureType);
@@ -85,7 +85,7 @@ void WelsMdInterUpdateBGDInfoNULL (SDqLayer* pCurLayer, SMB* pCurMb, const bool · 1 unmodified line
8585 const int32_t kiRefPictureType);
8686
8787 bool_t WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
88− BOOL_T bTrySkip);
88+ bool_t bTrySkip);
8989 void WelsMdInterUpdatePskip (SDqLayer* pCurDqLayer, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
9090 void WelsMdInterDecidedPskip (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
9191
@@ -96,7 +96,7 @@ void WelsMdInterSaveSadAndRefMbType (Mb_Type* pRefMbTypeList, SMbCache* pMbCache · 4 unmodified lines
9696 const SWelsMD* kpMd);
9797
9898 void WelsMdInterSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
99− SMbCache* pMbCache, const BOOL_T kbSkip);
99+ SMbCache* pMbCache, const bool_t kbSkip);
100100 void WelsMdIntraSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
101101 //end of: both used in BL and EL
102102
codec/encoder/core/inc/svc_enc_golomb.h+1−1
@@ -231,7 +231,7 @@ BsFlush (pBs); · 230 unmodified lines
231231 }
232232
233233
234−static inline BOOL_T BsCheckByteAlign (SBitStringAux* pBs) {
234+static inline bool_t BsCheckByteAlign (SBitStringAux* pBs) {
235235 return ! (pBs->iLeftBits & 0x7);
236236 }
237237
codec/encoder/core/inc/svc_encode_mb.h+2−2
@@ -57,8 +57,8 @@ void WelsEncInterY (SWelsFuncPtrList* func, SMB* pCurMb, SMbCache* pMbCache); · 56 unmodified lines
5757 void WelsEncRecUV (SWelsFuncPtrList* func, SMB* pCurMb, SMbCache* pMbCache, int16_t* pRs, int32_t iUV);
5858 void WelsRecPskip (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SMB* pCurMb, SMbCache* pMbCache);
5959
60−BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
61−BOOL_T WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
60+bool_t WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
61+bool_t WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
6262 }
6363 #endif
6464
codec/encoder/core/inc/svc_encode_slice.h+1−1
@@ -99,7 +99,7 @@ void WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, vo · 98 unmodified lines
9999 const int32_t kiSliceFirstMbXY); // for inter dynamic slice
100100
101101
102−BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
102+bool_t DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
103103 SDynamicSlicingStack* pDss);
104104 }
105105 #endif //SVC_ENCODE_SLICE_H__
codec/encoder/core/inc/wels_func_ptr_def.h+3−3
@@ -110,18 +110,18 @@ typedef void (*PSetNoneZeroCountZeroFunc) (int8_t* pNonZeroCount); · 109 unmodified lines
110110
111111 typedef int32_t (*PIntraFineMdFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
112112 typedef void (*PInterFineMdFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb, int32_t bestCost);
113−typedef BOOL_T (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
113+typedef bool_t (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
114114
115115 typedef void (*PMotionSearchFunc) (SWelsFuncPtrList* pFuncList, void* pCurDqLayer, void* pMe,
116116 void* pSlice); // here after reset all function pointers, will set as right parameter type
117117 typedef void (*PFillInterNeighborCacheFunc) (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth, int8_t* pVaaBgMbFlag);
118118 typedef void (*PAccumulateSadFunc) (uint32_t* pSumDiff, int32_t* pGomForegroundBlockNum, int32_t* iSad8x8,
119119 int8_t* pVaaBgMbFlag);//for RC
120−typedef BOOL_T (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
120+typedef bool_t (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
121121 SDynamicSlicingStack* pDynamicSlicingStack); // 2010.8.17
122122
123123 typedef bool_t (*PInterMdBackgroundDecisionFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb,
124− SMbCache* pMbCache, BOOL_T* pKeepPskip);
124+ SMbCache* pMbCache, bool_t* pKeepPskip);
125125 typedef void (*PInterMdBackgroundInfoUpdateFunc) (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t bFlag,
126126 const int32_t kiRefPictureType);
127127
codec/encoder/core/src/deblocking.cpp+8−8
@@ -396,8 +396,8 @@ void DeblockingInterMb (DeblockingFunc* pfDeblocking, SMB* pCurMb, SDeblockingFi · 395 unmodified lines
396396 int32_t iMbX = pCurMb->iMbX;
397397 int32_t iMbY = pCurMb->iMbY;
398398
399− BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
400− BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
399+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
400+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
401401
402402 int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
403403 int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -482,8 +482,8 @@ void FilteringEdgeLumaHV (DeblockingFunc* pfDeblocking, SMB* pCurMb, SDeblocking · 78 unmodified lines
482482 int32_t iMbX = pCurMb->iMbX;
483483 int32_t iMbY = pCurMb->iMbY;
484484
485− BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
486− BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
485+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
486+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
487487
488488 int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
489489 int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -537,8 +537,8 @@ void FilteringEdgeChromaHV (DeblockingFunc* pfDeblocking, SMB* pCurMb, SDeblocki · 47 unmodified lines
537537 int32_t iMbX = pCurMb->iMbX;
538538 int32_t iMbY = pCurMb->iMbY;
539539
540− BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
541− BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
540+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
541+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
542542
543543 int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
544544 int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -593,8 +593,8 @@ void DeblockingMbAvcbase (SWelsFuncPtrList* pFunc, SMB* pCurMb, SDeblockingFilte · 48 unmodified lines
593593 int32_t iMbX = pCurMb->iMbX;
594594 int32_t iMbY = pCurMb->iMbY;
595595
596− BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
597− BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
596+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
597+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
598598
599599 int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
600600 int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
codec/encoder/core/src/encoder_ext.cpp+9−9
@@ -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_t bLeft;
640+ bool_t bTop;
641+ bool_t bLeftTop;
642+ bool_t bRightTop;
643643 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
644644 uint8_t uiSliceIdc;
645645
@@ -1667,7 +1667,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 1021 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_t 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_t bLeft;
2316+ bool_t bTop;
2317+ bool_t bLeftTop;
2318+ bool_t bRightTop;
23192319 int32_t uiSliceIdc;
23202320 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
23212321
codec/encoder/core/src/md.cpp+1−1
@@ -494,7 +494,7 @@ void InitIntraAnalysisVaaInfo (SWelsFuncPtrList* pFuncList, const uint32_t kuiCp · 493 unmodified lines
494494 #endif//X86_ASM
495495 }
496496
497−BOOL_T MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb) {
497+bool_t MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb) {
498498
499499 SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
500500 const int32_t kiLineSize = pCurDqLayer->iEncStride[0];
codec/encoder/core/src/ratectl.cpp+1−1
@@ -108,7 +108,7 @@ void RcInitSequenceParameter (sWelsEncCtx* pEncCtx) { · 107 unmodified lines
108108 int32_t j = 0;
109109 int32_t iMbWidth = 0;
110110
111− BOOL_T bMultiSliceMode = FALSE;
111+ bool_t bMultiSliceMode = FALSE;
112112 int32_t iGomRowMode0 = 1, iGomRowMode1 = 1;
113113 #ifdef _TEST_TEMP_RC_
114114 fp_test_rc = fopen ("testRC.dat", "w");
codec/encoder/core/src/ref_list_mgr_svc.cpp+2−2
@@ -324,7 +324,7 @@ static inline void PrefetchNextBuffer (sWelsEncCtx* pCtx) { · 323 unmodified lines
324324 /*
325325 * update reference picture list
326326 */
327−BOOL_T WelsUpdateRefList (sWelsEncCtx* pCtx) {
327+bool_t WelsUpdateRefList (sWelsEncCtx* pCtx) {
328328 SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
329329 SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
330330 SDLayerParam* pParamD = &pCtx->pSvcParam->sDependencyLayers[pCtx->uiDependencyId];
@@ -532,7 +532,7 @@ void FilterLTRMarkingFeedback (sWelsEncCtx* pCtx, SLTRMarkingFeedback* pLTRMarki · 201 unmodified lines
532532 /*
533533 * build reference picture list
534534 */
535−BOOL_T WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t iPOC) {
535+bool_t WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t iPOC) {
536536 SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
537537 SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
538538 const int32_t kiNumRef = pCtx->pSvcParam->iNumRefFrame;
codec/encoder/core/src/slice_multi_threading.cpp+8−8
@@ -81,10 +81,10 @@ void UpdateMbListNeighborParallel (SSliceCtx* pSliceCtx, · 80 unmodified lines
8181 const int32_t kiMbXY = pMb->iMbXY;
8282 const int32_t kiMbX = pMb->iMbX;
8383 const int32_t kiMbY = pMb->iMbY;
84− BOOL_T bLeft;
85− BOOL_T bTop;
86− BOOL_T bLeftTop;
87− BOOL_T bRightTop;
84+ bool_t bLeft;
85+ bool_t bTop;
86+ bool_t bLeftTop;
87+ bool_t bRightTop;
8888 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
8989
9090 iLeftXY = kiMbXY - 1;
@@ -688,7 +688,7 @@ int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32 · 597 unmodified lines
688688 SWelsSvcCodingParam* pCodingParam = pCtx->pSvcParam;
689689 SDLayerParam* pDlp = &pCodingParam->sDependencyLayers[pCtx->uiDependencyId];
690690 SWelsSliceBs* pSliceBs = NULL;
691− const BOOL_T kbIsDynamicSlicingMode = (pDlp->sMso.uiSliceMode == SM_DYN_SLICE);
691+ const bool_t kbIsDynamicSlicingMode = (pDlp->sMso.uiSliceMode == SM_DYN_SLICE);
692692 int32_t iLayerSize = 0;
693693 int32_t iNalIdxBase = pLbi->iNalCount;
694694 int32_t iSliceIdx = 0;
@@ -1252,10 +1252,10 @@ void ResetCountBsSizeInPartitions (uint32_t* pCountBsSizeList, const int32_t iPa · 557 unmodified lines
12521252
12531253 #ifdef _WIN32
12541254 int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT* pEventsList, SLayerBSInfo* pLbi,
1255− const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const BOOL_T bIsDynamicSlicingMode)
1255+ const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const bool_t bIsDynamicSlicingMode)
12561256 #else
12571257 int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT** pEventsList, SLayerBSInfo* pLbi,
1258− const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const BOOL_T bIsDynamicSlicingMode)
1258+ const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const bool_t bIsDynamicSlicingMode)
12591259 #endif//WIN32
12601260 {
12611261 int32_t iEndMbIdx = 0;
@@ -1376,7 +1376,7 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 114 unmodified lines
13761376 int32_t iNeedAdj = 1;
13771377 // uiSliceMode of referencing spatial should be SM_FIXEDSLCNUM_SLICE
13781378 // if using spatial base layer for complexity estimation
1379− const BOOL_T kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
1379+ const bool_t kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
13801380 && (pCtx->pSvcParam->sDependencyLayers[iCurDid - 1].sMso.uiSliceMode == SM_FIXEDSLCNUM_SLICE
13811381 && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sDependencyLayers[iCurDid -
13821382 1].sMso.sSliceArgument.iSliceNum);
codec/encoder/core/src/svc_base_layer_md.cpp+10−10
@@ -1307,7 +1307,7 @@ void WelsMdBackgroundMbEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCac · 1306 unmodified lines
13071307 pFunc->pfCopy8x8Aligned (pMbCache->SPicData.pCsMb[2], pCurDqLayer->iCsStride[1], pMbCache->pMemPredChroma + 64, 8);
13081308 }
13091309
1310−BOOL_T WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
1310+bool_t WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
13111311 sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pEnc;
13121312 SDqLayer* pCurLayer = pEncCtx->pCurDqLayer;
13131313 SWelsMD* pWelsMd = (SWelsMD*)pMd;
@@ -1586,7 +1586,7 @@ void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurM · 272 unmodified lines
15861586 pWelsMd->iCostLuma = iBestSatdCost;
15871587
15881588 }
1589−BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
1589+bool_t WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
15901590 sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pEnc;
15911591 SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
15921592 SWelsMD* pWelsMd = (SWelsMD*)pMd;
@@ -1629,9 +1629,9 @@ void WelsMdInterMb (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache · 36 unmodified lines
16291629 const bool_t bMbTopAvailPskip = ((kuiNeighborAvail & TOP_MB_POS) ? IS_SKIP (top_mb->uiMbType) : false);
16301630 const bool_t bMbTopLeftAvailPskip = ((kuiNeighborAvail & TOPLEFT_MB_POS) ? IS_SKIP ((top_mb - 1)->uiMbType) : false);
16311631 const bool_t bMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((top_mb + 1)->uiMbType) : false);
1632− BOOL_T bTrySkip = bMbLeftAvailPskip || bMbTopAvailPskip || bMbTopLeftAvailPskip || bMbTopRightAvailPskip;
1633− BOOL_T bKeepSkip = bMbLeftAvailPskip && bMbTopAvailPskip && bMbTopRightAvailPskip;
1634− BOOL_T bSkip = FALSE;
1632+ bool_t bTrySkip = bMbLeftAvailPskip || bMbTopAvailPskip || bMbTopLeftAvailPskip || bMbTopRightAvailPskip;
1633+ bool_t bKeepSkip = bMbLeftAvailPskip && bMbTopAvailPskip && bMbTopRightAvailPskip;
1634+ bool_t bSkip = FALSE;
16351635
16361636 if (pEncCtx->pFuncList->pfInterMdBackgroundDecision (pEncCtx, pWelsMd, pSlice, pCurMb, pMbCache, &bKeepSkip)) {
16371637 return;
@@ -1662,7 +1662,7 @@ void WelsMdInterMb (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache · 24 unmodified lines
16621662 // try the ordinary Pskip
16631663 //////
16641664 bool_t WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
1665− BOOL_T bTrySkip) {
1665+ bool_t bTrySkip) {
16661666 bool_t bRet = true;
16671667 if (((pEncCtx->pRefPic->iPictureType == P_SLICE) && (pMbCache->uiRefMbType == MB_TYPE_SKIP
16681668 || pMbCache->uiRefMbType == MB_TYPE_BACKGROUND)) ||
@@ -1744,7 +1744,7 @@ void WelsMdInterEncode (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb, SMbCa · 75 unmodified lines
17441744 // try the BGD Pskip
17451745 //////
17461746 bool_t WelsMdInterJudgeBGDPskip (void* pCtx, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
1747− BOOL_T* bKeepSkip) {
1747+ bool_t* bKeepSkip) {
17481748 sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx;
17491749 SWelsMD* pWelsMd = (SWelsMD*)pMd;
17501750
@@ -1776,7 +1776,7 @@ bool_t WelsMdInterJudgeBGDPskip (void* pCtx, void* pMd, SSlice* pSlice, SMB* pCu · 25 unmodified lines
17761776 }
17771777
17781778 bool_t WelsMdInterJudgeBGDPskipFalse (void* pCtx, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
1779− BOOL_T* bKeepSkip) {
1779+ bool_t* bKeepSkip) {
17801780 return false;
17811781 }
17821782
@@ -1820,9 +1820,9 @@ void WelsMdInterSaveSadAndRefMbType (Mb_Type* pRefMbtypeList, SMbCache* pMbCache · 37 unmodified lines
18201820 }
18211821
18221822 void WelsMdInterSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
1823− SMbCache* pMbCache, const BOOL_T bSkip) {
1823+ SMbCache* pMbCache, const bool_t bSkip) {
18241824 //step 2: Intra
1825− const BOOL_T kbTrySkip = pEncCtx->pFuncList->pfFirstIntraMode (pEncCtx, pWelsMd, pCurMb, pMbCache);
1825+ const bool_t kbTrySkip = pEncCtx->pFuncList->pfFirstIntraMode (pEncCtx, pWelsMd, pCurMb, pMbCache);
18261826 if (kbTrySkip)
18271827 return;
18281828
codec/encoder/core/src/svc_encode_mb.cpp+2−2
@@ -325,7 +325,7 @@ void WelsRecPskip (SDqLayer* pCurLayer, SWelsFuncPtrList* pFuncList, SMB* pCu · 324 unmodified lines
325325 pFuncList->pfSetMemZeroSize8 (pCurMb->pNonZeroCount, 24);
326326 }
327327
328−BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
328+bool_t WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
329329 int32_t iSingleCtrMb = 0;
330330 int16_t* pRes = pMbCache->pCoeffLevel;
331331 const uint8_t kuiQp = pCurMb->uiLumaQp;
@@ -352,7 +352,7 @@ BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) { · 20 unmodified lines
352352 return TRUE;
353353 }
354354
355−BOOL_T WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV) {
355+bool_t WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV) {
356356 int16_t* pRes = ((iUV == 1) ? & (pMbCache->pCoeffLevel[256]) : & (pMbCache->pCoeffLevel[256 + 64]));
357357
358358 const uint8_t kuiQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp +
codec/encoder/core/src/svc_encode_slice.cpp+9−9
@@ -738,10 +738,10 @@ void UpdateMbNeighbourInfoForNextSlice (SSliceCtx* pSliceCtx, · 737 unmodified lines
738738 const int32_t kiMbXY = pMb->iMbXY;
739739 const int32_t kiMbX = pMb->iMbX;
740740 const int32_t kiMbY = pMb->iMbY;
741− BOOL_T bLeft;
742− BOOL_T bTop;
743− BOOL_T bLeftTop;
744− BOOL_T bRightTop;
741+ bool_t bLeft;
742+ bool_t bTop;
743+ bool_t bLeftTop;
744+ bool_t bRightTop;
745745 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
746746 const uint8_t kuiSliceIdc = WelsMbToSliceIdc (pSliceCtx, kiMbXY);
747747
@@ -819,7 +819,7 @@ void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSlic · 71 unmodified lines
819819 UpdateMbNeighbourInfoForNextSlice (pSliceCtx, pMbList, iFirstMbIdxOfNextSlice, kiLastMbIdxInPartition);
820820 }
821821
822−BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
822+bool_t DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
823823 SDynamicSlicingStack* pDss) {
824824 sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx;
825825 SSlice* pCurSlice = (SSlice*)pSlice;
@@ -830,12 +830,12 @@ BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pS · 4 unmodified lines
830830 const int32_t kiPartitaionId = pCurSlice->uiSliceIdx % kiActiveThreadsNum;
831831 const int32_t kiLastMbIdxInPartition = pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId];
832832
833− const BOOL_T kbCurMbNotFirstMbOfCurSlice = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
833+ const bool_t kbCurMbNotFirstMbOfCurSlice = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
834834 pSliceCtx->pOverallMbMap[iCurMbIdx - 1]);
835− const BOOL_T kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition;
836− const BOOL_T kbSliceNumNotExceedConstraint = pSliceCtx->iSliceNumInFrame <
835+ const bool_t kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition;
836+ const bool_t kbSliceNumNotExceedConstraint = pSliceCtx->iSliceNumInFrame <
837837 pSliceCtx->iMaxSliceNumConstraint; /*tmp choice to avoid complex memory operation, 100520, to be modify*/
838− const BOOL_T kbSliceNumReachConstraint = (pSliceCtx->iSliceNumInFrame ==
838+ const bool_t kbSliceNumReachConstraint = (pSliceCtx->iSliceNumInFrame ==
839839 pSliceCtx->iMaxSliceNumConstraint);
840840
841841 if (pCurSlice->bDynamicSlicingSliceSizeCtrlFlag)
codec/encoder/core/src/svc_mode_decision.cpp+3−3
@@ -61,9 +61,9 @@ void WelsMdSpatialelInterMbIlfmdNoilp (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, S · 60 unmodified lines
6161 const bool_t kbMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((
6262 kpTopMb + 1)->uiMbType) : false);
6363
64− BOOL_T bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
65− BOOL_T bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
66− BOOL_T bSkip = FALSE;
64+ bool_t bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
65+ bool_t bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
66+ bool_t bSkip = FALSE;
6767
6868 if (pEncCtx->pFuncList->pfInterMdBackgroundDecision (pEncCtx, pWelsMd, pSlice, pCurMb, pMbCache, &bKeepSkip)) {
6969 return;
codec/encoder/plus/inc/welsEncoderExt.h+2−2
@@ -114,12 +114,12 @@ class CWelsH264SVCEncoder : public ISVCEncoder { · 113 unmodified lines
114114 int32_t m_iMaxPicHeight;
115115
116116 int32_t m_iCspInternal;
117− BOOL_T m_bInitialFlag;
117+ bool_t m_bInitialFlag;
118118
119119 #ifdef OUTPUT_BIT_STREAM
120120 FILE* m_pFileBs;
121121 FILE* m_pFileBsSize;
122− BOOL_T m_bSwitch;
122+ bool_t m_bSwitch;
123123 int32_t m_iSwitchTimes;
124124 #endif//OUTPUT_BIT_STREAM
125125

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