Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 4 files). Show all
Unified · Split
| @@ -385,6 +385,8 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 384 unmodified lines | ||
| 385 | 385 | const int kiSrcLen, |
| 386 | 386 | unsigned char** ppDst, |
| 387 | 387 | SBufferInfo* pDstInfo) { |
| 388 | + m_pDecContext->iMbEcedNum = 0; | |
| 389 | + m_pDecContext->iMbNum = 0; | |
| 388 | 390 | if (CheckBsBuffer (m_pDecContext, kiSrcLen)) { |
| 389 | 391 | return dsOutOfMemory; |
| 390 | 392 | } |
| @@ -464,10 +466,6 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 73 unmodified lines | ||
| 464 | 466 | if ((m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE) && (pDstInfo->iBufferStatus == 1)) { |
| 465 | 467 | //TODO after dec status updated |
| 466 | 468 | m_pDecContext->iErrorCode |= dsDataErrorConcealed; |
| 467 | − if (m_pDecContext->eErrorConMethod == ERROR_CON_FRAME_COPY) | |
| 468 | − | |
| 469 | − m_pDecContext->sDecoderStatistics.uiAvgEcRatio = (m_pDecContext->sDecoderStatistics.uiAvgEcRatio * | |
| 470 | − m_pDecContext->sDecoderStatistics.uiEcFrameNum) + 100; | |
| 471 | 469 | |
| 472 | 470 | // |
| 473 | 471 | if ((m_pDecContext->sDecoderStatistics.uiWidth != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iWidth) |
| @@ -482,6 +480,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 8 unmodified lines | ||
| 482 | 480 | ResetDecStatNums (&m_pDecContext->sDecoderStatistics); |
| 483 | 481 | m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++; |
| 484 | 482 | } |
| 483 | + m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->iMbEcedNum == 0 ? (m_pDecContext->sDecoderStatistics.uiAvgEcRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) :((m_pDecContext->sDecoderStatistics.uiAvgEcRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) + ((m_pDecContext->iMbEcedNum * 100) / m_pDecContext->iMbNum)); | |
| 485 | 484 | m_pDecContext->sDecoderStatistics.uiEcFrameNum++; |
| 486 | 485 | m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio / |
| 487 | 486 | m_pDecContext->sDecoderStatistics.uiEcFrameNum; |