ref: 17d7b5d72ec00aa5e901843b499371704f8a313e
parent: 0f7a958ce390d04f507658318b5d5d5cf9acb8af
author: Martin Storsjö <martin@martin.st>
date: Fri Jan 24 09:07:44 EST 2014
Use bool_t instead of BOOL_T One bool typedef is already more than enough, two is too many.
--- a/codec/common/macros.h
+++ b/codec/common/macros.h
@@ -276,7 +276,7 @@
#define BUTTERFLY4x8(dw) (((uint64_t)(dw)<<32) | (dw))
#endif//BUTTERFLY4x8
-static inline BOOL_T WELS_POWER2_IF (uint32_t v) {
+static inline bool_t WELS_POWER2_IF (uint32_t v) {
return (v && ! (v & (v - 1)));
}
--- a/codec/common/typedefs.h
+++ b/codec/common/typedefs.h
@@ -70,7 +70,6 @@
#define EPSN (0.000001f) // (1e-6) // desired float precision
typedef bool bool_t;
-typedef int32_t BOOL_T;
#ifndef FALSE
#define FALSE ((int32_t)0)
--- a/codec/decoder/core/src/deblocking.cpp
+++ b/codec/decoder/core/src/deblocking.cpp
@@ -252,8 +252,8 @@
int32_t iMbY = pCurDqLayer->iMbY;
int32_t iMbX = pCurDqLayer->iMbX;
int32_t iMbXy = pCurDqLayer->iMbXyIndex;
- BOOL_T bLeftFlag = FALSE;
- BOOL_T bTopFlag = FALSE;
+ bool_t bLeftFlag = FALSE;
+ bool_t bTopFlag = FALSE;
if (2 == iFilterIdc) {
bLeftFlag = (iMbX > 0) && (pCurDqLayer->pSliceIdc[iMbXy] == pCurDqLayer->pSliceIdc[iMbXy - 1]);
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -105,7 +105,7 @@
return 0;
}
-inline BOOL_T CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool_t bStoreRefBasePicFlag,
+inline bool_t CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool_t bStoreRefBasePicFlag,
uint8_t uiDidMax, uint8_t uiLayerDqId, uint8_t uiTargetDqId) {
return ((iCurDid == uiDidMax) && (iCurQid == BASE_QUALITY_ID) && (bStoreRefBasePicFlag)) // store base
|| (uiLayerDqId == uiTargetDqId); // target layer
@@ -1774,7 +1774,7 @@
* Loop decoding for slices (even FMO and/ multiple slices) within a dq layer
*/
while (iIdx <= iEndIdx) {
- BOOL_T bReconstructSlice;
+ bool_t bReconstructSlice;
iCurrIdQ = pNalCur->sNalHeaderExt.uiQualityId;
iCurrIdD = pNalCur->sNalHeaderExt.uiDependencyId;
pSh = &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
--- a/codec/encoder/core/inc/md.h
+++ b/codec/encoder/core/inc/md.h
@@ -130,7 +130,7 @@
// for pfGetVarianceFromIntraVaa function ptr adaptive by CPU features, 6/7/2010
void InitIntraAnalysisVaaInfo (SWelsFuncPtrList* pFuncList, const uint32_t kuiCpuFlag);
-BOOL_T MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
+bool_t MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
uint8_t MdInterAnalysisVaaInfo_c (int32_t* pSad8x8);
--- a/codec/encoder/core/inc/nal_encap.h
+++ b/codec/encoder/core/inc/nal_encap.h
@@ -73,7 +73,7 @@
// SVC: num_sps (MAX_D) + num_pps (MAX_D) + num_vcl (MAX_D * MAX_Q)
int32_t iNalIndex; // coding NAL currently, 0 based
-// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
+// bool_t bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
} SWelsEncoderOutput;
//#define MT_DEBUG_BS_WR 0 // for MT debugging if needed
@@ -91,9 +91,9 @@
int32_t iNalLen[2];
int32_t iNalIndex; // coding NAL currently, 0 based
-// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
+// bool_t bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
#if MT_DEBUG_BS_WR
-BOOL_T bSliceCodedFlag;
+bool_t bSliceCodedFlag;
#endif//MT_DEBUG_BS_WR
} SWelsSliceBs;
--- a/codec/encoder/core/inc/ref_list_mgr_svc.h
+++ b/codec/encoder/core/inc/ref_list_mgr_svc.h
@@ -77,11 +77,11 @@
/*
* update reference picture list
*/
-BOOL_T WelsUpdateRefList (sWelsEncCtx* pCtx);
+bool_t WelsUpdateRefList (sWelsEncCtx* pCtx);
/*
* build reference picture list
*/
-BOOL_T WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
+bool_t WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
/*
* update syntax for reference base related
--- a/codec/encoder/core/inc/slice_multi_threading.h
+++ b/codec/encoder/core/inc/slice_multi_threading.h
@@ -98,10 +98,10 @@
#ifdef _WIN32
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT* pEventsList, SLayerBSInfo* pLayerBsInfo,
- const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
+ const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool_t kbIsDynamicSlicingMode);
#else
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT** ppEventsList, SLayerBSInfo* pLayerBsInfo,
- const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
+ const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool_t kbIsDynamicSlicingMode);
#endif//_WIN32
int32_t DynamicDetectCpuCores();
--- a/codec/encoder/core/inc/svc_base_layer_md.h
+++ b/codec/encoder/core/inc/svc_base_layer_md.h
@@ -57,7 +57,7 @@
void WelsMdIntraMb (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
void WelsMdBackgroundMbEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache, SSlice* pSlice, bool_t bSkipMbFlag);
-BOOL_T WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
+bool_t WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
int32_t WelsMdP16x16 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb);
int32_t WelsMdP16x8 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice);
@@ -67,8 +67,8 @@
/*static*/ void WelsMdInterFinePartition (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
/*static*/ void WelsMdInterFinePartitionVaa (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
-BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
-//BOOL_T svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
+bool_t WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
+//bool_t svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
void WelsMdInterMb (void* pEncCtx, void* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused);
//both used in BL and EL
@@ -75,9 +75,9 @@
//void wels_md_inter_init ( SWelsMD* pMd, const uint8_t ref_idx, const bool_t is_highest_dlayer_flag );
bool_t WelsMdInterJudgeBGDPskip (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T* bKeepSkip);
+ bool_t* bKeepSkip);
bool_t WelsMdInterJudgeBGDPskipFalse (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T* bKeepSkip);
+ bool_t* bKeepSkip);
void WelsMdInterUpdateBGDInfo (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t kbCollocatedPredFlag,
const int32_t kiRefPictureType);
@@ -85,7 +85,7 @@
const int32_t kiRefPictureType);
bool_t WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T bTrySkip);
+ bool_t bTrySkip);
void WelsMdInterUpdatePskip (SDqLayer* pCurDqLayer, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
void WelsMdInterDecidedPskip (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
@@ -96,7 +96,7 @@
const SWelsMD* kpMd);
void WelsMdInterSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
- SMbCache* pMbCache, const BOOL_T kbSkip);
+ SMbCache* pMbCache, const bool_t kbSkip);
void WelsMdIntraSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
//end of: both used in BL and EL
--- a/codec/encoder/core/inc/svc_enc_golomb.h
+++ b/codec/encoder/core/inc/svc_enc_golomb.h
@@ -231,7 +231,7 @@
}
-static inline BOOL_T BsCheckByteAlign (SBitStringAux* pBs) {
+static inline bool_t BsCheckByteAlign (SBitStringAux* pBs) {
return ! (pBs->iLeftBits & 0x7);
}
--- a/codec/encoder/core/inc/svc_encode_mb.h
+++ b/codec/encoder/core/inc/svc_encode_mb.h
@@ -57,8 +57,8 @@
void WelsEncRecUV (SWelsFuncPtrList* func, SMB* pCurMb, SMbCache* pMbCache, int16_t* pRs, int32_t iUV);
void WelsRecPskip (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SMB* pCurMb, SMbCache* pMbCache);
-BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
-BOOL_T WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
+bool_t WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
+bool_t WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
}
#endif
--- a/codec/encoder/core/inc/svc_encode_slice.h
+++ b/codec/encoder/core/inc/svc_encode_slice.h
@@ -99,7 +99,7 @@
const int32_t kiSliceFirstMbXY); // for inter dynamic slice
-BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
+bool_t DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
SDynamicSlicingStack* pDss);
}
#endif //SVC_ENCODE_SLICE_H__
--- a/codec/encoder/core/inc/wels_func_ptr_def.h
+++ b/codec/encoder/core/inc/wels_func_ptr_def.h
@@ -110,7 +110,7 @@
typedef int32_t (*PIntraFineMdFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
typedef void (*PInterFineMdFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb, int32_t bestCost);
-typedef BOOL_T (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
+typedef bool_t (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
typedef void (*PMotionSearchFunc) (SWelsFuncPtrList* pFuncList, void* pCurDqLayer, void* pMe,
void* pSlice); // here after reset all function pointers, will set as right parameter type
@@ -117,11 +117,11 @@
typedef void (*PFillInterNeighborCacheFunc) (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth, int8_t* pVaaBgMbFlag);
typedef void (*PAccumulateSadFunc) (uint32_t* pSumDiff, int32_t* pGomForegroundBlockNum, int32_t* iSad8x8,
int8_t* pVaaBgMbFlag);//for RC
-typedef BOOL_T (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
+typedef bool_t (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
SDynamicSlicingStack* pDynamicSlicingStack); // 2010.8.17
typedef bool_t (*PInterMdBackgroundDecisionFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb,
- SMbCache* pMbCache, BOOL_T* pKeepPskip);
+ SMbCache* pMbCache, bool_t* pKeepPskip);
typedef void (*PInterMdBackgroundInfoUpdateFunc) (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t bFlag,
const int32_t kiRefPictureType);
--- a/codec/encoder/core/src/deblocking.cpp
+++ b/codec/encoder/core/src/deblocking.cpp
@@ -396,8 +396,8 @@
int32_t iMbX = pCurMb->iMbX;
int32_t iMbY = pCurMb->iMbY;
- BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
- BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -482,8 +482,8 @@
int32_t iMbX = pCurMb->iMbX;
int32_t iMbY = pCurMb->iMbY;
- BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
- BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -537,8 +537,8 @@
int32_t iMbX = pCurMb->iMbX;
int32_t iMbY = pCurMb->iMbY;
- BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
- BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
@@ -593,8 +593,8 @@
int32_t iMbX = pCurMb->iMbX;
int32_t iMbY = pCurMb->iMbY;
- BOOL_T bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
- BOOL_T bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
+ bool_t bLeftBsValid[2] = { (iMbX > 0), ((iMbX > 0) && (pCurMb->uiSliceIdc == (pCurMb - 1)->uiSliceIdc))};
+ bool_t bTopBsValid[2] = { (iMbY > 0), ((iMbY > 0) && (pCurMb->uiSliceIdc == (pCurMb - iMbStride)->uiSliceIdc))};
int32_t iLeftFlag = bLeftBsValid[pFilter->uiFilterIdc];
int32_t iTopFlag = bTopBsValid[pFilter->uiFilterIdc];
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -636,10 +636,10 @@
&pEnc->pRefIndexBlock4x4[MB_BLOCK8x8_NUM * kiOffset]);
for (iIdx = 0; iIdx < iMbNum; iIdx++) {
- BOOL_T bLeft;
- BOOL_T bTop;
- BOOL_T bLeftTop;
- BOOL_T bRightTop;
+ bool_t bLeft;
+ bool_t bTop;
+ bool_t bLeftTop;
+ bool_t bRightTop;
int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
uint8_t uiSliceIdc;
@@ -1667,7 +1667,7 @@
while (ilayer < pParam->iNumDependencyLayer) {
SDqLayer* pDq = pCtx->ppDqLayerList[ilayer];
SDLayerParam* pDlp = &pCtx->pSvcParam->sDependencyLayers[ilayer];
- const BOOL_T kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sMso.uiSliceMode);
+ const bool_t kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sMso.uiSliceMode);
// pDq layers
if (NULL != pDq) {
@@ -2312,10 +2312,10 @@
const int32_t kiMbXY = pMb->iMbXY;
const int32_t kiMbX = pMb->iMbX;
const int32_t kiMbY = pMb->iMbY;
- BOOL_T bLeft;
- BOOL_T bTop;
- BOOL_T bLeftTop;
- BOOL_T bRightTop;
+ bool_t bLeft;
+ bool_t bTop;
+ bool_t bLeftTop;
+ bool_t bRightTop;
int32_t uiSliceIdc;
int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
--- a/codec/encoder/core/src/md.cpp
+++ b/codec/encoder/core/src/md.cpp
@@ -494,7 +494,7 @@
#endif//X86_ASM
}
-BOOL_T MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb) {
+bool_t MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb) {
SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
const int32_t kiLineSize = pCurDqLayer->iEncStride[0];
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -108,7 +108,7 @@
int32_t j = 0;
int32_t iMbWidth = 0;
- BOOL_T bMultiSliceMode = FALSE;
+ bool_t bMultiSliceMode = FALSE;
int32_t iGomRowMode0 = 1, iGomRowMode1 = 1;
#ifdef _TEST_TEMP_RC_
fp_test_rc = fopen ("testRC.dat", "w");
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -324,7 +324,7 @@
/*
* update reference picture list
*/
-BOOL_T WelsUpdateRefList (sWelsEncCtx* pCtx) {
+bool_t WelsUpdateRefList (sWelsEncCtx* pCtx) {
SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
SDLayerParam* pParamD = &pCtx->pSvcParam->sDependencyLayers[pCtx->uiDependencyId];
@@ -532,7 +532,7 @@
/*
* build reference picture list
*/
-BOOL_T WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t iPOC) {
+bool_t WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t iPOC) {
SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
const int32_t kiNumRef = pCtx->pSvcParam->iNumRefFrame;
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -81,10 +81,10 @@
const int32_t kiMbXY = pMb->iMbXY;
const int32_t kiMbX = pMb->iMbX;
const int32_t kiMbY = pMb->iMbY;
- BOOL_T bLeft;
- BOOL_T bTop;
- BOOL_T bLeftTop;
- BOOL_T bRightTop;
+ bool_t bLeft;
+ bool_t bTop;
+ bool_t bLeftTop;
+ bool_t bRightTop;
int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
iLeftXY = kiMbXY - 1;
@@ -688,7 +688,7 @@
SWelsSvcCodingParam* pCodingParam = pCtx->pSvcParam;
SDLayerParam* pDlp = &pCodingParam->sDependencyLayers[pCtx->uiDependencyId];
SWelsSliceBs* pSliceBs = NULL;
- const BOOL_T kbIsDynamicSlicingMode = (pDlp->sMso.uiSliceMode == SM_DYN_SLICE);
+ const bool_t kbIsDynamicSlicingMode = (pDlp->sMso.uiSliceMode == SM_DYN_SLICE);
int32_t iLayerSize = 0;
int32_t iNalIdxBase = pLbi->iNalCount;
int32_t iSliceIdx = 0;
@@ -1252,10 +1252,10 @@
#ifdef _WIN32
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT* pEventsList, SLayerBSInfo* pLbi,
- const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const BOOL_T bIsDynamicSlicingMode)
+ const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const bool_t bIsDynamicSlicingMode)
#else
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT** pEventsList, SLayerBSInfo* pLbi,
- const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const BOOL_T bIsDynamicSlicingMode)
+ const uint32_t uiNumThreads, SSliceCtx* pSliceCtx, const bool_t bIsDynamicSlicingMode)
#endif//WIN32
{
int32_t iEndMbIdx = 0;
@@ -1376,7 +1376,7 @@
int32_t iNeedAdj = 1;
// uiSliceMode of referencing spatial should be SM_FIXEDSLCNUM_SLICE
// if using spatial base layer for complexity estimation
- const BOOL_T kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
+ const bool_t kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
&& (pCtx->pSvcParam->sDependencyLayers[iCurDid - 1].sMso.uiSliceMode == SM_FIXEDSLCNUM_SLICE
&& pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sDependencyLayers[iCurDid -
1].sMso.sSliceArgument.iSliceNum);
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -1307,7 +1307,7 @@
pFunc->pfCopy8x8Aligned (pMbCache->SPicData.pCsMb[2], pCurDqLayer->iCsStride[1], pMbCache->pMemPredChroma + 64, 8);
}
-BOOL_T WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
+bool_t WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pEnc;
SDqLayer* pCurLayer = pEncCtx->pCurDqLayer;
SWelsMD* pWelsMd = (SWelsMD*)pMd;
@@ -1586,7 +1586,7 @@
pWelsMd->iCostLuma = iBestSatdCost;
}
-BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
+bool_t WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache) {
sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pEnc;
SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
SWelsMD* pWelsMd = (SWelsMD*)pMd;
@@ -1629,9 +1629,9 @@
const bool_t bMbTopAvailPskip = ((kuiNeighborAvail & TOP_MB_POS) ? IS_SKIP (top_mb->uiMbType) : false);
const bool_t bMbTopLeftAvailPskip = ((kuiNeighborAvail & TOPLEFT_MB_POS) ? IS_SKIP ((top_mb - 1)->uiMbType) : false);
const bool_t bMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((top_mb + 1)->uiMbType) : false);
- BOOL_T bTrySkip = bMbLeftAvailPskip || bMbTopAvailPskip || bMbTopLeftAvailPskip || bMbTopRightAvailPskip;
- BOOL_T bKeepSkip = bMbLeftAvailPskip && bMbTopAvailPskip && bMbTopRightAvailPskip;
- BOOL_T bSkip = FALSE;
+ bool_t bTrySkip = bMbLeftAvailPskip || bMbTopAvailPskip || bMbTopLeftAvailPskip || bMbTopRightAvailPskip;
+ bool_t bKeepSkip = bMbLeftAvailPskip && bMbTopAvailPskip && bMbTopRightAvailPskip;
+ bool_t bSkip = FALSE;
if (pEncCtx->pFuncList->pfInterMdBackgroundDecision (pEncCtx, pWelsMd, pSlice, pCurMb, pMbCache, &bKeepSkip)) {
return;
@@ -1662,7 +1662,7 @@
// try the ordinary Pskip
//////
bool_t WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T bTrySkip) {
+ bool_t bTrySkip) {
bool_t bRet = true;
if (((pEncCtx->pRefPic->iPictureType == P_SLICE) && (pMbCache->uiRefMbType == MB_TYPE_SKIP
|| pMbCache->uiRefMbType == MB_TYPE_BACKGROUND)) ||
@@ -1744,7 +1744,7 @@
// try the BGD Pskip
//////
bool_t WelsMdInterJudgeBGDPskip (void* pCtx, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T* bKeepSkip) {
+ bool_t* bKeepSkip) {
sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx;
SWelsMD* pWelsMd = (SWelsMD*)pMd;
@@ -1776,7 +1776,7 @@
}
bool_t WelsMdInterJudgeBGDPskipFalse (void* pCtx, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
- BOOL_T* bKeepSkip) {
+ bool_t* bKeepSkip) {
return false;
}
@@ -1820,9 +1820,9 @@
}
void WelsMdInterSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
- SMbCache* pMbCache, const BOOL_T bSkip) {
+ SMbCache* pMbCache, const bool_t bSkip) {
//step 2: Intra
- const BOOL_T kbTrySkip = pEncCtx->pFuncList->pfFirstIntraMode (pEncCtx, pWelsMd, pCurMb, pMbCache);
+ const bool_t kbTrySkip = pEncCtx->pFuncList->pfFirstIntraMode (pEncCtx, pWelsMd, pCurMb, pMbCache);
if (kbTrySkip)
return;
--- a/codec/encoder/core/src/svc_encode_mb.cpp
+++ b/codec/encoder/core/src/svc_encode_mb.cpp
@@ -325,7 +325,7 @@
pFuncList->pfSetMemZeroSize8 (pCurMb->pNonZeroCount, 24);
}
-BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
+bool_t WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
int32_t iSingleCtrMb = 0;
int16_t* pRes = pMbCache->pCoeffLevel;
const uint8_t kuiQp = pCurMb->uiLumaQp;
@@ -352,7 +352,7 @@
return TRUE;
}
-BOOL_T WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV) {
+bool_t WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV) {
int16_t* pRes = ((iUV == 1) ? & (pMbCache->pCoeffLevel[256]) : & (pMbCache->pCoeffLevel[256 + 64]));
const uint8_t kuiQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp +
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -738,10 +738,10 @@
const int32_t kiMbXY = pMb->iMbXY;
const int32_t kiMbX = pMb->iMbX;
const int32_t kiMbY = pMb->iMbY;
- BOOL_T bLeft;
- BOOL_T bTop;
- BOOL_T bLeftTop;
- BOOL_T bRightTop;
+ bool_t bLeft;
+ bool_t bTop;
+ bool_t bLeftTop;
+ bool_t bRightTop;
int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
const uint8_t kuiSliceIdc = WelsMbToSliceIdc (pSliceCtx, kiMbXY);
@@ -819,7 +819,7 @@
UpdateMbNeighbourInfoForNextSlice (pSliceCtx, pMbList, iFirstMbIdxOfNextSlice, kiLastMbIdxInPartition);
}
-BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
+bool_t DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
SDynamicSlicingStack* pDss) {
sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx;
SSlice* pCurSlice = (SSlice*)pSlice;
@@ -830,12 +830,12 @@
const int32_t kiPartitaionId = pCurSlice->uiSliceIdx % kiActiveThreadsNum;
const int32_t kiLastMbIdxInPartition = pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId];
- const BOOL_T kbCurMbNotFirstMbOfCurSlice = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
+ const bool_t kbCurMbNotFirstMbOfCurSlice = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
pSliceCtx->pOverallMbMap[iCurMbIdx - 1]);
- const BOOL_T kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition;
- const BOOL_T kbSliceNumNotExceedConstraint = pSliceCtx->iSliceNumInFrame <
+ const bool_t kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition;
+ const bool_t kbSliceNumNotExceedConstraint = pSliceCtx->iSliceNumInFrame <
pSliceCtx->iMaxSliceNumConstraint; /*tmp choice to avoid complex memory operation, 100520, to be modify*/
- const BOOL_T kbSliceNumReachConstraint = (pSliceCtx->iSliceNumInFrame ==
+ const bool_t kbSliceNumReachConstraint = (pSliceCtx->iSliceNumInFrame ==
pSliceCtx->iMaxSliceNumConstraint);
if (pCurSlice->bDynamicSlicingSliceSizeCtrlFlag)
--- a/codec/encoder/core/src/svc_mode_decision.cpp
+++ b/codec/encoder/core/src/svc_mode_decision.cpp
@@ -61,9 +61,9 @@
const bool_t kbMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((
kpTopMb + 1)->uiMbType) : false);
- BOOL_T bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
- BOOL_T bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
- BOOL_T bSkip = FALSE;
+ bool_t bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
+ bool_t bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
+ bool_t bSkip = FALSE;
if (pEncCtx->pFuncList->pfInterMdBackgroundDecision (pEncCtx, pWelsMd, pSlice, pCurMb, pMbCache, &bKeepSkip)) {
return;
--- a/codec/encoder/plus/inc/welsEncoderExt.h
+++ b/codec/encoder/plus/inc/welsEncoderExt.h
@@ -114,12 +114,12 @@
int32_t m_iMaxPicHeight;
int32_t m_iCspInternal;
- BOOL_T m_bInitialFlag;
+ bool_t m_bInitialFlag;
#ifdef OUTPUT_BIT_STREAM
FILE* m_pFileBs;
FILE* m_pFileBsSize;
- BOOL_T m_bSwitch;
+ bool_t m_bSwitch;
int32_t m_iSwitchTimes;
#endif//OUTPUT_BIT_STREAM