ImplementErrorConceal Do actual error concealment
| 465 | // ImplementErrorConceal |
| 466 | // Do actual error concealment |
| 467 | void ImplementErrorCon (PWelsDecoderContext pCtx) { |
| 468 | if (ERROR_CON_DISABLE == pCtx->pParam->eEcActiveIdc) { |
| 469 | pCtx->iErrorCode |= dsBitstreamError; |
| 470 | return; |
| 471 | } else if ((ERROR_CON_FRAME_COPY == pCtx->pParam->eEcActiveIdc) |
| 472 | || (ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)) { |
| 473 | DoErrorConFrameCopy (pCtx); |
| 474 | } else if ((ERROR_CON_SLICE_COPY == pCtx->pParam->eEcActiveIdc) |
| 475 | || (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc) |
| 476 | || (ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc)) { |
| 477 | DoErrorConSliceCopy (pCtx); |
| 478 | } else if ((ERROR_CON_SLICE_MV_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc) |
| 479 | || (ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc)) { |
| 480 | GetAvilInfoFromCorrectMb (pCtx); |
| 481 | DoErrorConSliceMVCopy (pCtx); |
| 482 | } //TODO add other EC methods here in the future |
| 483 | pCtx->iErrorCode |= dsDataErrorConcealed; |
| 484 | pCtx->pDec->bIsComplete = false; // Set complete flag to false after do EC. |
| 485 | } |
| 486 | |
| 487 | } // namespace WelsDec |
no test coverage detected