• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2011 The LibYuv Project Authors. All rights reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "../unit_test/unit_test.h"
12 
13 #include <stdlib.h>  // For getenv()
14 
15 #include <cstring>
16 
17 // Change this to 1000 for benchmarking.
18 // TODO(fbarchard): Add command line parsing to pass this as option.
19 #define BENCHMARK_ITERATIONS 1
20 
libyuvTest()21 libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
22     benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(1280),
23     benchmark_height_(720) {
24     const char* repeat = getenv("LIBYUV_REPEAT");
25     if (repeat) {
26       benchmark_iterations_ = atoi(repeat);  // NOLINT
27     }
28 }
29 
main(int argc,char ** argv)30 int main(int argc, char** argv) {
31   ::testing::InitGoogleTest(&argc, argv);
32   return RUN_ALL_TESTS();
33 }
34