| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 return result; | 222 return result; |
| 223 } | 223 } |
| 224 | 224 |
| 225 void RunAnalysis(const char* reference_file_name, const char* test_file_name, | 225 void RunAnalysis(const char* reference_file_name, const char* test_file_name, |
| 226 const char* stats_file_name, int width, int height, | 226 const char* stats_file_name, int width, int height, |
| 227 ResultsContainer* results) { | 227 ResultsContainer* results) { |
| 228 // Check if the reference_file_name ends with "y4m". | 228 // Check if the reference_file_name ends with "y4m". |
| 229 bool y4m_mode = false; | 229 bool y4m_mode = false; |
| 230 if (std::string(reference_file_name).find("y4m") != std::string::npos){ | 230 if (std::string(reference_file_name).find("y4m") != std::string::npos) { |
| 231 y4m_mode = true; | 231 y4m_mode = true; |
| 232 } | 232 } |
| 233 | 233 |
| 234 int size = GetI420FrameSize(width, height); | 234 int size = GetI420FrameSize(width, height); |
| 235 FILE* stats_file = fopen(stats_file_name, "r"); | 235 FILE* stats_file = fopen(stats_file_name, "r"); |
| 236 | 236 |
| 237 // String buffer for the lines in the stats file. | 237 // String buffer for the lines in the stats file. |
| 238 char line[STATS_LINE_LENGTH]; | 238 char line[STATS_LINE_LENGTH]; |
| 239 | 239 |
| 240 // Allocate buffers for test and reference frames. | 240 // Allocate buffers for test and reference frames. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 for (iter = results->frames.begin(); iter != results->frames.end() - 1; | 366 for (iter = results->frames.begin(); iter != results->frames.end() - 1; |
| 367 ++iter) { | 367 ++iter) { |
| 368 fprintf(output, "%f,", iter->ssim_value); | 368 fprintf(output, "%f,", iter->ssim_value); |
| 369 } | 369 } |
| 370 fprintf(output, "%f] score\n", iter->ssim_value); | 370 fprintf(output, "%f] score\n", iter->ssim_value); |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace test | 374 } // namespace test |
| 375 } // namespace webrtc | 375 } // namespace webrtc |
| OLD | NEW |