OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Standalone benchmarking application based on FFmpeg. This tool is used to | 5 // Standalone benchmarking application based on FFmpeg. This tool is used to |
6 // measure decoding performance between different FFmpeg compile and run-time | 6 // measure decoding performance between different FFmpeg compile and run-time |
7 // options. We also use this tool to measure performance regressions when | 7 // options. We also use this tool to measure performance regressions when |
8 // testing newer builds of FFmpeg from trunk. | 8 // testing newer builds of FFmpeg from trunk. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 } | 466 } |
467 } | 467 } |
468 } | 468 } |
469 } else { | 469 } else { |
470 NOTREACHED(); | 470 NOTREACHED(); |
471 } | 471 } |
472 | 472 |
473 // Make sure our decoding went OK. | 473 // Make sure our decoding went OK. |
474 if (result < 0) { | 474 if (result < 0) { |
475 std::cerr << "WARNING: avcodec_decode returned " | 475 std::cerr << "Error: avcodec_decode returned " |
476 << result << " for " << in_path << std::endl; | 476 << result << " for " << in_path << std::endl; |
477 // return 1; | 477 return 1; |
478 } | 478 } |
479 } | 479 } |
480 // Free our packet. | 480 // Free our packet. |
481 av_free_packet(&packet); | 481 av_free_packet(&packet); |
482 | 482 |
483 if (max_frames && (frames >= max_frames)) | 483 if (max_frames && (frames >= max_frames)) |
484 break; | 484 break; |
485 } while (read_result >= 0); | 485 } while (read_result >= 0); |
486 base::TimeDelta total = base::TimeTicks::HighResNow() - start; | 486 base::TimeDelta total = base::TimeTicks::HighResNow() - start; |
487 LeaveTimingSection(); | 487 LeaveTimingSection(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 #if defined(OS_WIN) | 545 #if defined(OS_WIN) |
546 } __except(EXCEPTION_EXECUTE_HANDLER) { | 546 } __except(EXCEPTION_EXECUTE_HANDLER) { |
547 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() | 547 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() |
548 << " " << in_path << std::endl; | 548 << " " << in_path << std::endl; |
549 return 1; | 549 return 1; |
550 } | 550 } |
551 #endif | 551 #endif |
552 CommandLine::Reset(); | 552 CommandLine::Reset(); |
553 return 0; | 553 return 0; |
554 } | 554 } |
OLD | NEW |