Showing the changes to test/decoder/DecUT_ErrorConcealment.cpp (1 of 29 files). Show all
Unified · Split
| @@ -21,6 +21,7 @@ typedef struct TagECInputCtx { · 20 unmodified lines | ||
| 21 | 21 | SPicture sAncPic; //Anc picture for comparison |
| 22 | 22 | SPicture sSrcPic; //Src picture as common input picture data |
| 23 | 23 | SPicture sWelsPic; //Wels picture to be compared |
| 24 | + SWelsLastDecPicInfo sLastDecPicInfo; | |
| 24 | 25 | } SECInputCtx, *PECInputCtx; |
| 25 | 26 | |
| 26 | 27 | void FreeInputData (PECInputCtx pECCtx) { |
| @@ -90,7 +91,7 @@ int32_t InitAndAllocInputData (PECInputCtx& pECCtx) { · 63 unmodified lines | ||
| 90 | 91 | pECCtx->pCtx->pDec = &pECCtx->sWelsPic; |
| 91 | 92 | pECCtx->pCtx->pCurDqLayer = &pECCtx->sDqLayer; |
| 92 | 93 | pECCtx->pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag = pECCtx->pMbCorrectlyDecodedFlag; |
| 93 | − | |
| 94 | + pECCtx->pCtx->pLastDecPicInfo = &pECCtx->sLastDecPicInfo; | |
| 94 | 95 | pECCtx->pCtx->pSps = (PSps) WelsMallocz (sizeof (SSps), "pECCtx->pCtx->pSps"); |
| 95 | 96 | if (pECCtx->pCtx->pSps == NULL) |
| 96 | 97 | return 1; |
| @@ -124,7 +125,7 @@ void DoAncErrorConSliceCopy (PECInputCtx pECCtx) { · 27 unmodified lines | ||
| 124 | 125 | int32_t iMbWidth = (int32_t) pECCtx->iMbWidth; |
| 125 | 126 | int32_t iMbHeight = (int32_t) pECCtx->iMbHeight; |
| 126 | 127 | PPicture pDstPic = &pECCtx->sAncPic; |
| 127 | − PPicture pSrcPic = pECCtx->pCtx->pPreviousDecodedPictureInDpb; | |
| 128 | + PPicture pSrcPic = pECCtx->pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb; | |
| 128 | 129 | if ((pECCtx->pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY) |
| 129 | 130 | && (pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag)) |
| 130 | 131 | pSrcPic = NULL; |
| @@ -244,7 +245,7 @@ TEST (ErrorConTest, DoErrorConFrameCopy) { · 113 unmodified lines | ||
| 244 | 245 | int32_t iLumaSize = pECCtx->iMbWidth * pECCtx->iMbHeight * 256; |
| 245 | 246 | |
| 246 | 247 | for (int iRef = 0; iRef < 2; ++ iRef) { //no ref, with ref |
| 247 | − pECCtx->pCtx->pPreviousDecodedPictureInDpb = iRef ? &pECCtx->sSrcPic : NULL; | |
| 248 | + pECCtx->pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = iRef ? &pECCtx->sSrcPic : NULL; | |
| 248 | 249 | for (int iIDR = 0; iIDR < 2; ++ iIDR) { //non IDR, IDR |
| 249 | 250 | pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag = (iIDR > 0); |
| 250 | 251 | //Do reference code method |
| @@ -279,7 +280,7 @@ TEST (ErrorConTest, DoErrorConSliceCopy) { · 28 unmodified lines | ||
| 279 | 280 | pECCtx->pCtx->pParam->eEcActiveIdc = iEC > 0 ? ERROR_CON_SLICE_COPY_CROSS_IDR : ERROR_CON_SLICE_COPY; |
| 280 | 281 | InitECCopyData (pECCtx); |
| 281 | 282 | for (int iRef = 0; iRef < 2; ++ iRef) { //no ref, with ref |
| 282 | − pECCtx->pCtx->pPreviousDecodedPictureInDpb = iRef ? &pECCtx->sSrcPic : NULL; | |
| 283 | + pECCtx->pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = iRef ? &pECCtx->sSrcPic : NULL; | |
| 283 | 284 | for (int iIDR = 0; iIDR < 2; ++ iIDR) { //non IDR, IDR |
| 284 | 285 | pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag = (iIDR > 0); |
| 285 | 286 | //Do reference code method |