openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

How to use LTR?

Open landuochong opened this issue 1 year ago • 1 comments

Hi experts, when I use LTR, I meet some questions.

  1. I need check the encoded frame is a LTR and get the frame number for feed , but I can't get these from SFrameBSInfo. Does it means I must modify the struct SFrameBSInfo to add the LTR info?
    I add follow code at the end of fuction WelsEncoderEncodeExt. But I do not know it's right or not.

` SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId]; SSpatialLayerInternal* pParamD = &pCtx->pSvcParam->sDependencyLayers[pCtx->uiDependencyId];

//get FrameNum, uiTemporalId of this frame WelsLog (pLogCtx, WELS_LOG_INFO, "WelsEncoderEncodeExt() end, iFrameNum = %d, findex = %d, tid=%d, idr=%d", pParamD->iFrameNum, pParamD->iFrameIndex, pCtx->uiTemporalId, pParamD->uiIdrPicId); `

  1. I find that if I change the LtrPeriod, it will only mark one frame in a GOP. If it receive decoder feedback or data invalid, it will mark another one.
  2. But I add test code , find that pLongRefList[i]->iFrameNum not equal with pLtr->iLtrMarkFbFrameNum in fuction HandleLTRMarkFeedback. And the reason is that pLongRefList has modified in LTRMarkProcess. But I donot konw why change.

I use webrtc test in windows.

Thanks!

landuochong avatar Mar 28 '23 11:03 landuochong

  1. There's not enough information provided in SFrameBSInfo to indicate LTR. 2.3. LTR is not suggested to modify due to other accompanied mechanisms (including feedbacks).

huili2 avatar Apr 20 '23 01:04 huili2