Commit graph

133 commits

Author SHA1 Message Date
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
Ivan Smirnov
b25b060945 Simplify likely/unlikely/cold helpers 2021-12-31 02:01:24 +03:00
Ivan Smirnov
0c8d7c64e8 Improve benchmark tool, report totals 2021-12-31 02:01:24 +03:00
Ivan Smirnov
96a8d559ad (Update .gitignore - ignore bench suite pngs) 2021-12-31 02:01:24 +03:00
Ivan Smirnov
0fa8ce5fa9 Add reference check tests 2021-12-31 02:01:24 +03:00
Ivan Smirnov
b0467472ae Big rework: everything now matches the latest spec 2021-12-30 13:25:52 +03:00
Ivan Smirnov
6ed5f13487 Remove canonical mod and remove it from benches 2021-12-29 22:40:41 +03:00
Ivan Smirnov
24775b1014 (Remove temporary tests from crate root) 2021-12-29 22:39:14 +03:00
Ivan Smirnov
f64f777b57 (Update the upstream qoi submodule) 2021-12-29 20:56:30 +03:00
Ivan Smirnov
7155c13214 Add assets for tests and reference checks 2021-12-29 20:56:07 +03:00
Ivan Smirnov
d845bb50d5 (Update .gitignore) 2021-12-29 20:55:41 +03:00
Ivan Smirnov
f906d13e90 Update pixel hash function to the latest spec 2021-12-29 16:11:27 +03:00
Ivan Smirnov
6640bc571a Add unique stream-end marker (7 zeros and one 1) 2021-12-29 16:07:54 +03:00
Ivan Smirnov
4d0d760f92 Enforce maximum size of 400Mp (QOI_PIXELS_MAX) 2021-12-29 16:00:16 +03:00
Ivan Smirnov
d0e2b70d3d Add initial version of qoi-bench 2021-12-02 16:02:30 +00:00
Ivan Smirnov
3ec3d34987 Add Header::new() and with_colorspace() 2021-12-02 15:57:57 +00:00
Ivan Smirnov
02734e4eca Replace Header::SIZE -> encoded_size() 2021-12-02 15:57:03 +00:00
Ivan Smirnov
0825c0aa3a Fix a few clippy lints 2021-12-02 15:55:56 +00:00
Ivan Smirnov
784f7952de Remove criterion benches for now 2021-12-02 15:54:41 +00:00
Ivan Smirnov
bfbf032fff Implement Debug manually for ColorSpace 2021-12-01 17:17:26 +00:00
Ivan Smirnov
0d612fd3c2 Fix: check decode buffer end after the run opcode 2021-12-01 17:13:50 +00:00