Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 5 files). Show all
Unified · Split
| @@ -228,7 +228,6 @@ int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiD · 227 unmodified lines | ||
| 228 | 228 | if (pSvcParam->bEnableBackgroundDetection) { |
| 229 | 229 | BackgroundDetection (pCtx->pVaa, pCurPic, pRefPic, bCalculateBGD && pRefPic->iPictureType != I_SLICE); |
| 230 | 230 | } |
| 231 | − | |
| 232 | 231 | if (bNeededMbAq) { |
| 233 | 232 | AdaptiveQuantCalculation (pCtx->pVaa, pCurPic, pRefPic); |
| 234 | 233 | } |
| @@ -795,17 +794,20 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 560 unmodified lines | ||
| 795 | 794 | |
| 796 | 795 | if (pSvcParam->iRCMode == RC_QUALITY_MODE && pCtx->eSliceType == P_SLICE) { |
| 797 | 796 | iComplexityAnalysisMode = FRAME_SAD; |
| 798 | − } else if (((pSvcParam->iRCMode == RC_BITRATE_MODE)||(pSvcParam->iRCMode == RC_TIMESTAMP_MODE)) && pCtx->eSliceType == P_SLICE) { | |
| 797 | + } else if (((pSvcParam->iRCMode == RC_BITRATE_MODE) || (pSvcParam->iRCMode == RC_TIMESTAMP_MODE)) | |
| 798 | + && pCtx->eSliceType == P_SLICE) { | |
| 799 | 799 | iComplexityAnalysisMode = GOM_SAD; |
| 800 | − } else if (((pSvcParam->iRCMode == RC_BITRATE_MODE)||(pSvcParam->iRCMode == RC_TIMESTAMP_MODE)) && pCtx->eSliceType == I_SLICE) { | |
| 800 | + } else if (((pSvcParam->iRCMode == RC_BITRATE_MODE) || (pSvcParam->iRCMode == RC_TIMESTAMP_MODE)) | |
| 801 | + && pCtx->eSliceType == I_SLICE) { | |
| 801 | 802 | iComplexityAnalysisMode = GOM_VAR; |
| 802 | 803 | } else { |
| 803 | 804 | return; |
| 804 | 805 | } |
| 806 | + | |
| 805 | 807 | sComplexityAnalysisParam->iComplexityAnalysisMode = iComplexityAnalysisMode; |
| 806 | 808 | sComplexityAnalysisParam->pCalcResult = & (pVaaInfo->sVaaCalcInfo); |
| 807 | 809 | sComplexityAnalysisParam->pBackgroundMbFlag = pVaaInfo->pVaaBackgroundMbFlag; |
| 808 | − if(pRefPicture) | |
| 810 | + if (pRefPicture) | |
| 809 | 811 | SetRefMbType (pCtx, & (sComplexityAnalysisParam->uiRefMbType), pRefPicture->iPictureType); |
| 810 | 812 | sComplexityAnalysisParam->iCalcBgd = bCalculateBGD; |
| 811 | 813 | sComplexityAnalysisParam->iFrameComplexity = 0; |
| @@ -833,7 +835,7 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 21 unmodified lines | ||
| 833 | 835 | sSrcPixMap.sRect.iRectHeight = pCurPicture->iHeightInPixel; |
| 834 | 836 | sSrcPixMap.eFormat = VIDEO_FORMAT_I420; |
| 835 | 837 | |
| 836 | − if(pRefPicture){ | |
| 838 | + if (pRefPicture) { | |
| 837 | 839 | sRefPixMap.pPixel[0] = pRefPicture->pData[0]; |
| 838 | 840 | sRefPixMap.iSizeInBits = g_kiPixMapSizeInBits; |
| 839 | 841 | sRefPixMap.iStride[0] = pRefPicture->iLineSize[0]; |