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

Function UpdateFrameNum

codec/encoder/core/src/encoder.cpp:234–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void UpdateFrameNum (sWelsEncCtx* pEncCtx, const int32_t kiDidx) {
235 SSpatialLayerInternal* pParamInternal = &pEncCtx->pSvcParam->sDependencyLayers[kiDidx];
236 bool bNeedFrameNumIncreasing = false;
237
238 if (NRI_PRI_LOWEST != pEncCtx->eLastNalPriority[kiDidx]) {
239 bNeedFrameNumIncreasing = true;
240 }
241
242 if (bNeedFrameNumIncreasing) {
243 if (pParamInternal->iFrameNum < (1 << pEncCtx->pSps->uiLog2MaxFrameNum) - 1)
244 ++ pParamInternal->iFrameNum;
245 else
246 pParamInternal->iFrameNum = 0; // if iFrameNum overflow
247 }
248
249 pEncCtx->eLastNalPriority[kiDidx] = NRI_PRI_LOWEST;
250}
251
252
253void LoadBackFrameNum (sWelsEncCtx* pEncCtx, const int32_t kiDidx) {

Callers 1

InitFrameCodingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected