Add debugging routines for Fps

This commit is contained in:
2015-02-26 16:40:01 +00:00
parent 38aa6e9dd7
commit 24598f7f0e
3 changed files with 14 additions and 2 deletions
+3
View File
@@ -27,6 +27,9 @@
#include "PlaYUVerSubWindowHandle.h"
#include "VideoHandle.h"
#include "DialogSubWindowSelector.h"
#if( _CONTROL_PLAYING_TIME_ == 1 )
#include <QElapsedTimer>
#endif
namespace plaYUVer
{
+9
View File
@@ -36,6 +36,10 @@
#include "WidgetFrameNumber.h"
#include "FramePropertiesSidebar.h"
#define _CONTROL_PLAYING_TIME_ 1
class QElapsedTimer;
namespace plaYUVer
{
@@ -99,6 +103,11 @@ private:
QTimer *m_pcPlayingTimer;
Bool m_bIsPlaying;
#if( _CONTROL_PLAYING_TIME_ == 1 )
UInt m_uiNumberPlayedFrames;
Double m_dAverageFps;
QElapsedTimer* m_pcPlayControlTimer;
#endif
UInt64 getMaxFrameNumber();
Void setTimerStatus();
+2 -2
View File
@@ -33,7 +33,7 @@ namespace plaYUVer
{
template<typename T>
Void yuvToRgb( T iY, T iU, T iV, T &iR, T &iG, T &iB )
static inline Void yuvToRgb( T iY, T iU, T iV, T &iR, T &iG, T &iB )
{
iR = iY + 1402 * iV / 1000;
iG = iY - ( 101004 * iU + 209599 * iV ) / 293500;
@@ -55,7 +55,7 @@ Void yuvToRgb( T iY, T iU, T iV, T &iR, T &iG, T &iB )
}
template<typename T>
Void rgbToYuv( T iR, T iG, T iB, T &iY, T &iU, T &iV )
static inline Void rgbToYuv( T iR, T iG, T iB, T &iY, T &iU, T &iV )
{
iY = ( 299 * iR + 587 * iG + 114 * iB + 500 ) / 1000;
iU = ( 1000 * ( iB - iY ) + 226816 ) / 1772;