OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 AnalysisResult(int frame_number, double psnr_value, double ssim_value) | 25 AnalysisResult(int frame_number, double psnr_value, double ssim_value) |
26 : frame_number(frame_number), | 26 : frame_number(frame_number), |
27 psnr_value(psnr_value), | 27 psnr_value(psnr_value), |
28 ssim_value(ssim_value) {} | 28 ssim_value(ssim_value) {} |
29 int frame_number; | 29 int frame_number; |
30 double psnr_value; | 30 double psnr_value; |
31 double ssim_value; | 31 double ssim_value; |
32 }; | 32 }; |
33 | 33 |
34 struct ResultsContainer { | 34 struct ResultsContainer { |
| 35 ResultsContainer(); |
| 36 ~ResultsContainer(); |
| 37 |
35 std::vector<AnalysisResult> frames; | 38 std::vector<AnalysisResult> frames; |
36 }; | 39 }; |
37 | 40 |
38 enum VideoAnalysisMetricsType {kPSNR, kSSIM}; | 41 enum VideoAnalysisMetricsType {kPSNR, kSSIM}; |
39 | 42 |
40 // A function to run the PSNR and SSIM analysis on the test file. The test file | 43 // A function to run the PSNR and SSIM analysis on the test file. The test file |
41 // comprises the frames that were captured during the quality measurement test. | 44 // comprises the frames that were captured during the quality measurement test. |
42 // There may be missing or duplicate frames. Also the frames start at a random | 45 // There may be missing or duplicate frames. Also the frames start at a random |
43 // position in the original video. We should provide a statistics file along | 46 // position in the original video. We should provide a statistics file along |
44 // with the test video. The stats file contains the connection between the | 47 // with the test video. The stats file contains the connection between the |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Extracts an I420 frame at position frame_number from the Y4M file. The first | 107 // Extracts an I420 frame at position frame_number from the Y4M file. The first |
105 // frame has corresponded |frame_number| 0. | 108 // frame has corresponded |frame_number| 0. |
106 bool ExtractFrameFromY4mFile(const char* i420_file_name, int width, int height, | 109 bool ExtractFrameFromY4mFile(const char* i420_file_name, int width, int height, |
107 int frame_number, uint8* result_frame); | 110 int frame_number, uint8* result_frame); |
108 | 111 |
109 | 112 |
110 } // namespace test | 113 } // namespace test |
111 } // namespace webrtc | 114 } // namespace webrtc |
112 | 115 |
113 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ | 116 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ |
OLD | NEW |