History

move iTotalNumMbRec from refpic to ctx

Licai Guo committed 12 years ago

Commit 9e4ab641 parent 8f981a44 files · +12 −13Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t