| 2955 | } |
| 2956 | |
| 2957 | bool CheckRefPicturesComplete (PWelsDecoderContext pCtx) { |
| 2958 | // Multi Reference, RefIdx may differ |
| 2959 | bool bAllRefComplete = true; |
| 2960 | int32_t iRealMbIdx = pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; |
| 2961 | for (int32_t iMbIdx = 0; bAllRefComplete |
| 2962 | && iMbIdx < pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice; iMbIdx++) { |
| 2963 | switch (pCtx->pCurDqLayer->pDec->pMbType[iRealMbIdx]) { |
| 2964 | case MB_TYPE_SKIP: |
| 2965 | case MB_TYPE_16x16: |
| 2966 | bAllRefComplete &= |
| 2967 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete; |
| 2968 | break; |
| 2969 | |
| 2970 | case MB_TYPE_16x8: |
| 2971 | bAllRefComplete &= |
| 2972 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete; |
| 2973 | bAllRefComplete &= |
| 2974 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][8] ]->bIsComplete; |
| 2975 | break; |
| 2976 | |
| 2977 | case MB_TYPE_8x16: |
| 2978 | bAllRefComplete &= |
| 2979 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete; |
| 2980 | bAllRefComplete &= |
| 2981 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][2] ]->bIsComplete; |
| 2982 | break; |
| 2983 | |
| 2984 | case MB_TYPE_8x8: |
| 2985 | case MB_TYPE_8x8_REF0: |
| 2986 | bAllRefComplete &= |
| 2987 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete; |
| 2988 | bAllRefComplete &= |
| 2989 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][2] ]->bIsComplete; |
| 2990 | bAllRefComplete &= |
| 2991 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][8] ]->bIsComplete; |
| 2992 | bAllRefComplete &= |
| 2993 | pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][10] ]->bIsComplete; |
| 2994 | break; |
| 2995 | |
| 2996 | default: |
| 2997 | break; |
| 2998 | } |
| 2999 | iRealMbIdx = (pCtx->pPps->uiNumSliceGroups > 1) ? FmoNextMb (pCtx->pFmo, iRealMbIdx) : |
| 3000 | (pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice + iMbIdx); |
| 3001 | if (iRealMbIdx == -1) //caused by abnormal return of FmoNextMb() |
| 3002 | return false; |
| 3003 | } |
| 3004 | |
| 3005 | return bAllRefComplete; |
| 3006 | } |
| 3007 | } // namespace WelsDec |
no test coverage detected