History

put EC before output

root committed 12 years ago

Commit 67afd911 parent 91cd93e2 files · +18 −24Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 2 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+18−13
@@ -1641,11 +1641,6 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1640 unmodified lines
16411641
16421642 WelsDecodeAccessUnitEnd (pCtx);
16431643
1644− if (!pCtx->bInstantDecFlag) {
1645− //Do error concealment here
1646− ImplementErrorCon (pCtx);
1647− }
1648−
16491644 pCtx->bNewSeqBegin = false;
16501645 WriteBackActiveParameters (pCtx);
16511646 pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || pCtx->bNextNewSeqBegin;
@@ -1943,6 +1938,14 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 291 unmodified lines
19431938 #endif//#if !CODEC_FOR_TESTBED
19441939
19451940 if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) {
1941+ if (!pCtx->bInstantDecFlag) {
1942+ //Do error concealment here
1943+ if (NeedErrorCon (pCtx)) {
1944+ ImplementErrorCon (pCtx);
1945+ pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
1946+ }
1947+ }
1948+
19461949 if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo)) {
19471950 return ERR_NONE;
19481951 }
@@ -1979,15 +1982,17 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 30 unmodified lines
19791982 if ((pCtx->iTotalNumMbRec != 0)
19801983 && (CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pCurNal->sNalHeaderExt, &pCtx->sLastSliceHeader,
19811984 &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) {
1982− pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
1983− DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
1984− PPicture pCurPic = pCtx->pDec; //temporally store current picture
19851985 //Do Error Concealment here
1986− ImplementErrorCon (pCtx);
1987− pCtx->pPreviousDecodedPictureInDpb = pCurPic; //save ECed pic for future use
1988− pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num
1989− if (pCtx->bLastHasMmco5)
1990− pCtx->iPrevFrameNum = 0;
1986+ if (NeedErrorCon (pCtx)) { //should always be true!
1987+ ImplementErrorCon (pCtx);
1988+ pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
1989+ DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
1990+ pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
1991+ MarkECFrameAsRef (pCtx);
1992+ pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num
1993+ if (pCtx->bLastHasMmco5)
1994+ pCtx->iPrevFrameNum = 0;
1995+ }
19911996 }
19921997 return ERR_NONE;
19931998 }

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