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> |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 << "x" << source_height << std::endl; | 193 << "x" << source_height << std::endl; |
194 std::cout << "Destination image size: " << dest_width | 194 std::cout << "Destination image size: " << dest_width |
195 << "x" << dest_height << std::endl; | 195 << "x" << dest_height << std::endl; |
196 std::cout << "Number of frames: " << num_frames << std::endl; | 196 std::cout << "Number of frames: " << num_frames << std::endl; |
197 std::cout << "Number of buffers: " << num_buffers << std::endl; | 197 std::cout << "Number of buffers: " << num_buffers << std::endl; |
198 | 198 |
199 std::cout << "Skia: " << BenchmarkSkia() | 199 std::cout << "Skia: " << BenchmarkSkia() |
200 << "ms/frame" << std::endl; | 200 << "ms/frame" << std::endl; |
201 std::cout << "No filtering: " << BenchmarkFilter(media::FILTER_NONE) | 201 std::cout << "No filtering: " << BenchmarkFilter(media::FILTER_NONE) |
202 << "ms/frame" << std::endl; | 202 << "ms/frame" << std::endl; |
| 203 std::cout << "Bilinear Vertical: " |
| 204 << BenchmarkFilter(media::FILTER_BILINEAR_V) |
| 205 << "ms/frame" << std::endl; |
| 206 std::cout << "Bilinear Horizontal: " |
| 207 << BenchmarkFilter(media::FILTER_BILINEAR_H) |
| 208 << "ms/frame" << std::endl; |
203 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) | 209 std::cout << "Bilinear: " << BenchmarkFilter(media::FILTER_BILINEAR) |
204 << "ms/frame" << std::endl; | 210 << "ms/frame" << std::endl; |
205 | 211 |
206 return 0; | 212 return 0; |
207 } | 213 } |
OLD | NEW |