Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -638,7 +638,7 @@ void CWelsH264SVCEncoder::UpdateStatistics (SFrameBSInfo* pBsInfo, · 637 unmodified lines | ||
| 638 | 638 | const int32_t kiDeltaFrames = static_cast<int32_t> (pStatistics->uiInputFrameCount - |
| 639 | 639 | pStatistics->iLastStatisticsFrameCount); |
| 640 | 640 | if (kiDeltaFrames > (m_pEncContext->pSvcParam->fMaxFrameRate * 2)) { |
| 641 | − if (kiTimeDiff > m_pEncContext->iStatisticsLogInterval) { | |
| 641 | + if (kiTimeDiff >= m_pEncContext->iStatisticsLogInterval) { | |
| 642 | 642 | pStatistics->fLatestFrameRate = static_cast<float> ((pStatistics->uiInputFrameCount - |
| 643 | 643 | pStatistics->iLastStatisticsFrameCount) * 1000 / |
| 644 | 644 | kiTimeDiff); |
| @@ -661,17 +661,17 @@ void CWelsH264SVCEncoder::UpdateStatistics (SFrameBSInfo* pBsInfo, · 16 unmodified lines | ||
| 661 | 661 | pStatistics->fLatestFrameRate, m_pEncContext->pSvcParam->fMaxFrameRate); |
| 662 | 662 | } |
| 663 | 663 | } |
| 664 | − } | |
| 664 | + // update variables | |
| 665 | + pStatistics->iLastStatisticsBytes = pStatistics->iTotalEncodedBytes; | |
| 666 | + pStatistics->iLastStatisticsFrameCount = pStatistics->uiInputFrameCount; | |
| 665 | 667 | |
| 666 | − // update variables | |
| 667 | − pStatistics->iLastStatisticsBytes = pStatistics->iTotalEncodedBytes; | |
| 668 | − pStatistics->iLastStatisticsFrameCount = pStatistics->uiInputFrameCount; | |
| 668 | + //TODO: the following statistics will be calculated and added later | |
| 669 | + //pStatistics->uiLTRSentNum | |
| 669 | 670 | |
| 670 | − //TODO: the following statistics will be calculated and added later | |
| 671 | − //pStatistics->uiLTRSentNum | |
| 671 | + } | |
| 672 | 672 | } |
| 673 | 673 | } |
| 674 | − if (((m_pEncContext->iStatisticsLogInterval > 0) && (kiTimeDiff > m_pEncContext->iStatisticsLogInterval)) | |
| 674 | + if (((m_pEncContext->iStatisticsLogInterval > 0) && (kiTimeDiff >= m_pEncContext->iStatisticsLogInterval)) | |
| 675 | 675 | || (0 == iMaxInputFrame % 300)) { |
| 676 | 676 | |
| 677 | 677 | if ((iMaxFrameRate > 0) && WELS_ABS (iMaxFrameRate - m_pEncContext->pSvcParam->fMaxFrameRate) > 30) { |