shithub: openh264

Download patch

ref: 44017193ed8dc0d485e8a0eb3ca9c59ef856979e
parent: 155a91406c795b525f20977422b3a8ccdbc94bc5
parent: 354eee3e2b5eedafbe269440fcc5315ff0af956e
author: dongzha <[email protected]>
date: Wed Dec 10 05:40:08 EST 2014

Merge pull request #1601 from dongzha/FixDecodeStatusFps

add a decoder status: float fActualAverageFrameSpeedInMs     

--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -613,6 +613,7 @@
   unsigned int uiWidth;	                       ///< the width of encode/decode frame
   unsigned int uiHeight;                       ///< the height of encode/decode frame
   float fAverageFrameSpeedInMs;                ///< average_Decoding_Time
+  float fActualAverageFrameSpeedInMs;          ///< actual average_Decoding_Time, including freezing pictures
   unsigned int uiDecodedFrameCount;            ///< number of frames
   unsigned int uiResolutionChangeTimes;        ///< uiResolutionChangeTimes
   unsigned int uiIDRCorrectNum;	               ///< number of correct IDR received
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -373,7 +373,8 @@
 
     pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
         (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
-
+    pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
+    (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum + m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum);
     return cmResultSuccess;
   }