Cross-language benchmark for QOI implementations
- With Singularity
-
host$ curl https://qoiformat.org/benchmark/qoi_benchmark_suite.tar | tar x host$ ./cxx_environment/build.bash host$ ./cxx_environment/bash singularity$ make singularity$ benchmark/bin/qoibench 20 images
-
- On Host
- Prerequisites:
gccforqoig++supporting-std=c++2aforqoixxandqoi-fu_cxxcargoand Rust toolchains forqoi-rustandrapid-qoimake
-
$ make $ benchmark/bin/qoibench 20 /path/to/image/directory
- Prerequisites:
You can add your own QOI implementation in this project. If you want it, you need to implement C interface as same as original implementaion. More concretely, you should implement below functions:
void* your_own_qoi_encode(const void* data, const qoi_desc* desc, int* out_len);
void* your_own_qoi_decode(const void* data, int size, qoi_desc* desc, int channels); // it's OK that the last argument doesn't work. In this project channels is same as desc.channels.
void your_own_qoi_free(void* ptr); // provide appropriate deallocation method corresponding to allocation method you used in encode/decodeThen, create static library (libyour_own_qoi.a) with your implementations.
Finally, add new entry about your implementation in benchmark/include/implementations.hpp.
The example is here.
MIT