Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all
Unified · Split
| @@ -2759,12 +2759,13 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2758 unmodified lines | |||
| 2759 | //const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag; | 2759 | //const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag; |
| 2760 | const bool kbHighestSpatialLayer = | 2760 | const bool kbHighestSpatialLayer = |
| 2761 | (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1)); | 2761 | (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1)); |
| 2762 | bool bFastMode = kbHighestSpatialLayer && (pCtx->pSvcParam->iComplexityMode == LOW_COMPLEXITY); | ||
| 2762 | SWelsFuncPtrList* pFuncList = pCtx->pFuncList; | 2763 | SWelsFuncPtrList* pFuncList = pCtx->pFuncList; |
| 2763 | SLogContext* pLogCtx = & (pCtx->sLogCtx); | 2764 | SLogContext* pLogCtx = & (pCtx->sLogCtx); |
| 2764 | /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */ | 2765 | /* 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) || |
| 2766 | (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME && P_SLICE == pCtx->eSliceType | 2767 | (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 |
| 2768 | ) { | 2769 | ) { |
| 2769 | SetFastCodingFunc (pFuncList); | 2770 | SetFastCodingFunc (pFuncList); |
| 2770 | } else { | 2771 | } else { |
| @@ -2786,7 +2787,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 15 unmodified lines | |||
| 2786 | pFuncList->sSampleDealingFuncs.pfMeCost = pCtx->pFuncList->sSampleDealingFuncs.pfSampleSatd; | 2787 | pFuncList->sSampleDealingFuncs.pfMeCost = pCtx->pFuncList->sSampleDealingFuncs.pfSampleSatd; |
| 2787 | pFuncList->pfSetScrollingMv = SetScrollingMvToMdNull; | 2788 | pFuncList->pfSetScrollingMv = SetScrollingMvToMdNull; |
| 2788 | 2789 | ||
| 2789 | if (kbHighestSpatialLayer) { | 2790 | if (bFastMode) { |
| 2790 | pFuncList->pfCalculateSatd = NotCalculateSatdCost; | 2791 | pFuncList->pfCalculateSatd = NotCalculateSatdCost; |
| 2791 | pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa; | 2792 | pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa; |
| 2792 | } else { | 2793 | } else { |