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