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

Function GetPrevFrameNum

codec/decoder/core/inc/decoder_context.h:565–582  ·  view source on GitHub ↗

GetPrevFrameNum only applies when thread count >= 2

Source from the content-addressed store, hash-verified

563}
564//GetPrevFrameNum only applies when thread count >= 2
565static inline int32_t GetPrevFrameNum (PWelsDecoderContext pCtx) {
566 if (pCtx->uiDecodingTimeStamp > 0) {
567 PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
568 int32_t iThreadCount = int32_t (pThreadCtx->sThreadInfo.uiThrMaxNum);
569 int32_t uiThrNum = int32_t (pThreadCtx->sThreadInfo.uiThrNum);
570 for (int32_t i = 0; i < iThreadCount; ++i) {
571 int32_t id = i - uiThrNum;
572 if (id != 0 && pThreadCtx[id].pCtx->uiDecodingTimeStamp == pCtx->uiDecodingTimeStamp - 1) {
573 if (pThreadCtx[id].pCtx->pDec != NULL) {
574 int32_t iFrameNum = pThreadCtx[id].pCtx->pDec->iFrameNum;
575 if (iFrameNum >= 0) return iFrameNum;
576 }
577 return pThreadCtx[id].pCtx->iFrameNum;
578 }
579 }
580 }
581 return pCtx->pLastDecPicInfo->iPrevFrameNum;
582}
583//#ifdef __cplusplus
584//}
585//#endif//__cplusplus

Callers 1

DecodeCurrentAccessUnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected