Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -2950,7 +2950,8 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 2949 unmodified lines | ||
| 2950 | 2950 | } |
| 2951 | 2951 | |
| 2952 | 2952 | //loop each layer to check if have skip frame when RC and frame skip enable (maxbr>0) |
| 2953 | −bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { | |
| 2953 | +bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum, EVideoFrameType eFrameType, | |
| 2954 | + const uint32_t uiTimeStamp) { | |
| 2954 | 2955 | SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0]; |
| 2955 | 2956 | bool bSkipMustFlag = false; |
| 2956 | 2957 | if (pCtx->pSvcParam->bEnableFrameSkip) { |
| @@ -2960,7 +2961,7 @@ bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { · 3 unmodified lines | ||
| 2960 | 2961 | break; |
| 2961 | 2962 | } |
| 2962 | 2963 | pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid; |
| 2963 | − pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx); | |
| 2964 | + pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx, eFrameType, uiTimeStamp); | |
| 2964 | 2965 | if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) { |
| 2965 | 2966 | bSkipMustFlag = true; |
| 2966 | 2967 | break; |
| @@ -3034,7 +3035,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 67 unmodified lines | ||
| 3034 | 3035 | } |
| 3035 | 3036 | |
| 3036 | 3037 | //loop each layer to check if have skip frame when RC and frame skip enable |
| 3037 | − if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum)) { | |
| 3038 | + if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, (uint32_t)pSrcPic->uiTimeStamp)) { | |
| 3038 | 3039 | pFbi->eFrameType = videoFrameTypeSkip; |
| 3039 | 3040 | return ENC_RETURN_SUCCESS; |
| 3040 | 3041 | } |