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 | const int kiSrcLen, | 385 | const int kiSrcLen, |
| 386 | unsigned char** ppDst, | 386 | unsigned char** ppDst, |
| 387 | SBufferInfo* pDstInfo) { | 387 | SBufferInfo* pDstInfo) { |
| 388 | m_pDecContext->iMbEcedNum = 0; | ||
| 389 | m_pDecContext->iMbNum = 0; | ||
| 388 | if (CheckBsBuffer (m_pDecContext, kiSrcLen)) { | 390 | if (CheckBsBuffer (m_pDecContext, kiSrcLen)) { |
| 389 | return dsOutOfMemory; | 391 | return dsOutOfMemory; |
| 390 | } | 392 | } |
| @@ -464,10 +466,6 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 73 unmodified lines | |||
| 464 | if ((m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE) && (pDstInfo->iBufferStatus == 1)) { | 466 | if ((m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE) && (pDstInfo->iBufferStatus == 1)) { |
| 465 | //TODO after dec status updated | 467 | //TODO after dec status updated |
| 466 | m_pDecContext->iErrorCode |= dsDataErrorConcealed; | 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 | if ((m_pDecContext->sDecoderStatistics.uiWidth != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iWidth) | 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 | ResetDecStatNums (&m_pDecContext->sDecoderStatistics); | 480 | ResetDecStatNums (&m_pDecContext->sDecoderStatistics); |
| 483 | m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++; | 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 | m_pDecContext->sDecoderStatistics.uiEcFrameNum++; | 484 | m_pDecContext->sDecoderStatistics.uiEcFrameNum++; |
| 486 | m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio / | 485 | m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio / |
| 487 | m_pDecContext->sDecoderStatistics.uiEcFrameNum; | 486 | m_pDecContext->sDecoderStatistics.uiEcFrameNum; |