fix the issue that long term reference frame is disable for screen
This commit is contained in:
parent
2006efc1e0
commit
2508cf925f
@ -369,8 +369,9 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
|
|||||||
iNumRefFrame = WELS_MAX(1, WELS_LOG2 (uiGopSize)) + iLTRRefNum;
|
iNumRefFrame = WELS_MAX(1, WELS_LOG2 (uiGopSize)) + iLTRRefNum;
|
||||||
} else {
|
} else {
|
||||||
iLTRRefNum = 0;
|
iLTRRefNum = 0;
|
||||||
|
|
||||||
if( iNumRefFrame == AUTO_REF_PIC_COUNT)
|
if( iNumRefFrame == AUTO_REF_PIC_COUNT)
|
||||||
iNumRefFrame = 1;
|
iNumRefFrame = WELS_MAX(1, uiGopSize>>1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
iLTRRefNum = bEnableLongTermReference ? WELS_CLIP3(pCodingParam.iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
|
iLTRRefNum = bEnableLongTermReference ? WELS_CLIP3(pCodingParam.iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
|
||||||
|
@ -292,7 +292,6 @@ EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum
|
|||||||
} else {
|
} else {
|
||||||
bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;
|
bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;
|
||||||
}
|
}
|
||||||
pEncCtx->bCurFrameMarkedAsSceneLtr = false;
|
|
||||||
if (pEncCtx->pVaa->bIdrPeriodFlag || pEncCtx->bEncCurFrmAsIdrFlag || (!pSvcParam->bEnableLongTermReference
|
if (pEncCtx->pVaa->bIdrPeriodFlag || pEncCtx->bEncCurFrmAsIdrFlag || (!pSvcParam->bEnableLongTermReference
|
||||||
&& bSceneChangeFlag)) {
|
&& bSceneChangeFlag)) {
|
||||||
iFrameType = videoFrameTypeIDR;
|
iFrameType = videoFrameTypeIDR;
|
||||||
|
@ -2867,6 +2867,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
|
|||||||
#endif//_DEBUG
|
#endif//_DEBUG
|
||||||
|
|
||||||
pCtx->iEncoderError = ENC_RETURN_SUCCESS;
|
pCtx->iEncoderError = ENC_RETURN_SUCCESS;
|
||||||
|
pCtx->bCurFrameMarkedAsSceneLtr = false;
|
||||||
pFbi->iLayerNum = 0; // for initialization
|
pFbi->iLayerNum = 0; // for initialization
|
||||||
pFbi->uiTimeStamp = pSrcPic->uiTimeStamp;
|
pFbi->uiTimeStamp = pSrcPic->uiTimeStamp;
|
||||||
// perform csc/denoise/downsample/padding, generate spatial layers
|
// perform csc/denoise/downsample/padding, generate spatial layers
|
||||||
|
@ -350,7 +350,7 @@ int CWelsH264SVCEncoder::InitializeInternal(SWelsSvcCodingParam* pCfg) {
|
|||||||
pCfg->iNumRefFrame = WELS_MAX(1,WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
|
pCfg->iNumRefFrame = WELS_MAX(1,WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
|
||||||
} else {
|
} else {
|
||||||
pCfg->iLTRRefNum = 0;
|
pCfg->iLTRRefNum = 0;
|
||||||
pCfg->iNumRefFrame = 1;
|
pCfg->iNumRefFrame = WELS_MAX(1, pCfg->uiGopSize>>1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
|
pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user