| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv 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 15 matching lines...) Expand all Loading... |
| 26 DEFINE_int32(libyuv_width, 0, "width of test image."); | 26 DEFINE_int32(libyuv_width, 0, "width of test image."); |
| 27 DEFINE_int32(libyuv_height, 0, "height of test image."); | 27 DEFINE_int32(libyuv_height, 0, "height of test image."); |
| 28 DEFINE_int32(libyuv_repeat, 0, "number of times to repeat test."); | 28 DEFINE_int32(libyuv_repeat, 0, "number of times to repeat test."); |
| 29 DEFINE_int32(libyuv_flags, 0, "cpu flags for reference code. 0 = C -1 = asm"); | 29 DEFINE_int32(libyuv_flags, 0, "cpu flags for reference code. 0 = C -1 = asm"); |
| 30 | 30 |
| 31 // For quicker unittests, default is 128 x 72. But when benchmarking, | 31 // For quicker unittests, default is 128 x 72. But when benchmarking, |
| 32 // default to 720p. Allow size to specify. | 32 // default to 720p. Allow size to specify. |
| 33 // Set flags to -1 for benchmarking to avoid slower C code. | 33 // Set flags to -1 for benchmarking to avoid slower C code. |
| 34 | 34 |
| 35 LibYUVConvertTest::LibYUVConvertTest() : | 35 LibYUVConvertTest::LibYUVConvertTest() : |
| 36 benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(128), | 36 benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(130), |
| 37 benchmark_height_(72), disable_cpu_flags_(0) { | 37 benchmark_height_(72), disable_cpu_flags_(0) { |
| 38 const char* repeat = getenv("LIBYUV_REPEAT"); | 38 const char* repeat = getenv("LIBYUV_REPEAT"); |
| 39 if (repeat) { | 39 if (repeat) { |
| 40 benchmark_iterations_ = atoi(repeat); // NOLINT | 40 benchmark_iterations_ = atoi(repeat); // NOLINT |
| 41 } | 41 } |
| 42 if (FLAGS_libyuv_repeat) { | 42 if (FLAGS_libyuv_repeat) { |
| 43 benchmark_iterations_ = FLAGS_libyuv_repeat; | 43 benchmark_iterations_ = FLAGS_libyuv_repeat; |
| 44 } | 44 } |
| 45 if (benchmark_iterations_ > 1) { | 45 if (benchmark_iterations_ > 1) { |
| 46 benchmark_width_ = 1280; | 46 benchmark_width_ = 1280; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 int main(int argc, char** argv) { | 305 int main(int argc, char** argv) { |
| 306 ::testing::InitGoogleTest(&argc, argv); | 306 ::testing::InitGoogleTest(&argc, argv); |
| 307 // AllowCommandLineParsing allows us to ignore flags passed on to us by | 307 // AllowCommandLineParsing allows us to ignore flags passed on to us by |
| 308 // Chromium build bots without having to explicitly disable them. | 308 // Chromium build bots without having to explicitly disable them. |
| 309 google::AllowCommandLineReparsing(); | 309 google::AllowCommandLineReparsing(); |
| 310 google::ParseCommandLineFlags(&argc, &argv, true); | 310 google::ParseCommandLineFlags(&argc, &argv, true); |
| 311 return RUN_ALL_TESTS(); | 311 return RUN_ALL_TESTS(); |
| 312 } | 312 } |
| OLD | NEW |