Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: webrtc/tools/frame_analyzer/video_quality_analysis.h

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: henrikg@ feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // problem with the decoding there would be 'Barcode error' instead of yyyy. 52 // problem with the decoding there would be 'Barcode error' instead of yyyy.
53 void RunAnalysis(const char* reference_file_name, const char* test_file_name, 53 void RunAnalysis(const char* reference_file_name, const char* test_file_name,
54 const char* stats_file_name, int width, int height, 54 const char* stats_file_name, int width, int height,
55 ResultsContainer* results); 55 ResultsContainer* results);
56 56
57 // Compute PSNR or SSIM for an I420 frame (all planes). When we are calculating 57 // Compute PSNR or SSIM for an I420 frame (all planes). When we are calculating
58 // PSNR values, the max return value (in the case where the test and reference 58 // PSNR values, the max return value (in the case where the test and reference
59 // frames are exactly the same) will be 48. In the case of SSIM the max return 59 // frames are exactly the same) will be 48. In the case of SSIM the max return
60 // value will be 1. 60 // value will be 1.
61 double CalculateMetrics(VideoAnalysisMetricsType video_metrics_type, 61 double CalculateMetrics(VideoAnalysisMetricsType video_metrics_type,
62 const uint8* ref_frame, const uint8* test_frame, 62 const uint8_t* ref_frame,
63 int width, int height); 63 const uint8_t* test_frame,
64 int width,
65 int height);
64 66
65 // Prints the result from the analysis in Chromium performance 67 // Prints the result from the analysis in Chromium performance
66 // numbers compatible format to stdout. If the results object contains no frames 68 // numbers compatible format to stdout. If the results object contains no frames
67 // no output will be written. 69 // no output will be written.
68 void PrintAnalysisResults(const std::string& label, ResultsContainer* results); 70 void PrintAnalysisResults(const std::string& label, ResultsContainer* results);
69 71
70 // Similar to the above, but will print to the specified file handle. 72 // Similar to the above, but will print to the specified file handle.
71 void PrintAnalysisResults(FILE* output, const std::string& label, 73 void PrintAnalysisResults(FILE* output, const std::string& label,
72 ResultsContainer* results); 74 ResultsContainer* results);
73 75
(...skipping 17 matching lines...) Expand all
91 int ExtractFrameSequenceNumber(std::string line); 93 int ExtractFrameSequenceNumber(std::string line);
92 94
93 // Checks if there is 'Barcode error' for the given line. 95 // Checks if there is 'Barcode error' for the given line.
94 bool IsThereBarcodeError(std::string line); 96 bool IsThereBarcodeError(std::string line);
95 97
96 // Extract the frame number in the reference video. I.e. if line is 98 // Extract the frame number in the reference video. I.e. if line is
97 // frame_0023 0284, we will get 284. 99 // frame_0023 0284, we will get 284.
98 int ExtractDecodedFrameNumber(std::string line); 100 int ExtractDecodedFrameNumber(std::string line);
99 101
100 // Extracts an I420 frame at position frame_number from the raw YUV file. 102 // Extracts an I420 frame at position frame_number from the raw YUV file.
101 bool ExtractFrameFromYuvFile(const char* i420_file_name, int width, int height, 103 bool ExtractFrameFromYuvFile(const char* i420_file_name,
102 int frame_number, uint8* result_frame); 104 int width,
105 int height,
106 int frame_number,
107 uint8_t* result_frame);
103 108
104 // Extracts an I420 frame at position frame_number from the Y4M file. The first 109 // Extracts an I420 frame at position frame_number from the Y4M file. The first
105 // frame has corresponded |frame_number| 0. 110 // frame has corresponded |frame_number| 0.
106 bool ExtractFrameFromY4mFile(const char* i420_file_name, int width, int height, 111 bool ExtractFrameFromY4mFile(const char* i420_file_name,
107 int frame_number, uint8* result_frame); 112 int width,
108 113 int height,
114 int frame_number,
115 uint8_t* result_frame);
109 116
110 } // namespace test 117 } // namespace test
111 } // namespace webrtc 118 } // namespace webrtc
112 119
113 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ 120 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698