openh264
openh264 copied to clipboard
How to use LTR?
Hi experts, when I use LTR, I meet some questions.
- 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); `
- 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.
- 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!
- 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).