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

Function SlidingWindow

codec/decoder/core/src/manage_dec_ref.cpp:763–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763static int32_t SlidingWindow (PWelsDecoderContext pCtx, PRefPic pRefPic) {
764 PPicture pPic = NULL;
765 int32_t i = 0;
766
767 if (pRefPic->uiShortRefCount[LIST_0] + pRefPic->uiLongRefCount[LIST_0] >= pCtx->pSps->iNumRefFrames) {
768 if (pRefPic->uiShortRefCount[LIST_0] == 0) {
769 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "No reference picture in short term list when sliding window");
770 return ERR_INFO_INVALID_MMCO_REF_NUM_NOT_ENOUGH;
771 }
772 for (i = pRefPic->uiShortRefCount[LIST_0] - 1; i >= 0; i--) {
773 pPic = WelsDelShortFromList (pRefPic, pRefPic->pShortRefList[LIST_0][i]->iFrameNum);
774 if (pPic) {
775 SetUnRef (pPic);
776 break;
777 } else {
778 return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
779 }
780 }
781 }
782 return ERR_NONE;
783}
784
785static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum) {
786 int32_t i = 0;

Callers 2

WelsMarkAsRefFunction · 0.85

Calls 3

WelsLogFunction · 0.85
WelsDelShortFromListFunction · 0.85
SetUnRefFunction · 0.85

Tested by

no test coverage detected