History

remove duplipate eErrorConMethod in decContext compared with pParam"

huili2 committed 9 years ago

Commit d5e304f1 parent 61b9ddc10 files · +69 −66Browse files

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

Unified · Split

test/decoder/DecUT_ErrorConcealment.cpp+8−4
@@ -26,6 +26,7 @@ typedef struct TagECInputCtx { · 25 unmodified lines
2626 void FreeInputData (PECInputCtx pECCtx) {
2727 if (pECCtx != NULL) {
2828 if (pECCtx->pCtx != NULL) {
29+ WELS_SAFE_FREE (pECCtx->pCtx->pParam, "pECCtx->pCtx->pParam");
2930 WELS_SAFE_FREE (pECCtx->pCtx->pSps, "pECCtx->pCtx->pSps");
3031 WELS_SAFE_FREE (pECCtx->pCtx, "pECCtx->pCtx");
3132 }
@@ -95,6 +96,9 @@ int32_t InitAndAllocInputData (PECInputCtx& pECCtx) { · 63 unmodified lines
9596 return 1;
9697 pECCtx->pCtx->pSps->iMbWidth = pECCtx->iMbWidth;
9798 pECCtx->pCtx->pSps->iMbHeight = pECCtx->iMbHeight;
99+ pECCtx->pCtx->pParam = (PDecodingParam) WelsMallocz (sizeof (SDecodingParam), "pECCtx->pCtx->pParam");
100+ if (pECCtx->pCtx->pParam == NULL)
101+ return 1;
98102
99103 return 0;
100104 }
@@ -121,7 +125,7 @@ void DoAncErrorConSliceCopy (PECInputCtx pECCtx) { · 20 unmodified lines
121125 int32_t iMbHeight = (int32_t) pECCtx->iMbHeight;
122126 PPicture pDstPic = &pECCtx->sAncPic;
123127 PPicture pSrcPic = pECCtx->pCtx->pPreviousDecodedPictureInDpb;
124− if ((pECCtx->pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY)
128+ if ((pECCtx->pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY)
125129 && (pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag))
126130 pSrcPic = NULL;
127131
@@ -235,7 +239,7 @@ TEST (ErrorConTest, DoErrorConFrameCopy) { · 107 unmodified lines
235239 }
236240
237241 for (int iEC = 0; iEC < 2; ++ iEC) { //ERROR_CON_FRAME_COPY, ERROR_CON_FRAME_COPY_CROSS_IDR
238− pECCtx->pCtx->eErrorConMethod = iEC > 0 ? ERROR_CON_FRAME_COPY_CROSS_IDR : ERROR_CON_FRAME_COPY;
242+ pECCtx->pCtx->pParam->eEcActiveIdc = iEC > 0 ? ERROR_CON_FRAME_COPY_CROSS_IDR : ERROR_CON_FRAME_COPY;
239243 InitECCopyData (pECCtx);
240244 int32_t iLumaSize = pECCtx->iMbWidth * pECCtx->iMbHeight * 256;
241245
@@ -246,7 +250,7 @@ TEST (ErrorConTest, DoErrorConFrameCopy) { · 4 unmodified lines
246250 //Do reference code method
247251 DoErrorConFrameCopy (pECCtx->pCtx);
248252 //Do anchor method
249− if (iRef && ! ((pECCtx->pCtx->eErrorConMethod == ERROR_CON_FRAME_COPY)
253+ if (iRef && ! ((pECCtx->pCtx->pParam->eEcActiveIdc == ERROR_CON_FRAME_COPY)
250254 && (pECCtx->pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag)))
251255 memcpy (pECCtx->sAncPic.pData[0], pECCtx->sSrcPic.pData[0], iLumaSize * 3 / 2);
252256 else
@@ -272,7 +276,7 @@ TEST (ErrorConTest, DoErrorConSliceCopy) { · 19 unmodified lines
272276 }
273277
274278 for (int iEC = 0; iEC < 2; ++ iEC) { //ERROR_CON_SLICE_COPY, ERROR_CON_SLICE_COPY_CROSS_IDR
275− pECCtx->pCtx->eErrorConMethod = iEC > 0 ? ERROR_CON_SLICE_COPY_CROSS_IDR : ERROR_CON_SLICE_COPY;
279+ pECCtx->pCtx->pParam->eEcActiveIdc = iEC > 0 ? ERROR_CON_SLICE_COPY_CROSS_IDR : ERROR_CON_SLICE_COPY;
276280 InitECCopyData (pECCtx);
277281 for (int iRef = 0; iRef < 2; ++ iRef) { //no ref, with ref
278282 pECCtx->pCtx->pPreviousDecodedPictureInDpb = iRef ? &pECCtx->sSrcPic : NULL;

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