Commit graph

153 commits

Author SHA1 Message Date
Ivan Smirnov
e39bec8725 Bug-fix with non-reference encoding 2022-01-03 17:15:18 +03:00
Ivan Smirnov
f3947a2a01 qoi-bench: fail immediately if roundtrip fails 2022-01-03 17:15:18 +03:00
Ivan Smirnov
217d11287d (Update .gitignore) 2022-01-03 17:15:18 +03:00
Ivan Smirnov
df48b77f23 Update CI config (reference enabled) 2022-01-03 17:15:18 +03:00
Ivan Smirnov
c59f6ac686 Update the tests (with reference feature on/off) 2022-01-03 17:15:18 +03:00
Ivan Smirnov
465a5b86a1 Encode runs of 1 as index (+ "reference" feature) 2022-01-03 17:15:18 +03:00
Ivan Smirnov
ab92cf64b6 Disable doctests for the main crate 2022-01-03 17:15:18 +03:00
Ivan Smirnov
7b0044a824 qoi-bench: only report totals if more than one png 2022-01-03 17:15:18 +03:00
Ivan Smirnov
feaac28244 Run tests in opt-level=3 mode 2022-01-03 15:13:56 +03:00
Ivan Smirnov
55977b8981 Minor updates to crate manifests and readme 2022-01-03 15:13:56 +03:00
Ivan Smirnov
5036518108 Change crate edition to "2018" 2022-01-03 15:13:56 +03:00
Ivan Smirnov
45bed0445d Fix a few clippy warnings 2022-01-03 15:13:56 +03:00
Ivan Smirnov
12147521f2 Update the readme with the benchmark timings 2022-01-03 14:25:40 +03:00
Ivan Smirnov
c52ff2bb9b Clean up header struct/mod, add docstrings 2022-01-03 14:25:40 +03:00
Ivan Smirnov
e3184aed01 Derive PartialOrd/Ord for Channels and ColorSpace 2022-01-03 14:25:40 +03:00
Ivan Smirnov
fb8a43fd13 Fix potential decoder panic when checking padding 2022-01-03 14:25:40 +03:00
Ivan Smirnov
e6e156f974 Update fuzz targets 2022-01-03 14:25:40 +03:00
Ivan Smirnov
4e43c8ba01 Add ColorSpace::as_u8() 2022-01-03 14:25:40 +03:00
Ivan Smirnov
bfd947f573 Add a basic README 2022-01-03 14:25:40 +03:00
Ivan Smirnov
74fa9aaef2 Add license files 2022-01-03 14:25:40 +03:00
Ivan Smirnov
b1eb637112 Add GitHub Actions CI config 2022-01-03 14:25:40 +03:00
Ivan Smirnov
71e787f648 Update Cargo.toml 2022-01-03 14:25:40 +03:00
Ivan Smirnov
8cdb46f896 Add qoi format specification pdf to the repo 2022-01-03 14:25:40 +03:00
Ivan Smirnov
ae6d410374 Implement efficient encoding to generic streams 2022-01-03 01:11:16 +03:00
Ivan Smirnov
9d036bc64e Update tests and benches to the new encoder API 2022-01-03 01:11:16 +03:00
Ivan Smirnov
b461af81ac Introduce Channels and finish encoder refactor 2022-01-03 01:11:16 +03:00
Ivan Smirnov
0b76352b22 Use u32::{from_be_bytes,to_be_bytes} builtins 2022-01-03 01:11:16 +03:00
Ivan Smirnov
d763e1d62c Remove magic field from Header 2022-01-03 01:11:16 +03:00
Ivan Smirnov
9289fdd59b Encoding - start the big refactor 2022-01-03 01:11:16 +03:00
Ivan Smirnov
268953033b Decoder - cleanup, move some logic back into Pixel 2022-01-03 01:11:16 +03:00
Ivan Smirnov
6c7dad1e2c Decoder: remove decode_to_stream(), use output buf 2022-01-03 01:11:16 +03:00
Ivan Smirnov
b8fe879b22 In qoi-bench, report and skip invalid png files 2022-01-03 01:11:16 +03:00
Ivan Smirnov
59e67b455a Encoder minor fixups 2022-01-02 17:43:19 +03:00
Ivan Smirnov
21b06f37e0 Re-export all decoding funcs/structs at crate root 2022-01-02 00:04:09 +03:00
Ivan Smirnov
074fc72b22 Add generic streaming decoder 2022-01-02 00:04:09 +03:00
Ivan Smirnov
4a8c20e0d3 QoiDecoder - minor cleanups 2022-01-02 00:04:09 +03:00
Ivan Smirnov
0eb8a7ade7 Add QoiDecoder, handle padding properly + refactor 2022-01-02 00:04:09 +03:00
Ivan Smirnov
acdd29060c Further decoder reworks + add qoi_decode_to_buf() 2022-01-02 00:04:09 +03:00
Ivan Smirnov
343f11bccf Sort the files when running benches 2022-01-02 00:04:09 +03:00
Ivan Smirnov
2a764a1132 Further encoder improvements 2021-12-31 14:37:42 +03:00
Ivan Smirnov
637ac22a99 (Clippy fixes across the board) 2021-12-31 14:37:42 +03:00
Ivan Smirnov
b315ea20a7 Mark consts mod as doc(hidden) 2021-12-31 13:38:19 +03:00
Ivan Smirnov
2dcbdd19c2 Rework ColorSpace to match the latest spec (0 | 1) 2021-12-31 13:38:19 +03:00
Ivan Smirnov
c39844fb98 Implement From<!> for Error 2021-12-31 13:38:19 +03:00
Ivan Smirnov
6019791c3b In the bench suite, check for 3/4 channels 2021-12-31 13:38:19 +03:00
Ivan Smirnov
5b0d420200 Specialize the decoder by source channels as well 2021-12-31 13:38:19 +03:00
Ivan Smirnov
9e7c508a34 Add forbid(unsafe_code) at crate root 2021-12-31 02:01:24 +03:00
Ivan Smirnov
a9a01c6fbd Rework the decoder so it's safe, add bytemuck dep 2021-12-31 02:01:24 +03:00
Ivan Smirnov
6ce544950d Rework the encoder, replace all unsafe code 2021-12-31 02:01:24 +03:00
Ivan Smirnov
239a22926c Get rid of most unsafe in decoder (1% speed loss) 2021-12-31 02:01:24 +03:00