diff --git a/README.md b/README.md index 1133b04e..a34896b5 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,17 @@ NOTE: To not build unit tests, skip passing -DUHDR_BUILD_TESTS=1 ### Building Benchmark - cmake {cmake_options} -DUHDR_BUILD_BENCHMARK=1 +To build benchmarks, pass -DUHDR_BUILD_BENCHMARK=1 to cmake configure command and build. + +This will additionally generate, + +**ultrahdr_bm**
Benchmark tests + +To run benchmark tests on device from host, use atest: + +``` +atest ultrahdr_benchmark +``` ### Building Fuzzers diff --git a/benchmark/AndroidTest.xml b/benchmark/AndroidTest.xml new file mode 100644 index 00000000..f002f65d --- /dev/null +++ b/benchmark/AndroidTest.xml @@ -0,0 +1,37 @@ + + + + diff --git a/benchmark/DynamicConfig.xml b/benchmark/DynamicConfig.xml new file mode 100644 index 00000000..9953ef28 --- /dev/null +++ b/benchmark/DynamicConfig.xml @@ -0,0 +1,20 @@ + + + + + https://storage.googleapis.com/android_media/external/libultrahdr/benchmark/UltrahdrBenchmarkTestRes-1.0.zip + + \ No newline at end of file diff --git a/benchmark/benchmark_test.cpp b/benchmark/benchmark_test.cpp index 024937ea..13b136b9 100644 --- a/benchmark/benchmark_test.cpp +++ b/benchmark/benchmark_test.cpp @@ -23,7 +23,11 @@ using namespace ultrahdr; +#ifdef __ANDROID__ +std::string kTestImagesPath = "/sdcard/test/UltrahdrBenchmarkTestRes-1.0/"; +#else std::string kTestImagesPath = "./data/UltrahdrBenchmarkTestRes-1.0/"; +#endif std::vector kDecodeAPITestImages{ // 12mp test vectors