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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 fprintf(stderr, "Cannot find output directory: %s\n", | 169 fprintf(stderr, "Cannot find output directory: %s\n", |
170 FLAGS_output_dir.c_str()); | 170 FLAGS_output_dir.c_str()); |
171 return 3; | 171 return 3; |
172 } | 172 } |
173 config->output_dir = FLAGS_output_dir; | 173 config->output_dir = FLAGS_output_dir; |
174 | 174 |
175 // Manufacture an output filename if none was given. | 175 // Manufacture an output filename if none was given. |
176 if (FLAGS_output_filename.empty()) { | 176 if (FLAGS_output_filename.empty()) { |
177 // Cut out the filename without extension from the given input file | 177 // Cut out the filename without extension from the given input file |
178 // (which may include a path) | 178 // (which may include a path) |
179 int startIndex = FLAGS_input_filename.find_last_of("/") + 1; | 179 size_t startIndex = FLAGS_input_filename.find_last_of("/") + 1; |
180 if (startIndex == 0) { | 180 if (startIndex == 0) { |
181 startIndex = 0; | 181 startIndex = 0; |
182 } | 182 } |
183 FLAGS_output_filename = | 183 FLAGS_output_filename = |
184 FLAGS_input_filename.substr( | 184 FLAGS_input_filename.substr( |
185 startIndex, FLAGS_input_filename.find_last_of(".") - startIndex) + | 185 startIndex, FLAGS_input_filename.find_last_of(".") - startIndex) + |
186 "_out.yuv"; | 186 "_out.yuv"; |
187 } | 187 } |
188 | 188 |
189 // Verify output file can be written. | 189 // Verify output file can be written. |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 } | 548 } |
549 if (FLAGS_python) { | 549 if (FLAGS_python) { |
550 PrintPythonOutput(config, stats, ssim_result, psnr_result); | 550 PrintPythonOutput(config, stats, ssim_result, psnr_result); |
551 } | 551 } |
552 delete processor; | 552 delete processor; |
553 delete encoder; | 553 delete encoder; |
554 delete decoder; | 554 delete decoder; |
555 Log("Quality test finished!"); | 555 Log("Quality test finished!"); |
556 return 0; | 556 return 0; |
557 } | 557 } |
OLD | NEW |