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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } | 344 } |
345 | 345 |
346 void PrintAnalysisResults(const std::string& label, ResultsContainer* results) { | 346 void PrintAnalysisResults(const std::string& label, ResultsContainer* results) { |
347 PrintAnalysisResults(stdout, label, results); | 347 PrintAnalysisResults(stdout, label, results); |
348 } | 348 } |
349 | 349 |
350 void PrintAnalysisResults(FILE* output, const std::string& label, | 350 void PrintAnalysisResults(FILE* output, const std::string& label, |
351 ResultsContainer* results) { | 351 ResultsContainer* results) { |
352 std::vector<AnalysisResult>::iterator iter; | 352 std::vector<AnalysisResult>::iterator iter; |
353 | 353 |
354 fprintf(output, "RESULT Unique_frames_count: %s= %u\n", label.c_str(), | 354 fprintf(output, "RESULT Unique_frames_count: %s= %u score\n", label.c_str(), |
355 static_cast<unsigned int>(results->frames.size())); | 355 static_cast<unsigned int>(results->frames.size())); |
356 | 356 |
357 if (results->frames.size() > 0u) { | 357 if (results->frames.size() > 0u) { |
358 fprintf(output, "RESULT PSNR: %s= [", label.c_str()); | 358 fprintf(output, "RESULT PSNR: %s= [", label.c_str()); |
359 for (iter = results->frames.begin(); iter != results->frames.end() - 1; | 359 for (iter = results->frames.begin(); iter != results->frames.end() - 1; |
360 ++iter) { | 360 ++iter) { |
361 fprintf(output, "%f,", iter->psnr_value); | 361 fprintf(output, "%f,", iter->psnr_value); |
362 } | 362 } |
363 fprintf(output, "%f] dB\n", iter->psnr_value); | 363 fprintf(output, "%f] dB\n", iter->psnr_value); |
364 | 364 |
365 fprintf(output, "RESULT SSIM: %s= [", label.c_str()); | 365 fprintf(output, "RESULT SSIM: %s= [", label.c_str()); |
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 |