commit 9c95d6a0b10d2e40cb5003934ccc98af6330dfcb Author: JuannyWang <hongjwan@cisco.com> Date: Thu Jun 19 10:43:15 2014 +0800 [delay skip] delay skip to relieve bitrate burst somehow
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 15 files). Show all
Unified · Split
| @@ -2938,6 +2938,23 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2937 unmodified lines | |||
| 2938 | return ENC_RETURN_SUCCESS; | 2938 | return ENC_RETURN_SUCCESS; |
| 2939 | } | 2939 | } |
| 2940 | 2940 | ||
| 2941 | //loop each layer to check if have skip frame when RC and frame skip enable | ||
| 2942 | if (RC_OFF_MODE != pCtx->pSvcParam->iRCMode && true == pCtx->pSvcParam->bEnableFrameSkip) { | ||
| 2943 | bool bSkipMustFlag = false; | ||
| 2944 | for (int32_t i = 0; i< iSpatialNum; i++) { | ||
| 2945 | pCtx->uiDependencyId = (uint8_t)(pSpatialIndexMap+i)->iDid; | ||
| 2946 | pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge(pCtx); | ||
| 2947 | if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) { | ||
| 2948 | bSkipMustFlag = true; | ||
| 2949 | } | ||
| 2950 | } | ||
| 2951 | if (true == bSkipMustFlag) { | ||
| 2952 | pFbi->eOutputFrameType = videoFrameTypeSkip; | ||
| 2953 | return ENC_RETURN_SUCCESS; | ||
| 2954 | } | ||
| 2955 | } | ||
| 2956 | |||
| 2957 | |||
| 2941 | InitFrameCoding (pCtx, eFrameType); | 2958 | InitFrameCoding (pCtx, eFrameType); |
| 2942 | 2959 | ||
| 2943 | iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex, | 2960 | iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex, |