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

Method BufferingReadyPicture

codec/decoder/plus/src/welsDecoderExt.cpp:992–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992void CWelsDecoder::BufferingReadyPicture (PWelsDecoderContext pCtx, unsigned char** ppDst,
993 SBufferInfo* pDstInfo) {
994 if (pDstInfo->iBufferStatus == 0) {
995 return;
996 }
997 m_bIsBaseline = pCtx->pSps->uiProfileIdc == 66 || pCtx->pSps->uiProfileIdc == 83;
998 if (!m_bIsBaseline) {
999 if (pCtx->pSliceHeader->eSliceType == B_SLICE) {
1000 m_sReoderingStatus.bHasBSlice = true;
1001 }
1002 }
1003 for (int32_t i = 0; i < 16; ++i) {
1004 if (m_sPictInfoList[i].iPOC == IMinInt32) {
1005 memcpy (&m_sPictInfoList[i].sBufferInfo, pDstInfo, sizeof (SBufferInfo));
1006 m_sPictInfoList[i].iPOC = pCtx->pSliceHeader->iPicOrderCntLsb;
1007 m_sPictInfoList[i].iSeqNum = pCtx->iSeqNum;
1008 m_sPictInfoList[i].uiDecodingTimeStamp = pCtx->uiDecodingTimeStamp;
1009 if (pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb != NULL) {
1010 m_sPictInfoList[i].iPicBuffIdx = pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iPicBuffIdx;
1011 if (GetThreadCount (pCtx) <= 1) ++pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iRefCount;
1012 }
1013 m_iLastBufferedIdx = i;
1014 pDstInfo->iBufferStatus = 0;
1015 ++m_sReoderingStatus.iNumOfPicts;
1016 if (i > m_sReoderingStatus.iLargestBufferedPicIndex) {
1017 m_sReoderingStatus.iLargestBufferedPicIndex = i;
1018 }
1019 break;
1020 }
1021 }
1022}
1023
1024void CWelsDecoder::ReleaseBufferedReadyPictureReorder (PWelsDecoderContext pCtx, unsigned char** ppDst,
1025 SBufferInfo* pDstInfo, bool isFlush) {

Callers

nothing calls this directly

Calls 1

GetThreadCountFunction · 0.85

Tested by

no test coverage detected