diff --git a/app/VideoHandle.cpp b/app/VideoHandle.cpp index c48200a..9fef225 100644 --- a/app/VideoHandle.cpp +++ b/app/VideoHandle.cpp @@ -27,6 +27,9 @@ #include "PlaYUVerSubWindowHandle.h" #include "VideoHandle.h" #include "DialogSubWindowSelector.h" +#if( _CONTROL_PLAYING_TIME_ == 1 ) +#include +#endif namespace plaYUVer { diff --git a/app/VideoHandle.h b/app/VideoHandle.h index df11798..3383168 100644 --- a/app/VideoHandle.h +++ b/app/VideoHandle.h @@ -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(); diff --git a/lib/PlaYUVerFramePixelFormats.h b/lib/PlaYUVerFramePixelFormats.h index 82a2bb2..7185131 100644 --- a/lib/PlaYUVerFramePixelFormats.h +++ b/lib/PlaYUVerFramePixelFormats.h @@ -33,7 +33,7 @@ namespace plaYUVer { template -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 -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;