bool is one of the built in, standard types in C++, there's no need for a typedef for it.
Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 82 files). Show all
Unified · Split
| @@ -60,7 +60,7 @@ typedef EResult (WELSAPI* pfnCreateVpInterface) (void**, int); · 59 unmodified lines | ||
| 60 | 60 | typedef EResult (WELSAPI* pfnDestroyVpInterface) (void*, int); |
| 61 | 61 | |
| 62 | 62 | int32_t WelsInitScaledPic (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPic, CMemoryAlign* pMemoryAlign); |
| 63 | −bool_t JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPic); | |
| 63 | +bool JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPic); | |
| 64 | 64 | void FreeScaledPic (Scaled_Picture* pScaledPic, CMemoryAlign* pMemoryAlign); |
| 65 | 65 | |
| 66 | 66 | //******* table definition ***********************************************************************// |
| @@ -313,8 +313,8 @@ int32_t CWelsPreProcess::WelsPreprocessStep1 (void* pCtx, const SSourcePicture** · 246 unmodified lines | ||
| 313 | 313 | int32_t CWelsPreProcess::WelsPreprocessStep3 (void* pCtx, const int32_t kiDidx) { |
| 314 | 314 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; |
| 315 | 315 | SWelsSvcCodingParam* pSvcParam = pEncCtx->pSvcParam; |
| 316 | − bool_t bNeededMbAq = (pSvcParam->bEnableAdaptiveQuant && (pEncCtx->eSliceType == P_SLICE)); | |
| 317 | − bool_t bCalculateBGD = (pEncCtx->eSliceType == P_SLICE && pSvcParam->bEnableBackgroundDetection); | |
| 316 | + bool bNeededMbAq = (pSvcParam->bEnableAdaptiveQuant && (pEncCtx->eSliceType == P_SLICE)); | |
| 317 | + bool bCalculateBGD = (pEncCtx->eSliceType == P_SLICE && pSvcParam->bEnableBackgroundDetection); | |
| 318 | 318 | |
| 319 | 319 | int32_t iCurTemporalIdx = pEncCtx->uiSpatialLayersInTemporal[kiDidx] - 1; |
| 320 | 320 | |
| @@ -327,8 +327,8 @@ int32_t CWelsPreProcess::WelsPreprocessStep3 (void* pCtx, const int32_t kiDidx) · 6 unmodified lines | ||
| 327 | 327 | SPicture* pRefPic = pEncCtx->pSpatialPic[kiDidx][iRefTemporalIdx]; |
| 328 | 328 | { |
| 329 | 329 | SPicture* pLastPic = m_pLastSpatialPicture[kiDidx][0]; |
| 330 | − bool_t bCalculateSQDiff = ((pLastPic->pData[0] == pRefPic->pData[0]) && bNeededMbAq); | |
| 331 | − bool_t bCalculateVar = (pSvcParam->iRCMode == RC_MODE1 && pEncCtx->eSliceType == I_SLICE); | |
| 330 | + bool bCalculateSQDiff = ((pLastPic->pData[0] == pRefPic->pData[0]) && bNeededMbAq); | |
| 331 | + bool bCalculateVar = (pSvcParam->iRCMode == RC_MODE1 && pEncCtx->eSliceType == I_SLICE); | |
| 332 | 332 | |
| 333 | 333 | VaaCalculation (pEncCtx->pVaa, pCurPic, pRefPic, bCalculateSQDiff, bCalculateVar, bCalculateBGD); |
| 334 | 334 | } |
| @@ -517,12 +517,12 @@ int32_t CWelsPreProcess::MultiLayerPreprocess (void* pCtx, const SSourcePicture* · 182 unmodified lines | ||
| 517 | 517 | /*! |
| 518 | 518 | * \brief Whether input picture need be scaled? |
| 519 | 519 | */ |
| 520 | −bool_t JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPicture) { | |
| 520 | +bool JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPicture) { | |
| 521 | 521 | const int32_t kiInputPicWidth = pParam->SUsedPicRect.iWidth; |
| 522 | 522 | const int32_t kiInputPicHeight = pParam->SUsedPicRect.iHeight; |
| 523 | 523 | const int32_t kiDstPicWidth = pParam->sDependencyLayers[pParam->iNumDependencyLayer - 1].iActualWidth; |
| 524 | 524 | const int32_t kiDstPicHeight = pParam->sDependencyLayers[pParam->iNumDependencyLayer - 1].iActualHeight; |
| 525 | − bool_t bNeedDownsampling = true; | |
| 525 | + bool bNeedDownsampling = true; | |
| 526 | 526 | |
| 527 | 527 | int32_t iSpatialIdx = pParam->iNumDependencyLayer - 1; |
| 528 | 528 | |
| @@ -551,7 +551,7 @@ bool_t JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledP · 22 unmodified lines | ||
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | int32_t WelsInitScaledPic (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPicture, CMemoryAlign* pMemoryAlign) { |
| 554 | − bool_t bInputPicNeedScaling = JudgeNeedOfScaling (pParam, pScaledPicture); | |
| 554 | + bool bInputPicNeedScaling = JudgeNeedOfScaling (pParam, pScaledPicture); | |
| 555 | 555 | if (bInputPicNeedScaling) { |
| 556 | 556 | pScaledPicture->pScaledInputPicture = AllocPicture (pMemoryAlign, pParam->SUsedPicRect.iWidth, |
| 557 | 557 | pParam->SUsedPicRect.iHeight, false); |
| @@ -611,8 +611,8 @@ void CWelsPreProcess::BilateralDenoising (SPicture* pSrc, const int32_t kiWidth, · 53 unmodified lines | ||
| 611 | 611 | m_pInterfaceVp->Process (iMethodIdx, &sSrcPixMap, NULL); |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | −bool_t CWelsPreProcess::DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPicture) { | |
| 615 | − bool_t bSceneChangeFlag = false; | |
| 614 | +bool CWelsPreProcess::DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPicture) { | |
| 615 | + bool bSceneChangeFlag = false; | |
| 616 | 616 | int32_t iMethodIdx = METHOD_SCENE_CHANGE_DETECTION; |
| 617 | 617 | SSceneChangeResult sSceneChangeDetectResult = {0}; |
| 618 | 618 | SPixMap sSrcPixMap = {0}; |
| @@ -688,7 +688,7 @@ int32_t CWelsPreProcess::DownsamplePadding (SPicture* pSrc, SPicture* pDstPic, · 69 unmodified lines | ||
| 688 | 688 | |
| 689 | 689 | //*********************************************************************************************************/ |
| 690 | 690 | void CWelsPreProcess::VaaCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, |
| 691 | − bool_t bCalculateSQDiff, bool_t bCalculateVar, bool_t bCalculateBGD) { | |
| 691 | + bool bCalculateSQDiff, bool bCalculateVar, bool bCalculateBGD) { | |
| 692 | 692 | pVaaInfo->sVaaCalcInfo.pCurY = pCurPicture->pData[0]; |
| 693 | 693 | pVaaInfo->sVaaCalcInfo.pRefY = pRefPicture->pData[0]; |
| 694 | 694 | { |
| @@ -722,7 +722,7 @@ void CWelsPreProcess::VaaCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPic · 27 unmodified lines | ||
| 722 | 722 | } |
| 723 | 723 | |
| 724 | 724 | void CWelsPreProcess::BackgroundDetection (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, |
| 725 | − bool_t bDetectFlag) { | |
| 725 | + bool bDetectFlag) { | |
| 726 | 726 | if (bDetectFlag) { |
| 727 | 727 | pVaaInfo->iPicWidth = pCurPicture->iWidthInPixel; |
| 728 | 728 | pVaaInfo->iPicHeight = pCurPicture->iHeightInPixel; |
| @@ -834,7 +834,7 @@ void CWelsPreProcess::SetRefMbType (void* pCtx, uint32_t** pRefMbTypeArray, int3 · 105 unmodified lines | ||
| 834 | 834 | |
| 835 | 835 | |
| 836 | 836 | void CWelsPreProcess::AnalyzePictureComplexity (void* pCtx, SPicture* pCurPicture, SPicture* pRefPicture, |
| 837 | − const int32_t kiDependencyId, const bool_t bCalculateBGD) { | |
| 837 | + const int32_t kiDependencyId, const bool bCalculateBGD) { | |
| 838 | 838 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; |
| 839 | 839 | SWelsSvcCodingParam* pSvcParam = pEncCtx->pSvcParam; |
| 840 | 840 | SVAAFrameInfo* pVaaInfo = pEncCtx->pVaa; |