File tree Expand file tree Collapse file tree 5 files changed +51
-31
lines changed Expand file tree Collapse file tree 5 files changed +51
-31
lines changed Original file line number Diff line number Diff line change 1
1
#include " ProcessStat.hpp"
2
2
3
3
#include < utility>
4
- #include < math.h>
5
4
6
5
namespace avtranscoder
7
6
{
8
7
9
- double VideoStat::psnr ( const double d )
10
- {
11
- return -10.0 * log (d) / log (10.0 );
12
- }
13
-
14
8
void ProcessStat::addVideoStat ( const size_t streamIndex, const VideoStat& videoStat )
15
9
{
16
10
_videoStats.insert ( std::make_pair ( streamIndex, videoStat ) );
Original file line number Diff line number Diff line change 1
1
#ifndef _AV_TRANSCODER_PROCESSSTAT_HPP
2
- #define _AV_TRANSCODER_PROCESSSTAT_HPP
2
+ #define _AV_TRANSCODER_PROCESSSTAT_HPP
3
3
4
4
#include < AvTranscoder/common.hpp>
5
+ #include < AvTranscoder/stat/VideoStat.hpp>
5
6
6
7
#include < map>
7
8
8
9
namespace avtranscoder
9
10
{
10
11
11
12
/* *
12
- * @brief Statistic related to a video stream.
13
- */
14
- class VideoStat
15
- {
16
- public:
17
- VideoStat ( const double duration, const size_t nbFrames )
18
- : _duration( duration )
19
- , _nbFrames( nbFrames )
20
- , _quality( 0 )
21
- , _psnr( 0 )
22
- {}
23
-
24
- public:
25
- static double psnr ( const double d );
26
-
27
- public:
28
- double _duration;
29
- size_t _nbFrames;
30
- size_t _quality; // /< Between 1 (good) and FF_LAMBDA_MAX (bad). 0 if unknown.
31
- double _psnr; // /< 0 if unknown.
32
- };
33
-
34
- /* *
35
- * @brief ProcessStat contains statistic results given after the process.
13
+ * @brief ProcessStat contains statistics given after the process.
36
14
* @see Transcoder::process methods
37
15
*/
38
16
class ProcessStat
Original file line number Diff line number Diff line change
1
+ #include " ProcessStat.hpp"
2
+
3
+ #include < math.h>
4
+
5
+ namespace avtranscoder
6
+ {
7
+
8
+ double VideoStat::psnr ( const double d )
9
+ {
10
+ return -10.0 * log (d) / log (10.0 );
11
+ }
12
+
13
+ }
Original file line number Diff line number Diff line change
1
+ #ifndef _AV_TRANSCODER_VIDEOSTAT_HPP
2
+ #define _AV_TRANSCODER_VIDEOSTAT_HPP
3
+
4
+ #include < AvTranscoder/common.hpp>
5
+
6
+ namespace avtranscoder
7
+ {
8
+
9
+ /* *
10
+ * @brief Statistics related to a video stream.
11
+ */
12
+ class VideoStat
13
+ {
14
+ public:
15
+ VideoStat ( const double duration, const size_t nbFrames )
16
+ : _duration( duration )
17
+ , _nbFrames( nbFrames )
18
+ , _quality( 0 )
19
+ , _psnr( 0 )
20
+ {}
21
+
22
+ public:
23
+ static double psnr ( const double d );
24
+
25
+ public:
26
+ double _duration;
27
+ size_t _nbFrames;
28
+ size_t _quality; // /< Between 1 (good) and FF_LAMBDA_MAX (bad). 0 if unknown.
29
+ double _psnr; // /< 0 if unknown.
30
+ };
31
+
32
+ }
33
+
34
+ #endif
Original file line number Diff line number Diff line change 2
2
3
3
#include < AvTranscoder/file/util.hpp>
4
4
#include < AvTranscoder/progress/NoDisplayProgress.hpp>
5
+ #include < AvTranscoder/stat/VideoStat.hpp>
5
6
6
7
#include < limits>
7
8
#include < algorithm>
You can’t perform that action at this time.
0 commit comments