Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all
Unified · Split
| @@ -54,14 +54,14 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | const int32_t kiTotalNumMbInCurLayer = pCurDq->iMbWidth * pCurDq->iMbHeight; |
| 56 | 56 | |
| 57 | − if (pPic->iTotalNumMbRec != kiTotalNumMbInCurLayer) { | |
| 57 | + if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) { | |
| 58 | 58 | WelsLog (pCtx, WELS_LOG_WARNING, |
| 59 | 59 | "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n", |
| 60 | − pPic->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); | |
| 60 | + pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); | |
| 61 | 61 | return -1; |
| 62 | 62 | } |
| 63 | 63 | #ifdef NO_WAITING_AU |
| 64 | − pPic->iTotalNumMbRec = 0; | |
| 64 | + pCtx->iTotalNumMbRec = 0; | |
| 65 | 65 | #endif |
| 66 | 66 | |
| 67 | 67 | if (I_SLICE == pCurDq->sLayerInfo.sSliceInLayer.eSliceType) { |
| @@ -1738,16 +1738,16 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1670 unmodified lines | ||
| 1738 | 1738 | |
| 1739 | 1739 | #ifdef NO_WAITING_AU |
| 1740 | 1740 | //For fixing the nal lossing issue |
| 1741 | − if ((pCtx->pDec->iTotalNumMbRec != 0) && | |
| 1741 | + if ((pCtx->iTotalNumMbRec != 0) && | |
| 1742 | 1742 | (CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pNalCur->sNalHeaderExt, &pCtx->sLastSliceHeader, |
| 1743 | 1743 | &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) { |
| 1744 | − pCtx->pDec->iTotalNumMbRec = 0; | |
| 1744 | + pCtx->iTotalNumMbRec = 0; | |
| 1745 | 1745 | } |
| 1746 | 1746 | #else |
| 1747 | 1747 | //initialize at the starting of AU. |
| 1748 | − pCtx->pDec->iTotalNumMbRec = 0; | |
| 1748 | + pCtx->iTotalNumMbRec = 0; | |
| 1749 | 1749 | #endif |
| 1750 | − if (pCtx->pDec->iTotalNumMbRec == 0) { //Picture start to decode | |
| 1750 | + if (pCtx->iTotalNumMbRec == 0) { //Picture start to decode | |
| 1751 | 1751 | for (int32_t i = 0; i < LAYER_NUM_EXCHANGEABLE; ++ i) |
| 1752 | 1752 | memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t))); |
| 1753 | 1753 | } |