Skip to content

wx257osn2/qoi-benchmark

Repository files navigation

QOI Benchmark

Cross-language benchmark for QOI implementations

Implementations

Usage

  • 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 for qoi
      • g++ supporting -std=c++2a for qoixx and qoi-fu_cxx
      • cargo and Rust toolchains for qoi-rust and rapid-qoi
      • make
    • $ make
      $ benchmark/bin/qoibench 20 /path/to/image/directory

How to add my implementation?

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.

License

MIT

About

Cross-language benchmark for QOI (Quite OK Image Format) implementations

Topics

Resources

License

Stars

Watchers

Forks