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 | const int32_t kiDeltaFrames = static_cast<int32_t> (pStatistics->uiInputFrameCount - | 638 | const int32_t kiDeltaFrames = static_cast<int32_t> (pStatistics->uiInputFrameCount - |
| 639 | pStatistics->iLastStatisticsFrameCount); | 639 | pStatistics->iLastStatisticsFrameCount); |
| 640 | if (kiDeltaFrames > (m_pEncContext->pSvcParam->fMaxFrameRate * 2)) { | 640 | if (kiDeltaFrames > (m_pEncContext->pSvcParam->fMaxFrameRate * 2)) { |
| 641 | if (kiTimeDiff > m_pEncContext->iStatisticsLogInterval) { | 641 | if (kiTimeDiff >= m_pEncContext->iStatisticsLogInterval) { |
| 642 | pStatistics->fLatestFrameRate = static_cast<float> ((pStatistics->uiInputFrameCount - | 642 | pStatistics->fLatestFrameRate = static_cast<float> ((pStatistics->uiInputFrameCount - |
| 643 | pStatistics->iLastStatisticsFrameCount) * 1000 / | 643 | pStatistics->iLastStatisticsFrameCount) * 1000 / |
| 644 | kiTimeDiff); | 644 | kiTimeDiff); |
| @@ -661,17 +661,17 @@ void CWelsH264SVCEncoder::UpdateStatistics (SFrameBSInfo* pBsInfo, · 16 unmodified lines | |||
| 661 | pStatistics->fLatestFrameRate, m_pEncContext->pSvcParam->fMaxFrameRate); | 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 | 668 | //TODO: the following statistics will be calculated and added later |
| 667 | pStatistics->iLastStatisticsBytes = pStatistics->iTotalEncodedBytes; | 669 | //pStatistics->uiLTRSentNum |
| 668 | pStatistics->iLastStatisticsFrameCount = pStatistics->uiInputFrameCount; | ||
| 669 | 670 | ||
| 670 | //TODO: the following statistics will be calculated and added later | 671 | } |
| 671 | //pStatistics->uiLTRSentNum | ||
| 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 | || (0 == iMaxInputFrame % 300)) { | 675 | || (0 == iMaxInputFrame % 300)) { |
| 676 | 676 | ||
| 677 | if ((iMaxFrameRate > 0) && WELS_ABS (iMaxFrameRate - m_pEncContext->pSvcParam->fMaxFrameRate) > 30) { | 677 | if ((iMaxFrameRate > 0) && WELS_ABS (iMaxFrameRate - m_pEncContext->pSvcParam->fMaxFrameRate) > 30) { |