Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 3 files). Show all
Unified · Split
| @@ -62,9 +62,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 61 unmodified lines | ||
| 62 | 62 | pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); |
| 63 | 63 | bFrameCompleteFlag = false; //return later after output buffer is done |
| 64 | 64 | } |
| 65 | −#ifdef NO_WAITING_AU | |
| 65 | + | |
| 66 | 66 | pCtx->iTotalNumMbRec = 0; |
| 67 | −#endif | |
| 68 | 67 | |
| 69 | 68 | if (pCtx->bNewSeqBegin) { |
| 70 | 69 | memcpy (& (pCtx->sFrameCrop), & (pCurDq->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.pSps->sFrameCrop), |
| @@ -1749,17 +1748,13 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1678 unmodified lines | ||
| 1749 | 1748 | } |
| 1750 | 1749 | } |
| 1751 | 1750 | |
| 1752 | −#ifdef NO_WAITING_AU | |
| 1753 | 1751 | //For fixing the nal lossing issue |
| 1754 | 1752 | if ((pCtx->iTotalNumMbRec != 0) && |
| 1755 | 1753 | (CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pNalCur->sNalHeaderExt, &pCtx->sLastSliceHeader, |
| 1756 | 1754 | &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) { |
| 1757 | 1755 | pCtx->iTotalNumMbRec = 0; |
| 1758 | 1756 | } |
| 1759 | −#else | |
| 1760 | − //initialize at the starting of AU. | |
| 1761 | − pCtx->iTotalNumMbRec = 0; | |
| 1762 | −#endif | |
| 1757 | + | |
| 1763 | 1758 | if (pCtx->iTotalNumMbRec == 0) { //Picture start to decode |
| 1764 | 1759 | for (int32_t i = 0; i < LAYER_NUM_EXCHANGEABLE; ++ i) |
| 1765 | 1760 | memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t))); |
| @@ -1908,16 +1903,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 142 unmodified lines | ||
| 1908 | 1903 | |
| 1909 | 1904 | if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) { |
| 1910 | 1905 | if (DecodeFrameConstruction (pCtx, ppDst, pDstLen, pWidth, pHeight, pDstInfo)) { |
| 1911 | −#ifdef NO_WAITING_AU | |
| 1912 | 1906 | memcpy (&pCtx->sLastNalHdrExt, &pCurAu->pNalUnitsList[iIdx - 1]->sNalHeaderExt, sizeof (SNalUnitHeaderExt)); |
| 1913 | 1907 | memcpy (&pCtx->sLastSliceHeader, &pCurAu->pNalUnitsList[iIdx - 1]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader, |
| 1914 | 1908 | sizeof (SSliceHeader)); |
| 1915 | 1909 | return ERR_NONE; |
| 1916 | −#else | |
| 1917 | − pCtx->iErrorCode |= dsBitstreamError; | |
| 1918 | − return -1; | |
| 1919 | −#endif | |
| 1920 | − | |
| 1921 | 1910 | } |
| 1922 | 1911 | |
| 1923 | 1912 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for EC |