summaryrefslogtreecommitdiff
path: root/vendor/qoi/src/consts.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
committerValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
commit1b6a04ca5504955c571d1c97504fb45ea0befee4 (patch)
tree7579f518b23313e8a9748a88ab6173d5e030b227 /vendor/qoi/src/consts.rs
parent5ecd8cf2cba827454317368b68571df0d13d7842 (diff)
downloadfparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.tar.xz
fparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.zip
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
Diffstat (limited to 'vendor/qoi/src/consts.rs')
-rw-r--r--vendor/qoi/src/consts.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/qoi/src/consts.rs b/vendor/qoi/src/consts.rs
new file mode 100644
index 0000000..2281c24
--- /dev/null
+++ b/vendor/qoi/src/consts.rs
@@ -0,0 +1,17 @@
+pub const QOI_OP_INDEX: u8 = 0x00; // 00xxxxxx
+pub const QOI_OP_DIFF: u8 = 0x40; // 01xxxxxx
+pub const QOI_OP_LUMA: u8 = 0x80; // 10xxxxxx
+pub const QOI_OP_RUN: u8 = 0xc0; // 11xxxxxx
+pub const QOI_OP_RGB: u8 = 0xfe; // 11111110
+pub const QOI_OP_RGBA: u8 = 0xff; // 11111111
+
+pub const QOI_MASK_2: u8 = 0xc0; // (11)000000
+
+pub const QOI_HEADER_SIZE: usize = 14;
+
+pub const QOI_PADDING: [u8; 8] = [0, 0, 0, 0, 0, 0, 0, 0x01]; // 7 zeros and one 0x01 marker
+pub const QOI_PADDING_SIZE: usize = 8;
+
+pub const QOI_MAGIC: u32 = u32::from_be_bytes(*b"qoif");
+
+pub const QOI_PIXELS_MAX: usize = 400_000_000;