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 // 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 <iostream> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/scoped_vector.h" | 13 #include "base/scoped_vector.h" |
| 14 #include "base/string_util.h" |
14 #include "base/time.h" | 15 #include "base/time.h" |
15 #include "media/base/video_frame.h" | 16 #include "media/base/video_frame.h" |
16 #include "media/base/yuv_convert.h" | 17 #include "media/base/yuv_convert.h" |
17 #include "skia/ext/platform_canvas.h" | 18 #include "skia/ext/platform_canvas.h" |
18 | 19 |
19 using base::TimeDelta; | 20 using base::TimeDelta; |
20 using base::TimeTicks; | 21 using base::TimeTicks; |
21 using media::VideoFrame; | 22 using media::VideoFrame; |
22 using std::vector; | 23 using std::vector; |
23 | 24 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 << BenchmarkFilter(media::FILTER_BILINEAR_V) | 205 << BenchmarkFilter(media::FILTER_BILINEAR_V) |
205 << "ms/frame" << std::endl; | 206 << "ms/frame" << std::endl; |
206 std::cout << "Bilinear Horizontal: " | 207 std::cout << "Bilinear Horizontal: " |
207 << BenchmarkFilter(media::FILTER_BILINEAR_H) | 208 << BenchmarkFilter(media::FILTER_BILINEAR_H) |
208 << "ms/frame" << std::endl; | 209 << "ms/frame" << std::endl; |
209 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) | 210 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) |
210 << "ms/frame" << std::endl; | 211 << "ms/frame" << std::endl; |
211 | 212 |
212 return 0; | 213 return 0; |
213 } | 214 } |
OLD | NEW |