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/error_concealment.cpp (1 of 6 files). Show all

Unified · Split

codec/decoder/core/src/error_concealment.cpp+9−3
@@ -41,7 +41,7 @@ · 40 unmodified lines
4141 namespace WelsDec {
4242 //Init
4343 void InitErrorCon (PWelsDecoderContext pCtx) {
44− if (pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY) {
44+ if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY) || (pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR)) {
4545 pCtx->sCopyFunc.pCopyLumaFunc = WelsCopy16x16_c;
4646 pCtx->sCopyFunc.pCopyChromaFunc = WelsCopy8x8_c;
4747
@@ -79,6 +79,8 @@ void DoErrorConFrameCopy (PWelsDecoderContext pCtx) { · 31 unmodified lines
7979 uint32_t uiHeightInPixelY = (pCtx->pSps->iMbHeight) << 4;
8080 int32_t iStrideY = pDstPic->iLinesize[0];
8181 int32_t iStrideUV = pDstPic->iLinesize[1];
82+ if ((pCtx->eErrorConMethod == ERROR_CON_FRAME_COPY) && (pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag))
83+ pSrcPic = NULL; //no cross IDR method, should fill in data instead of copy
8284 if (pSrcPic == NULL) { //no ref pic, assign specific data to picture
8385 memset (pDstPic->pData[0], 128, uiHeightInPixelY * iStrideY);
8486 memset (pDstPic->pData[1], 128, (uiHeightInPixelY >> 1) * iStrideUV);
@@ -97,6 +99,8 @@ void DoErrorConSliceCopy (PWelsDecoderContext pCtx) { · 12 unmodified lines
9799 int32_t iMbHeight = (int32_t) pCtx->pSps->iMbHeight;
98100 PPicture pDstPic = pCtx->pDec;
99101 PPicture pSrcPic = pCtx->pPreviousDecodedPictureInDpb;
102+ if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY) && (pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag))
103+ pSrcPic = NULL; //no cross IDR method, should fill in data instead of copy
100104
101105 //uint8_t *pDstData[3], *pSrcData[3];
102106 bool* pMbCorrectlyDecodedFlag = pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag;
@@ -183,9 +187,11 @@ void ImplementErrorCon (PWelsDecoderContext pCtx) { · 80 unmodified lines
183187 if (ERROR_CON_DISABLE == pCtx->eErrorConMethod) {
184188 pCtx->iErrorCode |= dsBitstreamError;
185189 return;
186− } else if (ERROR_CON_FRAME_COPY == pCtx->eErrorConMethod) {
190+ } else if ((ERROR_CON_FRAME_COPY == pCtx->eErrorConMethod)
191+ || (ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->eErrorConMethod)) {
187192 DoErrorConFrameCopy (pCtx);
188− } else if (ERROR_CON_SLICE_COPY == pCtx->eErrorConMethod) {
193+ } else if ((ERROR_CON_SLICE_COPY == pCtx->eErrorConMethod)
194+ || (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->eErrorConMethod)) {
189195 DoErrorConSliceCopy (pCtx);
190196 } //TODO add other EC methods here in the future
191197 pCtx->iErrorCode |= dsDataErrorConcealed;

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