History

fix iAvgLumaQp in decStat

huili2 committed 10 years ago

Commit b2d4a951 parent 76b428a3 files · +18 −7Browse files

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

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+7−5
@@ -403,11 +403,13 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 402 unmodified lines
403403
404404 memcpy (pDecoderStatistics, &m_pDecContext->sDecoderStatistics, sizeof (SDecoderStatistics));
405405
406− pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
407− (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
408− pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
409− (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum +
410− m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum);
406+ if (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount != 0) { //not original status
407+ pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
408+ (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
409+ pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
410+ (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum +
411+ m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum);
412+ }
411413 return cmResultSuccess;
412414 }
413415

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