diff --git a/codec/encoder/core/inc/rc.h b/codec/encoder/core/inc/rc.h index ad23789e..3fb560b3 100644 --- a/codec/encoder/core/inc/rc.h +++ b/codec/encoder/core/inc/rc.h @@ -269,7 +269,7 @@ void RcTraceFrameBits (sWelsEncCtx* pEncCtx, long long uiTimeStamp); void WelsRcInitModule (sWelsEncCtx* pCtx, RC_MODES iRcMode); void WelsRcInitFuncPointers (sWelsEncCtx* pEncCtx, RC_MODES iRcMode); void WelsRcFreeMemory (sWelsEncCtx* pCtx); -bool WelsRcCheckFrameStatus (sWelsEncCtx* pEncCtx,long long uiTimeStamp,int32_t iSpatialNum); +bool WelsRcCheckFrameStatus (sWelsEncCtx* pEncCtx,long long uiTimeStamp,int32_t iSpatialNum,int32_t iCurDid); bool WelsUpdateSkipFrameStatus(); long long GetTimestampForRc(const long long uiTimeStamp, const long long uiLastTimeStamp, const float fFrameRate); diff --git a/codec/encoder/core/src/encoder_ext.cpp b/codec/encoder/core/src/encoder_ext.cpp index 28041e75..50114e42 100644 --- a/codec/encoder/core/src/encoder_ext.cpp +++ b/codec/encoder/core/src/encoder_ext.cpp @@ -3453,7 +3453,7 @@ EVideoFrameType PrepareEncodeFrame (sWelsEncCtx* pCtx, SLayerBSInfo*& pLayerBsIn SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam; SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0]; - bool bSkipFrameFlag = WelsRcCheckFrameStatus (pCtx,uiTimeStamp,iSpatialNum); + bool bSkipFrameFlag = WelsRcCheckFrameStatus (pCtx,uiTimeStamp,iSpatialNum,iCurDid); EVideoFrameType eFrameType = DecideFrameType (pCtx, iSpatialNum, iCurDid, bSkipFrameFlag); if (eFrameType == videoFrameTypeSkip) { diff --git a/codec/encoder/core/src/ratectl.cpp b/codec/encoder/core/src/ratectl.cpp index cfe6be25..3b7379f4 100644 --- a/codec/encoder/core/src/ratectl.cpp +++ b/codec/encoder/core/src/ratectl.cpp @@ -768,7 +768,7 @@ void CheckFrameSkipBasedMaxbr (sWelsEncCtx* pEncCtx, const long long uiTimeStamp } } -bool WelsRcCheckFrameStatus (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_t iSpatialNum) { +bool WelsRcCheckFrameStatus (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_t iSpatialNum,int32_t iCurDid) { bool bSkipMustFlag = false; @@ -777,7 +777,7 @@ bool WelsRcCheckFrameStatus (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_ //simul_cast AVC control if (pEncCtx->pSvcParam->bSimulcastAVC) { //check target_br skip and update info - int32_t iDidIdx = pSpatialIndexMap->iDid; + int32_t iDidIdx = iCurDid; if (pEncCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge) { pEncCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pEncCtx, uiTimeStamp, iDidIdx); }