AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VideoStat.hpp
Go to the documentation of this file.
1 #ifndef _AV_TRANSCODER_VIDEOSTAT_HPP
2 #define _AV_TRANSCODER_VIDEOSTAT_HPP
3 
5 
6 namespace avtranscoder
7 {
8 
9 /**
10  * @brief Statistics related to a video stream.
11  */
12 class AvExport VideoStat
13 {
14 public:
15  VideoStat(const float duration, const size_t nbFrames)
16  : _duration(duration)
17  , _nbFrames(nbFrames)
18  , _quality(0)
19  , _psnr(0)
20  {
21  }
22 
23 public:
24  float getDuration() const { return _duration; }
25  size_t getNbFrames() const { return _nbFrames; }
26  size_t getQuality() const { return _quality; }
27  double getPSNR() const { return _psnr; }
28 
29  void setQuality(const size_t quality) { _quality = quality; }
30  void setPSNR(const double mse) { _psnr = VideoStat::toPSNR(mse); }
31 
32 private:
33  static double toPSNR(const double mse);
34 
35 private:
36  float _duration;
37  size_t _nbFrames;
38  size_t _quality; ///< Between 1 (good) and FF_LAMBDA_MAX (bad). 0 if unknown.
39  double _psnr; ///< 0 if unknown.
40 };
41 }
42 
43 #endif
double getPSNR() const
Definition: VideoStat.hpp:27
float getDuration() const
Definition: VideoStat.hpp:24
size_t getNbFrames() const
Definition: VideoStat.hpp:25
void setQuality(const size_t quality)
Definition: VideoStat.hpp:29
static double toPSNR(const double mse)
Definition: VideoStat.cpp:8
VideoStat(const float duration, const size_t nbFrames)
Definition: VideoStat.hpp:15
size_t _quality
Between 1 (good) and FF_LAMBDA_MAX (bad). 0 if unknown.
Definition: VideoStat.hpp:38
void setPSNR(const double mse)
Definition: VideoStat.hpp:30
Statistics related to a video stream.
Definition: VideoStat.hpp:12
size_t getQuality() const
Definition: VideoStat.hpp:26
double _psnr
0 if unknown.
Definition: VideoStat.hpp:39
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy