aboutsummaryrefslogtreecommitdiff
path: root/unit_test/unit_test.cc
diff options
context:
space:
mode:
authorfbarchard@google.com <fbarchard@google.com>2015-03-26 18:22:29 +0000
committerfbarchard@google.com <fbarchard@google.com>2015-03-26 18:22:29 +0000
commitf16f33d4ce8e6a1c40e2426ad7b457d2927bb4f7 (patch)
tree4da7143cc63ad82aac4eac5ebafaa2ac3035eb3e /unit_test/unit_test.cc
parent4f46a3e03d320fd21dac64ea17f81d6fddec38a1 (diff)
downloadlibyuv-f16f33d4ce8e6a1c40e2426ad7b457d2927bb4f7.tar.gz
All cpu flags to be set so that instead of comparing C code, compare assembler to assembler, for benchmarking purposes.
BUG=none TESTED=libyuv_unittest.exe R=bcornell@google.com Review URL: https://webrtc-codereview.appspot.com/50499004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1346 16f28f9a-4ce2-e073-06de-1de4eb20be90
Diffstat (limited to 'unit_test/unit_test.cc')
-rw-r--r--unit_test/unit_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/unit_test/unit_test.cc b/unit_test/unit_test.cc
index 3c00fc8b..c848e4c0 100644
--- a/unit_test/unit_test.cc
+++ b/unit_test/unit_test.cc
@@ -20,7 +20,7 @@
libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(128),
- benchmark_height_(72) {
+ benchmark_height_(72), disable_cpu_flags_(0) {
const char* repeat = getenv("LIBYUV_REPEAT");
if (repeat) {
benchmark_iterations_ = atoi(repeat); // NOLINT
@@ -39,6 +39,10 @@ libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
if (height) {
benchmark_height_ = atoi(height); // NOLINT
}
+ const char* cpu_flags = getenv("LIBYUV_FLAGS");
+ if (cpu_flags) {
+ disable_cpu_flags_ = atoi(cpu_flags); // NOLINT
+ }
benchmark_pixels_div256_ = static_cast<int>((
static_cast<double>(Abs(benchmark_width_)) *
static_cast<double>(Abs(benchmark_height_)) *