Merge pull request #1588 from huili2/dec_stat_accumulate

accumulate dec stat
This commit is contained in:
HaiboZhu 2014-12-04 15:37:10 +08:00
commit 054b8eeb3a
2 changed files with 4 additions and 6 deletions

View File

@ -621,8 +621,8 @@ typedef struct TagVideoDecoderStatistics {
uiAvgEcRatio; ///< when EC is on, the average ratio of correct or EC areas, can be an indicator of reconstruction quality
unsigned int uiEcIDRNum; ///< number of actual unintegrity IDR or not received but eced
unsigned int uiEcFrameNum; ///<
unsigned int uiIDRLostNum; ///< number of lost IDR
unsigned int uiFreezingIDRNum; ///< number of freezing IDR with error
unsigned int uiIDRLostNum; ///< number of whole lost IDR
unsigned int uiFreezingIDRNum; ///< number of freezing IDR with error (partly received), under resolution change
unsigned int uiFreezingNonIDRNum; ///< number of freezing non-IDR with error
int iAvgLumaQp; ///< average luma QP. default: -1, no correct frame outputted

View File

@ -373,8 +373,6 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) {
pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
(m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
m_pDecContext->dDecTime = 0;
return cmResultSuccess;
}
@ -497,8 +495,8 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc,
m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
if (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount == 0) { //exceed max value of uint32_t
ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
}
if ((m_pDecContext->sDecoderStatistics.uiWidth != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iWidth)