Commit graph

29 commits

Author SHA1 Message Date
Ivan Smirnov
45bed0445d Fix a few clippy warnings 2022-01-03 15:13:56 +03:00
Ivan Smirnov
fb8a43fd13 Fix potential decoder panic when checking padding 2022-01-03 14:25:40 +03:00
Ivan Smirnov
b461af81ac Introduce Channels and finish encoder 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
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
637ac22a99 (Clippy fixes across the board) 2021-12-31 14:37:42 +03:00
Ivan Smirnov
2dcbdd19c2 Rework ColorSpace to match the latest spec (0 | 1) 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
a9a01c6fbd Rework the decoder so it's safe, add bytemuck dep 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
b0467472ae Big rework: everything now matches the latest spec 2021-12-30 13:25:52 +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
0825c0aa3a Fix a few clippy lints 2021-12-02 15:55:56 +00:00
Ivan Smirnov
0d612fd3c2 Fix: check decode buffer end after the run opcode 2021-12-01 17:13:50 +00:00
Ivan Smirnov
7446a0f171 Add Header::validate(), don't check in qoi_dec_hdr 2021-12-01 17:07:21 +00:00
Ivan Smirnov
fc41914a48 Refactor decoder so it now uses qoi_decode_header 2021-12-01 17:01:41 +00:00
Ivan Smirnov
f17d2b6201 Add decode::qoi_decode_header() 2021-12-01 16:01:58 +00:00
Ivan Smirnov
d7c8346e39 Error::BadDecodingDataSize -> InputBufferTooSmall 2021-12-01 16:01:17 +00:00
Ivan Smirnov
cd6f8df1fa Remove unneeded mut 2021-12-01 00:05:04 +00:00
Ivan Smirnov
dd2ed70e70 Decoder: check read buffer bounds for safety 2021-11-30 14:31:33 +00:00
Ivan Smirnov
572194c0f2 Decoder: mark redundant match arm as unreachable 2021-11-30 14:30:55 +00:00
Ivan Smirnov
f19c0ee641 Remove unused imports from decode module 2021-11-29 22:33:27 +00:00
Ivan Smirnov
899270e42e Rework all branching in the decoder 2021-11-29 11:30:09 +00:00
Ivan Smirnov
cbae67b07d No bound checks when indexing during decoding 2021-11-29 04:21:50 +00:00
Ivan Smirnov
f8ec8011fc Initial working version (but lots of temp stuff) 2021-11-28 16:20:24 +00:00