Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -616,9 +616,11 @@ void CWelsH264SVCEncoder::UpdateStatistics (const int64_t kiCurrentFrameTs, EVid · 615 unmodified lines | |||
| 616 | pStatistics->uiSkippedFrameCount += (kbCurrentFrameSkipped ? 1 : 0); | 616 | pStatistics->uiSkippedFrameCount += (kbCurrentFrameSkipped ? 1 : 0); |
| 617 | 617 | ||
| 618 | // rate control related | 618 | // rate control related |
| 619 | if (0 != m_pEncContext->uiStartTimestamp && kiCurrentFrameTs > m_pEncContext->uiStartTimestamp + 800) { | 619 | if (0 != m_pEncContext->uiStartTimestamp) { |
| 620 | pStatistics->fAverageFrameRate = (float) (pStatistics->uiInputFrameCount * 1000 / | 620 | if (kiCurrentFrameTs > m_pEncContext->uiStartTimestamp + 800) { |
| 621 | (kiCurrentFrameTs - m_pEncContext->uiStartTimestamp)); | 621 | pStatistics->fAverageFrameRate = (static_cast<float> (pStatistics->uiInputFrameCount) * 1000 / |
| 622 | (kiCurrentFrameTs - m_pEncContext->uiStartTimestamp)); | ||
| 623 | } | ||
| 622 | } else { | 624 | } else { |
| 623 | m_pEncContext->uiStartTimestamp = kiCurrentFrameTs; | 625 | m_pEncContext->uiStartTimestamp = kiCurrentFrameTs; |
| 624 | } | 626 | } |