ref: 30da4f196ec88ffe1cada8bc820f4e60d9bc8644
parent: 25818b0fc217e273ead203c86b36e3c5af81d909
parent: 10dfb2670bbf3df00e0124e2a301bee2ffdd22ca
author: sijchen <sijchen@cisco.com>
date: Thu Mar 24 05:49:48 EDT 2016
Merge pull request #2426 from ruil2/fix_trace fix skip frames statistics issue
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3797,6 +3797,7 @@
#endif//_DEBUG
pCtx->iEncoderError = ENC_RETURN_SUCCESS;
pCtx->bCurFrameMarkedAsSceneLtr = false;
+ pFbi->eFrameType = videoFrameTypeSkip;
pFbi->iLayerNum = 0; // for initialization
pFbi->uiTimeStamp = GetTimestampForRc (pSrcPic->uiTimeStamp, pCtx->uiLastTimestamp, pCtx->pSvcParam->sSpatialLayers[pCtx->pSvcParam->iSpatialLayerNum - 1].fFrameRate);
for (int32_t iNalIdx = 0; iNalIdx < MAX_LAYER_NUM_OF_FRAME; iNalIdx++) {
@@ -3811,7 +3812,6 @@
if (iSpatialNum < 1) {
// ++ pCtx->iCodingIndex;
pLayerBsInfo->eFrameType = videoFrameTypeSkip;
- pFbi->eFrameType = videoFrameTypeSkip;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
"[Rc] Frame timestamp = %lld, skip one frame due to preprocessing return (temporal layer settings or else), continual skipped %d frames",
pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames);
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -574,7 +574,7 @@
int32_t iMaxDid = m_pEncContext->pSvcParam->iSpatialLayerNum - 1;
SLayerBSInfo* pLayerInfo = &pBsInfo->sLayerInfo[0];
for (int32_t iDid = 0; iDid <= iMaxDid; iDid++) {
- EVideoFrameType eFrameType = videoFrameTypeInvalid;
+ EVideoFrameType eFrameType = pBsInfo->eFrameType;
int32_t kiCurrentFrameSize = 0;
if (pBsInfo->eFrameType == videoFrameTypeSkip) {
eFrameType = videoFrameTypeSkip;