History

enable cross IDR EC method

huili2 committed 12 years ago

Commit 103fa5b1 parent c5029ef6 files · +77 −50Browse files

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

Unified · Split

codec/decoder/core/src/manage_dec_ref.cpp+13−3
@@ -119,9 +119,19 @@ int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc) { · 118 unmodified lines
119119 // IDR lost, set new
120120 pRef->bIsComplete = false; // Set complete flag to false for lost IDR ref picture
121121 pCtx->iErrorCode |= dsDataErrorConcealed;
122− memset (pRef->pData[0], 128, pRef->iLinesize[0] * pRef->iHeightInPixel);
123− memset (pRef->pData[1], 128, pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
124− memset (pRef->pData[2], 128, pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
122+ bool bCopyPrevious = ((ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->eErrorConMethod)
123+ || (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->eErrorConMethod)) && (NULL != pCtx->pPreviousDecodedPictureInDpb);
124+ bCopyPrevious = bCopyPrevious && (pRef->iWidthInPixel == pCtx->pPreviousDecodedPictureInDpb->iWidthInPixel)
125+ && (pRef->iHeightInPixel == pCtx->pPreviousDecodedPictureInDpb->iHeightInPixel);
126+ if (bCopyPrevious) {
127+ memcpy (pRef->pData[0], pCtx->pPreviousDecodedPictureInDpb->pData[0], pRef->iLinesize[0] * pRef->iHeightInPixel);
128+ memcpy (pRef->pData[1], pCtx->pPreviousDecodedPictureInDpb->pData[1], pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
129+ memcpy (pRef->pData[2], pCtx->pPreviousDecodedPictureInDpb->pData[2], pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
130+ } else {
131+ memset (pRef->pData[0], 128, pRef->iLinesize[0] * pRef->iHeightInPixel);
132+ memset (pRef->pData[1], 128, pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
133+ memset (pRef->pData[2], 128, pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
134+ }
125135 pRef->iFrameNum = 0;
126136 pRef->iFramePoc = 0;
127137 pRef->uiTemporalId = pRef->uiQualityId = 0;

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