History

fix decodestatus uiEcRatio calc bug

dong zhang committed 11 years ago

Commit ecc8ae61 parent 065c3a74 files · +15 −19Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 4 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+3−4
@@ -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 updated467 //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;

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