diff options
author | metamuffin <metamuffin@disroot.org> | 2023-03-08 21:26:35 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-03-08 21:26:35 +0100 |
commit | 292519649c4244adb6672488efe7c2e906726c58 (patch) | |
tree | 41e2cd62d53b47afa7995d91a326ef2e361029c7 /lvc/src/lib.rs | |
parent | 5b3c03bc0cfcf89e76953dde13ed58a39b5d1dd0 (diff) | |
download | video-codec-experiments-292519649c4244adb6672488efe7c2e906726c58.tar video-codec-experiments-292519649c4244adb6672488efe7c2e906726c58.tar.bz2 video-codec-experiments-292519649c4244adb6672488efe7c2e906726c58.tar.zst |
about to implement huff
Diffstat (limited to 'lvc/src/lib.rs')
-rw-r--r-- | lvc/src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lvc/src/lib.rs b/lvc/src/lib.rs index 94a432d..5ebd91c 100644 --- a/lvc/src/lib.rs +++ b/lvc/src/lib.rs @@ -1,26 +1,26 @@ #![feature(portable_simd)] +#![feature(io_error_other)] +#![feature(box_syntax)] -use bincode::{Decode, Encode}; - -#[cfg(test)] -pub mod bench; pub mod debug; pub mod decode; pub mod diff; pub mod encode; +pub mod huff; pub mod impls; +pub mod serialize; pub mod split; pub type PixelValue = i16; -#[derive(Debug, Clone, Copy, Default, Encode, Decode, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct Pixel { pub r: PixelValue, pub g: PixelValue, pub b: PixelValue, } -#[derive(Debug, Clone, Copy, Default, Encode, Decode, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct P2 { pub x: i32, pub y: i32, @@ -37,14 +37,14 @@ pub struct View { pub b: P2, } -#[derive(Debug, Clone, Encode, Decode)] +#[derive(Debug, Clone)] pub enum Block { - Lit(Vec<Pixel>), Split(Box<Block>, Box<Block>), + Lit(Vec<Pixel>), Ref(Ref), } -#[derive(Debug, Clone, Copy, Default, Encode, Decode)] +#[derive(Debug, Clone, Copy, Default)] pub struct Ref { pub pos_off: P2, pub color_off: Pixel, |