History

use the same complexity computation branch for screen and camera

ruil2 committed 11 years ago

Commit 173ec601 parent 827c7b22 files · +11 −12Browse files

Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 2 files). Show all

Unified · Split

codec/encoder/core/src/wels_preprocess.cpp+9−9
@@ -250,7 +250,6 @@ int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiD · 249 unmodified lines
250 250
251 AdaptiveQuantCalculation (pCtx->pVaa, pCurPic, pRefPic);251 AdaptiveQuantCalculation (pCtx->pVaa, pCurPic, pRefPic);
252 }252 }
253 AnalyzePictureComplexity (pCtx, pCurPic, pRefPic, kiDidx, bCalculateBGD);
254 WelsExchangeSpatialPictures (&m_pLastSpatialPicture[kiDidx][1], &m_pLastSpatialPicture[kiDidx][0]);253 WelsExchangeSpatialPictures (&m_pLastSpatialPicture[kiDidx][1], &m_pLastSpatialPicture[kiDidx][0]);
255 }254 }
256 return 0;255 return 0;
@@ -735,8 +734,6 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 478 unmodified lines
735 SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;734 SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
736 int32_t iComplexityAnalysisMode = 0;735 int32_t iComplexityAnalysisMode = 0;
737 736
738 if (pSvcParam->iRCMode == RC_OFF_MODE)
739 return;
740 if (pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {737 if (pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
741 SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);738 SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
742 SComplexityAnalysisScreenParam* sComplexityAnalysisParam = &pVaaExt->sComplexityScreenParam;739 SComplexityAnalysisScreenParam* sComplexityAnalysisParam = &pVaaExt->sComplexityScreenParam;
@@ -806,7 +803,8 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 63 unmodified lines
806 sComplexityAnalysisParam->iComplexityAnalysisMode = iComplexityAnalysisMode;803 sComplexityAnalysisParam->iComplexityAnalysisMode = iComplexityAnalysisMode;
807 sComplexityAnalysisParam->pCalcResult = & (pVaaInfo->sVaaCalcInfo);804 sComplexityAnalysisParam->pCalcResult = & (pVaaInfo->sVaaCalcInfo);
808 sComplexityAnalysisParam->pBackgroundMbFlag = pVaaInfo->pVaaBackgroundMbFlag;805 sComplexityAnalysisParam->pBackgroundMbFlag = pVaaInfo->pVaaBackgroundMbFlag;
809 SetRefMbType (pCtx, & (sComplexityAnalysisParam->uiRefMbType), pRefPicture->iPictureType);806 if(pRefPicture)
807 SetRefMbType (pCtx, & (sComplexityAnalysisParam->uiRefMbType), pRefPicture->iPictureType);
810 sComplexityAnalysisParam->iCalcBgd = bCalculateBGD;808 sComplexityAnalysisParam->iCalcBgd = bCalculateBGD;
811 sComplexityAnalysisParam->iFrameComplexity = 0;809 sComplexityAnalysisParam->iFrameComplexity = 0;
812 810
@@ -833,11 +831,13 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 20 unmodified lines
833 sSrcPixMap.sRect.iRectHeight = pCurPicture->iHeightInPixel;831 sSrcPixMap.sRect.iRectHeight = pCurPicture->iHeightInPixel;
834 sSrcPixMap.eFormat = VIDEO_FORMAT_I420;832 sSrcPixMap.eFormat = VIDEO_FORMAT_I420;
835 833
836 sRefPixMap.pPixel[0] = pRefPicture->pData[0];834 if(pRefPicture){
837 sRefPixMap.iSizeInBits = g_kiPixMapSizeInBits;835 sRefPixMap.pPixel[0] = pRefPicture->pData[0];
838 sRefPixMap.iStride[0] = pRefPicture->iLineSize[0];836 sRefPixMap.iSizeInBits = g_kiPixMapSizeInBits;
839 sRefPixMap.sRect.iRectWidth = pRefPicture->iWidthInPixel;837 sRefPixMap.iStride[0] = pRefPicture->iLineSize[0];
840 sRefPixMap.sRect.iRectHeight = pRefPicture->iHeightInPixel;838 sRefPixMap.sRect.iRectWidth = pRefPicture->iWidthInPixel;
839 sRefPixMap.sRect.iRectHeight = pRefPicture->iHeightInPixel;
840 }
841 sRefPixMap.eFormat = VIDEO_FORMAT_I420;841 sRefPixMap.eFormat = VIDEO_FORMAT_I420;
842 842
843 iRet = m_pInterfaceVp->Set (iMethodIdx, (void*)sComplexityAnalysisParam);843 iRet = m_pInterfaceVp->Set (iMethodIdx, (void*)sComplexityAnalysisParam);

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