OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This tool can be used to measure performace of video frame scaling | 5 // This tool can be used to measure performace of video frame scaling |
6 // code. It times performance of the scaler with and without filtering. | 6 // code. It times performance of the scaler with and without filtering. |
7 // It also measures performance of the Skia scaler for comparison. | 7 // It also measures performance of the Skia scaler for comparison. |
8 | 8 |
9 #include <iostream> | 9 #include <ostream> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "media/base/video_frame.h" | 17 #include "media/base/video_frame.h" |
18 #include "media/base/yuv_convert.h" | 18 #include "media/base/yuv_convert.h" |
19 #include "third_party/skia/include/core/SkCanvas.h" | 19 #include "third_party/skia/include/core/SkCanvas.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 << BenchmarkFilter(media::FILTER_BILINEAR_V) | 227 << BenchmarkFilter(media::FILTER_BILINEAR_V) |
228 << "ms/frame" << std::endl; | 228 << "ms/frame" << std::endl; |
229 std::cout << "Bilinear Horizontal: " | 229 std::cout << "Bilinear Horizontal: " |
230 << BenchmarkFilter(media::FILTER_BILINEAR_H) | 230 << BenchmarkFilter(media::FILTER_BILINEAR_H) |
231 << "ms/frame" << std::endl; | 231 << "ms/frame" << std::endl; |
232 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) | 232 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) |
233 << "ms/frame" << std::endl; | 233 << "ms/frame" << std::endl; |
234 | 234 |
235 return 0; | 235 return 0; |
236 } | 236 } |
OLD | NEW |