History

add rc function

ruil2 committed 11 years ago

Commit 5b5cc841 parent 993caea5 files · +228 −96Browse files

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

Unified · Split

codec/encoder/core/src/wels_preprocess.cpp+7−5
@@ -228,7 +228,6 @@ int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiD · 227 unmodified lines
228228 if (pSvcParam->bEnableBackgroundDetection) {
229229 BackgroundDetection (pCtx->pVaa, pCurPic, pRefPic, bCalculateBGD && pRefPic->iPictureType != I_SLICE);
230230 }
231−
232231 if (bNeededMbAq) {
233232 AdaptiveQuantCalculation (pCtx->pVaa, pCurPic, pRefPic);
234233 }
@@ -795,17 +794,20 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 560 unmodified lines
795794
796795 if (pSvcParam->iRCMode == RC_QUALITY_MODE && pCtx->eSliceType == P_SLICE) {
797796 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) {
799799 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) {
801802 iComplexityAnalysisMode = GOM_VAR;
802803 } else {
803804 return;
804805 }
806+
805807 sComplexityAnalysisParam->iComplexityAnalysisMode = iComplexityAnalysisMode;
806808 sComplexityAnalysisParam->pCalcResult = & (pVaaInfo->sVaaCalcInfo);
807809 sComplexityAnalysisParam->pBackgroundMbFlag = pVaaInfo->pVaaBackgroundMbFlag;
808− if(pRefPicture)
810+ if (pRefPicture)
809811 SetRefMbType (pCtx, & (sComplexityAnalysisParam->uiRefMbType), pRefPicture->iPictureType);
810812 sComplexityAnalysisParam->iCalcBgd = bCalculateBGD;
811813 sComplexityAnalysisParam->iFrameComplexity = 0;
@@ -833,7 +835,7 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu · 21 unmodified lines
833835 sSrcPixMap.sRect.iRectHeight = pCurPicture->iHeightInPixel;
834836 sSrcPixMap.eFormat = VIDEO_FORMAT_I420;
835837
836− if(pRefPicture){
838+ if (pRefPicture) {
837839 sRefPixMap.pPixel[0] = pRefPicture->pData[0];
838840 sRefPixMap.iSizeInBits = g_kiPixMapSizeInBits;
839841 sRefPixMap.iStride[0] = pRefPicture->iLineSize[0];

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