GetPrevFrameNum only applies when thread count >= 2
| 563 | } |
| 564 | //GetPrevFrameNum only applies when thread count >= 2 |
| 565 | static 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 |
no outgoing calls
no test coverage detected