Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 4 files). Show all
Unified · Split
| @@ -3455,14 +3455,13 @@ EVideoFrameType PrepareEncodeFrame (sWelsEncCtx* pCtx, SLayerBSInfo*& pLayerBsIn · 3454 unmodified lines | ||
| 3455 | 3455 | |
| 3456 | 3456 | bool bSkipFrameFlag = WelsRcCheckFrameStatus (pCtx,uiTimeStamp,iSpatialNum); |
| 3457 | 3457 | EVideoFrameType eFrameType = DecideFrameType (pCtx, iSpatialNum, iCurDid, bSkipFrameFlag); |
| 3458 | − | |
| 3459 | 3458 | if (eFrameType == videoFrameTypeSkip) { |
| 3460 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | |
| 3461 | − "[Rc] Frame timestamp = %lld, skip one frame due to target_br, continual skipped %d frames", | |
| 3462 | − uiTimeStamp, pCtx->iContinualSkipFrames); | |
| 3463 | 3459 | if (pSvcParam->bSimulcastAVC) { |
| 3464 | 3460 | if (pCtx->pFuncList->pfRc.pfWelsUpdateBufferWhenSkip) |
| 3465 | 3461 | pCtx->pFuncList->pfRc.pfWelsUpdateBufferWhenSkip (pCtx, iCurDid); |
| 3462 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | |
| 3463 | + "[Rc] Frame timestamp = %lld, iDid = %d,skip one frame due to target_br, continual skipped %d frames", | |
| 3464 | + uiTimeStamp, iCurDid, pCtx->pWelsSvcRc[iCurDid].iContinualSkipFrames); | |
| 3466 | 3465 | } |
| 3467 | 3466 | |
| 3468 | 3467 | else { |
| @@ -3471,11 +3470,14 @@ EVideoFrameType PrepareEncodeFrame (sWelsEncCtx* pCtx, SLayerBSInfo*& pLayerBsIn · 2 unmodified lines | ||
| 3471 | 3470 | pCtx->pFuncList->pfRc.pfWelsUpdateBufferWhenSkip (pCtx, (pSpatialIndexMap + i)->iDid); |
| 3472 | 3471 | } |
| 3473 | 3472 | } |
| 3473 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | |
| 3474 | + "[Rc] Frame timestamp = %lld, iDid = %d,skip one frame due to target_br, continual skipped %d frames", | |
| 3475 | + uiTimeStamp, pSpatialIndexMap->iDid, pCtx->pWelsSvcRc[pSpatialIndexMap->iDid].iContinualSkipFrames); | |
| 3474 | 3476 | } |
| 3475 | 3477 | |
| 3476 | 3478 | } else { |
| 3477 | 3479 | SSpatialLayerInternal* pParamInternal = &pSvcParam->sDependencyLayers[iCurDid]; |
| 3478 | − pCtx->iContinualSkipFrames = 0; | |
| 3480 | + | |
| 3479 | 3481 | iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[iCurDid], pParamInternal->iCodingIndex, |
| 3480 | 3482 | pSvcParam->uiGopSize); |
| 3481 | 3483 | pCtx->uiTemporalId = iCurTid; |
| @@ -3500,10 +3502,12 @@ EVideoFrameType PrepareEncodeFrame (sWelsEncCtx* pCtx, SLayerBSInfo*& pLayerBsIn · 18 unmodified lines | ||
| 3500 | 3502 | for (int32_t i = 0; i < pSvcParam->iSpatialLayerNum; i++) { |
| 3501 | 3503 | SSpatialLayerInternal* pParamInternal = &pSvcParam->sDependencyLayers[i]; |
| 3502 | 3504 | pParamInternal->iCodingIndex ++; |
| 3505 | + pCtx->pWelsSvcRc[i].iContinualSkipFrames = 0; | |
| 3503 | 3506 | } |
| 3504 | 3507 | } else { |
| 3505 | 3508 | SSpatialLayerInternal* pParamInternal = &pSvcParam->sDependencyLayers[iCurDid]; |
| 3506 | 3509 | pParamInternal->iCodingIndex++; |
| 3510 | + pCtx->pWelsSvcRc[iCurDid].iContinualSkipFrames = 0; | |
| 3507 | 3511 | } |
| 3508 | 3512 | } |
| 3509 | 3513 | return eFrameType; |
| @@ -3575,8 +3579,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 65 unmodified lines | ||
| 3575 | 3579 | pFbi->eFrameType = videoFrameTypeSkip; |
| 3576 | 3580 | pLayerBsInfo->eFrameType = videoFrameTypeSkip; |
| 3577 | 3581 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, |
| 3578 | − "[Rc] Frame timestamp = %lld, skip one frame due to preprocessing return (temporal layer settings or else), continual skipped %d frames", | |
| 3579 | − pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames); | |
| 3582 | + "[Rc] Frame timestamp = %lld, skip one frame due to preprocessing return (temporal layer settings or else)", | |
| 3583 | + pSrcPic->uiTimeStamp); | |
| 3580 | 3584 | return ENC_RETURN_SUCCESS; |
| 3581 | 3585 | } |
| 3582 | 3586 | |
| @@ -3935,9 +3939,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 352 unmodified lines | ||
| 3935 | 3939 | } |
| 3936 | 3940 | |
| 3937 | 3941 | WelsRcPostFrameSkippedUpdate (pCtx, iCurDid); |
| 3938 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, | |
| 3939 | − "[Rc] Frame timestamp = %lld, skip one frame due to post skip, continual skipped %d frames", | |
| 3940 | − pFbi->uiTimeStamp, pCtx->iContinualSkipFrames); | |
| 3941 | 3942 | pCtx->iEncoderError = ENC_RETURN_SUCCESS; |
| 3942 | 3943 | return ENC_RETURN_SUCCESS; |
| 3943 | 3944 | } |