History

add dec status for freezing

huili2 committed 11 years ago

Commit 504cabf1 parent 82b70b38 files · +116 −43Browse files

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

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+13−4
@@ -373,8 +373,9 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 372 unmodified lines
373 373
374 pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /374 pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
375 (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);375 (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
376 memset (&m_pDecContext->sDecoderStatistics, 0, sizeof (SDecoderStatistics));376 ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
377 m_pDecContext->dDecTime = 0;377 m_pDecContext->dDecTime = 0;
378
378 return cmResultSuccess;379 return cmResultSuccess;
379 }380 }
380 381
@@ -478,6 +479,10 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 97 unmodified lines
478 479
479 }480 }
480 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;481 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
482 if (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount == 0) { //exceed max value of uint32_t
483 ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
484 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
485 }
481 m_pDecContext->sDecoderStatistics.uiEcFrameNum++;486 m_pDecContext->sDecoderStatistics.uiEcFrameNum++;
482 m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio /487 m_pDecContext->sDecoderStatistics.uiAvgEcRatio = m_pDecContext->sDecoderStatistics.uiAvgEcRatio /
483 m_pDecContext->sDecoderStatistics.uiEcFrameNum;488 m_pDecContext->sDecoderStatistics.uiEcFrameNum;
@@ -490,14 +495,18 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 6 unmodified lines
490 495
491 if (pDstInfo->iBufferStatus == 1) {496 if (pDstInfo->iBufferStatus == 1) {
492 497
498 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
499 if (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount == 0) { //exceed max value of uint32_t
500 ResetDecStatNums (&m_pDecContext->sDecoderStatistics);
501 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
502 }
503
493 if ((m_pDecContext->sDecoderStatistics.uiWidth != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iWidth)504 if ((m_pDecContext->sDecoderStatistics.uiWidth != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iWidth)
494 || (m_pDecContext->sDecoderStatistics.uiHeight != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iHeight)) {505 || (m_pDecContext->sDecoderStatistics.uiHeight != (unsigned int) pDstInfo->UsrData.sSystemBuffer.iHeight)) {
495 m_pDecContext->sDecoderStatistics.uiResolutionChangeTimes++;506 m_pDecContext->sDecoderStatistics.uiResolutionChangeTimes++;
496 m_pDecContext->sDecoderStatistics.uiWidth = pDstInfo->UsrData.sSystemBuffer.iWidth;507 m_pDecContext->sDecoderStatistics.uiWidth = pDstInfo->UsrData.sSystemBuffer.iWidth;
497 m_pDecContext->sDecoderStatistics.uiHeight = pDstInfo->UsrData.sSystemBuffer.iHeight;508 m_pDecContext->sDecoderStatistics.uiHeight = pDstInfo->UsrData.sSystemBuffer.iHeight;
498
499 }509 }
500 m_pDecContext->sDecoderStatistics.uiDecodedFrameCount++;
501 }510 }
502 iEnd = WelsTime();511 iEnd = WelsTime();
503 m_pDecContext->dDecTime += (iEnd - iStart) / 1e3;512 m_pDecContext->dDecTime += (iEnd - iStart) / 1e3;
@@ -529,7 +538,7 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc, · 25 unmodified lines
529 m_pDecContext->pParserBsInfo = pDstInfo;538 m_pDecContext->pParserBsInfo = pDstInfo;
530 pDstInfo->iNalNum = 0;539 pDstInfo->iNalNum = 0;
531 pDstInfo->iSpsWidthInPixel = pDstInfo->iSpsHeightInPixel = 0;540 pDstInfo->iSpsWidthInPixel = pDstInfo->iSpsHeightInPixel = 0;
532 if(pDstInfo) {541 if (pDstInfo) {
533 m_pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp;542 m_pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp;
534 pDstInfo->uiOutBsTimeStamp = 0;543 pDstInfo->uiOutBsTimeStamp = 0;
535 } else {544 } else {

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