Showing the changes to codec/decoder/core/src/error_concealment.cpp (1 of 2 files). Show all
Unified · Split
| @@ -172,9 +172,6 @@ bool NeedErrorCon (PWelsDecoderContext pCtx) { · 171 unmodified lines | |||
| 172 | // ImplementErrorConceal | 172 | // ImplementErrorConceal |
| 173 | // Do actual error concealment | 173 | // Do actual error concealment |
| 174 | void ImplementErrorCon (PWelsDecoderContext pCtx) { | 174 | void ImplementErrorCon (PWelsDecoderContext pCtx) { |
| 175 | if (!NeedErrorCon (pCtx)) | ||
| 176 | return; | ||
| 177 | |||
| 178 | if (ERROR_CON_DISABLE == pCtx->iErrorConMethod) { | 175 | if (ERROR_CON_DISABLE == pCtx->iErrorConMethod) { |
| 179 | pCtx->iErrorCode |= dsBitstreamError; | 176 | pCtx->iErrorCode |= dsBitstreamError; |
| 180 | return; | 177 | return; |
| @@ -183,14 +180,6 @@ void ImplementErrorCon (PWelsDecoderContext pCtx) { · 2 unmodified lines | |||
| 183 | } else if (ERROR_CON_SLICE_COPY == pCtx->iErrorConMethod) { | 180 | } else if (ERROR_CON_SLICE_COPY == pCtx->iErrorConMethod) { |
| 184 | DoErrorConSliceCopy (pCtx); | 181 | DoErrorConSliceCopy (pCtx); |
| 185 | } //TODO add other EC methods here in the future | 182 | } //TODO add other EC methods here in the future |
| 186 | |||
| 187 | //mark the erroneous frame as Ref pic in DPB | ||
| 188 | MarkECFrameAsRef (pCtx); | ||
| 189 | //need update frame_num due current frame is well decoded | ||
| 190 | pCtx->iPrevFrameNum = pCtx->pSliceHeader->iFrameNum; | ||
| 191 | if (pCtx->bLastHasMmco5) | ||
| 192 | pCtx->iPrevFrameNum = 0; | ||
| 193 | |||
| 194 | } | 183 | } |
| 195 | 184 | ||
| 196 | } // namespace WelsDec | 185 | } // namespace WelsDec |