MCPcopy Create free account
hub / github.com/cisco/openh264 / GetAvailableRefList

Method GetAvailableRefList

codec/encoder/core/src/wels_preprocess.cpp:1017–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015
1016
1017void CWelsPreProcessScreen::GetAvailableRefList (SPicture** pSrcPicList, uint8_t iCurTid,
1018 const int32_t iClosestLtrFrameNum,
1019 SRefInfoParam* pAvailableRefList, int32_t& iAvailableRefNum, int32_t& iAvailableSceneRefNum) {
1020 const int32_t iSourcePicNum = m_iAvaliableRefInSpatialPicList;
1021 if (0 >= iSourcePicNum) {
1022 iAvailableRefNum = 0;
1023 iAvailableSceneRefNum = 0;
1024 return ;
1025 }
1026 SPicture* pRefPic = NULL;
1027 uint8_t uiRefTid = 0;
1028 iAvailableRefNum = 0;
1029 iAvailableSceneRefNum = 0;
1030
1031 //the saving order will be depend on pSrcPicList
1032 //TODO: use a frame_idx to find the closer ref in time distance, and correctly sort the ref list
1033 for (int32_t i = iSourcePicNum - 1; i >= 0; --i) {
1034 pRefPic = pSrcPicList[i];
1035 if (NULL == pRefPic || !pRefPic->bUsedAsRef) {
1036 continue;
1037 }
1038 uiRefTid = pRefPic->uiTemporalId;
1039
1040 if (uiRefTid <= iCurTid) {
1041 pAvailableRefList[iAvailableRefNum].pRefPicture = pRefPic;
1042 pAvailableRefList[iAvailableRefNum].iSrcListIdx = i + 1; //in SrcList, the idx 0 is reserved for CurPic
1043 iAvailableRefNum ++;
1044 }
1045 }
1046}
1047
1048
1049void CWelsPreProcessScreen::InitRefJudgement (SRefJudgement* pRefJudgement) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected