Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1493,6 +1493,8 @@ static bool CheckNewSeqBeginAndUpdateActiveLayerSps(PWelsDecoderContext pCtx) { · 1492 unmodified lines | |||
| 1493 | for(unsigned int i = pCurAu->uiStartPos; i <= pCurAu->uiEndPos; i++) { | 1493 | for(unsigned int i = pCurAu->uiStartPos; i <= pCurAu->uiEndPos; i++) { |
| 1494 | uint32_t uiDid = pCurAu->pNalUnitsList[i]->sNalHeaderExt.uiDependencyId; | 1494 | uint32_t uiDid = pCurAu->pNalUnitsList[i]->sNalHeaderExt.uiDependencyId; |
| 1495 | pTmpLayerSps[uiDid] = pCurAu->pNalUnitsList[i]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps; | 1495 | pTmpLayerSps[uiDid] = pCurAu->pNalUnitsList[i]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps; |
| 1496 | if ((pCurAu->pNalUnitsList[i]->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR) || (pCurAu->pNalUnitsList[i]->sNalHeaderExt.bIdrFlag)) | ||
| 1497 | bNewSeq = true; | ||
| 1496 | } | 1498 | } |
| 1497 | int iMaxActiveLayer = 0, iMaxCurrentLayer = 0; | 1499 | int iMaxActiveLayer = 0, iMaxCurrentLayer = 0; |
| 1498 | for(int i = MAX_LAYER_NUM - 1; i >= 0; i--) { | 1500 | for(int i = MAX_LAYER_NUM - 1; i >= 0; i--) { |
| @@ -1642,19 +1644,12 @@ static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PN · 143 unmodified lines | |||
| 1642 | } | 1644 | } |
| 1643 | 1645 | ||
| 1644 | void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) { | 1646 | void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) { |
| 1645 | SNalUnitHeader* pNalHdr = &pCurNal->sNalHeaderExt.sNalUnitHeader; | ||
| 1646 | PSliceHeader pSh = &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader; | 1647 | PSliceHeader pSh = &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader; |
| 1647 | 1648 | ||
| 1648 | pCtx->eSliceType = pSh->eSliceType; | 1649 | pCtx->eSliceType = pSh->eSliceType; |
| 1649 | pCtx->pSliceHeader = pSh; | 1650 | pCtx->pSliceHeader = pSh; |
| 1650 | 1651 | ||
| 1651 | pCtx->iFrameNum = pSh->iFrameNum; | 1652 | pCtx->iFrameNum = pSh->iFrameNum; |
| 1652 | |||
| 1653 | if ((pNalHdr->eNalUnitType == NAL_UNIT_CODED_SLICE_IDR || | ||
| 1654 | (pCurNal->sNalHeaderExt.uiQualityId == BASE_QUALITY_ID && pCurNal->sNalHeaderExt.bIdrFlag)) && | ||
| 1655 | pSh->iFrameNum == 0) { //pSh->iFrameNum == 0 this condition can deleted?????? | ||
| 1656 | WelsResetRefPic (pCtx); // Reset decoded picture buffer lists due to an IDR frame incomes | ||
| 1657 | } | ||
| 1658 | } | 1653 | } |
| 1659 | 1654 | ||
| 1660 | int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool kbFirstSlice, int32_t iPoc) { | 1655 | int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool kbFirstSlice, int32_t iPoc) { |