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

Side by Side Diff: webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc

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: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… 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
« no previous file with comments | « webrtc/tools/frame_analyzer/video_quality_analysis.cc ('k') | webrtc/typedefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 bool y4m_mode = false; 27 bool y4m_mode = false;
28 if (std::string(reference_file_name).find("y4m") != std::string::npos){ 28 if (std::string(reference_file_name).find("y4m") != std::string::npos){
29 y4m_mode = true; 29 y4m_mode = true;
30 } 30 }
31 31
32 FILE* results_file = fopen(results_file_name, "w"); 32 FILE* results_file = fopen(results_file_name, "w");
33 33
34 int size = webrtc::test::GetI420FrameSize(width, height); 34 int size = webrtc::test::GetI420FrameSize(width, height);
35 35
36 // Allocate buffers for test and reference frames. 36 // Allocate buffers for test and reference frames.
37 uint8* test_frame = new uint8[size]; 37 uint8_t* test_frame = new uint8_t[size];
38 uint8* ref_frame = new uint8[size]; 38 uint8_t* ref_frame = new uint8_t[size];
39 39
40 bool read_result = true; 40 bool read_result = true;
41 for(int frame_counter = 0; frame_counter < MAX_NUM_FRAMES_PER_FILE; 41 for(int frame_counter = 0; frame_counter < MAX_NUM_FRAMES_PER_FILE;
42 ++frame_counter){ 42 ++frame_counter){
43 read_result &= (y4m_mode) ? webrtc::test::ExtractFrameFromY4mFile( 43 read_result &= (y4m_mode) ? webrtc::test::ExtractFrameFromY4mFile(
44 reference_file_name, width, height, frame_counter, ref_frame): 44 reference_file_name, width, height, frame_counter, ref_frame):
45 webrtc::test::ExtractFrameFromYuvFile(reference_file_name, width, 45 webrtc::test::ExtractFrameFromYuvFile(reference_file_name, width,
46 height, frame_counter, ref_frame); 46 height, frame_counter, ref_frame);
47 read_result &= webrtc::test::ExtractFrameFromYuvFile(test_file_name, width, 47 read_result &= webrtc::test::ExtractFrameFromYuvFile(test_file_name, width,
48 height, frame_counter, test_frame); 48 height, frame_counter, test_frame);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 if (width <= 0 || height <= 0) { 125 if (width <= 0 || height <= 0) {
126 fprintf(stderr, "Error: width or height cannot be <= 0!\n"); 126 fprintf(stderr, "Error: width or height cannot be <= 0!\n");
127 return -1; 127 return -1;
128 } 128 }
129 129
130 CompareFiles(parser.GetFlag("reference_file").c_str(), 130 CompareFiles(parser.GetFlag("reference_file").c_str(),
131 parser.GetFlag("test_file").c_str(), 131 parser.GetFlag("test_file").c_str(),
132 parser.GetFlag("results_file").c_str(), width, height); 132 parser.GetFlag("results_file").c_str(), width, height);
133 } 133 }
OLDNEW
« no previous file with comments | « webrtc/tools/frame_analyzer/video_quality_analysis.cc ('k') | webrtc/typedefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698