Cross-language benchmark for QOI implementations
- Use Docker
-
host$ curl https://qoiformat.org/benchmark/qoi_benchmark_suite.tar | tar x host$ ./docker/build.bash host$ ./docker/bash docker$ make docker$ benchmark/bin/qoibench 20 images
-
- On Host
- Prerequisites:
gcc
forqoi
g++
supporting-std=c++2a
forqoixx
andqoi-fu_cxx
cargo
and Rust toolchains forqoi-rust
andrapid-qoi
make
-
$ 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/decode
Then, 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