Showing the changes to codec/decoder/core/src/manage_dec_ref.cpp (1 of 3 files). Show all
Unified · Split
| @@ -89,7 +89,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) { · 88 unmodified lines | ||
| 89 | 89 | |
| 90 | 90 | pRefPic->uiRefCount[LIST_0] = 0; |
| 91 | 91 | |
| 92 | − for (i = 0; i < MAX_SHORT_REF_COUNT; i++) { | |
| 92 | + for (i = 0; i < MAX_DPB_COUNT; i++) { | |
| 93 | 93 | if (pRefPic->pShortRefList[LIST_0][i] != NULL) { |
| 94 | 94 | SetUnRef (pRefPic->pShortRefList[LIST_0][i]); |
| 95 | 95 | pRefPic->pShortRefList[LIST_0][i] = NULL; |
| @@ -97,7 +97,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) { · 1 unmodified line | ||
| 97 | 97 | } |
| 98 | 98 | pRefPic->uiShortRefCount[LIST_0] = 0; |
| 99 | 99 | |
| 100 | − for (i = 0; i < MAX_LONG_REF_COUNT; i++) { | |
| 100 | + for (i = 0; i < MAX_DPB_COUNT; i++) { | |
| 101 | 101 | if (pRefPic->pLongRefList[LIST_0][i] != NULL) { |
| 102 | 102 | SetUnRef (pRefPic->pLongRefList[LIST_0][i]); |
| 103 | 103 | pRefPic->pLongRefList[LIST_0][i] = NULL; |
| @@ -158,7 +158,7 @@ int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc) { · 54 unmodified lines | ||
| 158 | 158 | |
| 159 | 159 | PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0]; |
| 160 | 160 | PPicture* ppLongRefList = pCtx->sRefPic.pLongRefList[LIST_0]; |
| 161 | − memset (pCtx->sRefPic.pRefList[LIST_0], 0, MAX_REF_PIC_COUNT * sizeof (PPicture)); | |
| 161 | + memset (pCtx->sRefPic.pRefList[LIST_0], 0, MAX_DPB_COUNT * sizeof (PPicture)); | |
| 162 | 162 | //short |
| 163 | 163 | for (i = 0; i < pCtx->sRefPic.uiShortRefCount[LIST_0]; ++i) { |
| 164 | 164 | pCtx->sRefPic.pRefList[LIST_0][iCount++ ] = ppShoreRefList[i]; |
| @@ -179,7 +179,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { · 14 unmodified lines | ||
| 179 | 179 | PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader; |
| 180 | 180 | PPicture pPic = NULL; |
| 181 | 181 | PPicture* ppRefList = pCtx->sRefPic.pRefList[LIST_0]; |
| 182 | − int32_t iMaxRefIdx = pCtx->pSps->iNumRefFrames + 1; | |
| 182 | + int32_t iMaxRefIdx = pCtx->pSps->iNumRefFrames; | |
| 183 | 183 | int32_t iRefCount = pCtx->sRefPic.uiRefCount[LIST_0]; |
| 184 | 184 | int32_t iPredFrameNum = pSliceHeader->iFrameNum; |
| 185 | 185 | int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum; |
| @@ -251,7 +251,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { · 65 unmodified lines | ||
| 251 | 251 | (i - iReorderingIndex)*sizeof (PPicture)); //confirmed_safe_unsafe_usage |
| 252 | 252 | } else if (i < iReorderingIndex) { |
| 253 | 253 | memmove (&ppRefList[1 + iReorderingIndex], &ppRefList[iReorderingIndex], |
| 254 | − (iMaxRefIdx - 1 - iReorderingIndex)*sizeof (PPicture)); | |
| 254 | + (iMaxRefIdx - iReorderingIndex)*sizeof (PPicture)); | |
| 255 | 255 | } |
| 256 | 256 | ppRefList[iReorderingIndex] = pPic; |
| 257 | 257 | iReorderingIndex++; |