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

Function WrapShortRefPicNum

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

Source from the content-addressed store, hash-verified

210}
211
212static void WrapShortRefPicNum (PWelsDecoderContext pCtx) {
213 int32_t i;
214 PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader;
215 int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum;
216 PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
217 int32_t iShortRefCount = pCtx->sRefPic.uiShortRefCount[LIST_0];
218 //wrap pic num
219 for (i = 0; i < iShortRefCount; i++) {
220 if (ppShoreRefList[i]) {
221 if (ppShoreRefList[i]->iFrameNum > pSliceHeader->iFrameNum)
222 ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum - iMaxPicNum;
223 else
224 ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum;
225 }
226 }
227}
228
229/**
230* fills the pRefPic.pRefList LIST_0 and LIST_0 for B-Slice.

Callers 2

WelsInitBSliceRefListFunction · 0.85
WelsInitRefListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected