mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Add environment variable for tests to repeat for benchmarking purposes.
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/796006 git-svn-id: http://libyuv.googlecode.com/svn/trunk@352 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
b8eabfea64
commit
6ccda3d206
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 351
|
Version: 352
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 351
|
#define LIBYUV_VERSION 352
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#include <stdlib.h> // For getenv()
|
||||||
|
|
||||||
// Change this to 1000 for benchmarking.
|
// Change this to 1000 for benchmarking.
|
||||||
// TODO(fbarchard): Add command line parsing to pass this as option.
|
// TODO(fbarchard): Add command line parsing to pass this as option.
|
||||||
#define BENCHMARK_ITERATIONS 1
|
#define BENCHMARK_ITERATIONS 1
|
||||||
@ -19,6 +21,10 @@
|
|||||||
libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
|
libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
|
||||||
benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(1280),
|
benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(1280),
|
||||||
benchmark_height_(720) {
|
benchmark_height_(720) {
|
||||||
|
const char* repeat = getenv("LIBYUV_REPEAT");
|
||||||
|
if (repeat) {
|
||||||
|
benchmark_iterations_ = atoi(repeat);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class libyuvTest : public ::testing::Test {
|
|||||||
const int rotate_max_w_;
|
const int rotate_max_w_;
|
||||||
const int rotate_max_h_;
|
const int rotate_max_h_;
|
||||||
|
|
||||||
const int benchmark_iterations_;
|
int benchmark_iterations_;
|
||||||
const int benchmark_width_;
|
const int benchmark_width_;
|
||||||
const int benchmark_height_;
|
const int benchmark_height_;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user