History

set complexity mode

Karina committed 10 years ago

Commit 3dff2621 parent 5a8f5e83 files · +6 −5Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+4−3
@@ -2759,12 +2759,13 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2758 unmodified lines
27592759 //const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag;
27602760 const bool kbHighestSpatialLayer =
27612761 (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1));
2762+ bool bFastMode = kbHighestSpatialLayer && (pCtx->pSvcParam->iComplexityMode == LOW_COMPLEXITY);
27622763 SWelsFuncPtrList* pFuncList = pCtx->pFuncList;
27632764 SLogContext* pLogCtx = & (pCtx->sLogCtx);
27642765 /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */
2765− if ((pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME && kbHighestSpatialLayer) ||
2766+ if ((pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME && bFastMode) ||
27662767 (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME && P_SLICE == pCtx->eSliceType
2767− && kbHighestSpatialLayer) //TODO: here is for sync with the origin code, consider the design again with more tests
2768+ && bFastMode) //TODO: here is for sync with the origin code, consider the design again with more tests
27682769 ) {
27692770 SetFastCodingFunc (pFuncList);
27702771 } else {
@@ -2786,7 +2787,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 15 unmodified lines
27862787 pFuncList->sSampleDealingFuncs.pfMeCost = pCtx->pFuncList->sSampleDealingFuncs.pfSampleSatd;
27872788 pFuncList->pfSetScrollingMv = SetScrollingMvToMdNull;
27882789
2789− if (kbHighestSpatialLayer) {
2790+ if (bFastMode) {
27902791 pFuncList->pfCalculateSatd = NotCalculateSatdCost;
27912792 pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa;
27922793 } else {

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