History

add flag to count EC Mbs due to ref error add UT

dong zhang committed 11 years ago

Commit 2c468b91 parent ecc8ae611 files · +69 −25Browse files

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

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+6−6
@@ -385,8 +385,6 @@ 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;
390 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {388 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {
391 return dsOutOfMemory;389 return dsOutOfMemory;
392 }390 }
@@ -480,10 +478,12 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 87 unmodified lines
480 ResetDecStatNums (&m_pDecContext->sDecoderStatistics);478 ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
481 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;479 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
482 }480 }
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));481 int32_t iMbConcealedNum = m_pDecContext->iMbEcedNum + m_pDecContext->iMbEcedPropNum;
484 m_pDecContext->sDecoderStatistics.uiEcFrameNum++;482 m_pDecContext->sDecoderStatistics.uiAvgEcRatio = iMbConcealedNum == 0 ? (m_pDecContext->sDecoderStatistics.uiAvgEcRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) :((m_pDecContext->sDecoderStatistics.uiAvgEcRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) + ((iMbConcealedNum * 100) / m_pDecContext->iMbNum));
485 m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio /483 m_pDecContext->sDecoderStatistics.uiAvgEcPropRatio = m_pDecContext->iMbEcedPropNum == 0 ? (m_pDecContext->sDecoderStatistics.uiAvgEcPropRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) :((m_pDecContext->sDecoderStatistics.uiAvgEcPropRatio * m_pDecContext->sDecoderStatistics.uiEcFrameNum) + ((m_pDecContext->iMbEcedPropNum * 100) / m_pDecContext->iMbNum));
486 m_pDecContext->sDecoderStatistics.uiEcFrameNum;484 m_pDecContext->sDecoderStatistics.uiEcFrameNum += (iMbConcealedNum == 0 ? 0 : 1);
485 m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiEcFrameNum == 0? 0 : m_pDecContext->sDecoderStatistics.uiAvgEcRatio / m_pDecContext->sDecoderStatistics.uiEcFrameNum;
486 m_pDecContext->sDecoderStatistics.uiAvgEcPropRatio = m_pDecContext->sDecoderStatistics.uiEcFrameNum == 0? 0 : m_pDecContext->sDecoderStatistics.uiAvgEcPropRatio / m_pDecContext->sDecoderStatistics.uiEcFrameNum;
487 }487 }
488 iEnd = WelsTime();488 iEnd = WelsTime();
489 m_pDecContext->dDecTime += (iEnd - iStart) / 1e3;489 m_pDecContext->dDecTime += (iEnd - iStart) / 1e3;

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