History

re-structure SWelsDecoderContext and others and prepare for the support of multi-threading support.

xiaotiansf committed 7 years ago

Commit 2f5ecec1 parent 9ed97c729 files · +2285 −1568Browse files

Showing the changes to test/decoder/DecUT_ErrorConcealment.cpp (1 of 29 files). Show all

Unified · Split

test/decoder/DecUT_ErrorConcealment.cpp+5−4
@@ -21,6 +21,7 @@ typedef struct TagECInputCtx { · 20 unmodified lines
2121 SPicture sAncPic; //Anc picture for comparison
2222 SPicture sSrcPic; //Src picture as common input picture data
2323 SPicture sWelsPic; //Wels picture to be compared
24+ SWelsLastDecPicInfo sLastDecPicInfo;
2425 } SECInputCtx, *PECInputCtx;
2526
2627 void FreeInputData (PECInputCtx pECCtx) {
@@ -90,7 +91,7 @@ int32_t InitAndAllocInputData (PECInputCtx& pECCtx) { · 63 unmodified lines
9091 pECCtx->pCtx->pDec = &pECCtx->sWelsPic;
9192 pECCtx->pCtx->pCurDqLayer = &pECCtx->sDqLayer;
9293 pECCtx->pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag = pECCtx->pMbCorrectlyDecodedFlag;
93−
94+ pECCtx->pCtx->pLastDecPicInfo = &pECCtx->sLastDecPicInfo;
9495 pECCtx->pCtx->pSps = (PSps) WelsMallocz (sizeof (SSps), "pECCtx->pCtx->pSps");
9596 if (pECCtx->pCtx->pSps == NULL)
9697 return 1;
@@ -124,7 +125,7 @@ void DoAncErrorConSliceCopy (PECInputCtx pECCtx) { · 27 unmodified lines
124125 int32_t iMbWidth = (int32_t) pECCtx->iMbWidth;
125126 int32_t iMbHeight = (int32_t) pECCtx->iMbHeight;
126127 PPicture pDstPic = &pECCtx->sAncPic;
127− PPicture pSrcPic = pECCtx->pCtx->pPreviousDecodedPictureInDpb;
128+ PPicture pSrcPic = pECCtx->pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb;
128129 if ((pECCtx->pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY)
129130 && (pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag))
130131 pSrcPic = NULL;
@@ -244,7 +245,7 @@ TEST (ErrorConTest, DoErrorConFrameCopy) { · 113 unmodified lines
244245 int32_t iLumaSize = pECCtx->iMbWidth * pECCtx->iMbHeight * 256;
245246
246247 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;
248249 for (int iIDR = 0; iIDR < 2; ++ iIDR) { //non IDR, IDR
249250 pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag = (iIDR > 0);
250251 //Do reference code method
@@ -279,7 +280,7 @@ TEST (ErrorConTest, DoErrorConSliceCopy) { · 28 unmodified lines
279280 pECCtx->pCtx->pParam->eEcActiveIdc = iEC > 0 ? ERROR_CON_SLICE_COPY_CROSS_IDR : ERROR_CON_SLICE_COPY;
280281 InitECCopyData (pECCtx);
281282 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;
283284 for (int iIDR = 0; iIDR < 2; ++ iIDR) { //non IDR, IDR
284285 pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag = (iIDR > 0);
285286 //Do reference code method

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t