| 210 | } |
| 211 | |
| 212 | static void WrapShortRefPicNum (PWelsDecoderContext pCtx) { |
| 213 | int32_t i; |
| 214 | PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader; |
| 215 | int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum; |
| 216 | PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0]; |
| 217 | int32_t iShortRefCount = pCtx->sRefPic.uiShortRefCount[LIST_0]; |
| 218 | //wrap pic num |
| 219 | for (i = 0; i < iShortRefCount; i++) { |
| 220 | if (ppShoreRefList[i]) { |
| 221 | if (ppShoreRefList[i]->iFrameNum > pSliceHeader->iFrameNum) |
| 222 | ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum - iMaxPicNum; |
| 223 | else |
| 224 | ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum; |
| 225 | } |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * fills the pRefPic.pRefList LIST_0 and LIST_0 for B-Slice. |
no outgoing calls
no test coverage detected