From ac27a58c87bea9480f6603a731448f69c9c3b0fb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 9 Mar 2023 18:16:05 +0100 Subject: rearrange files --- lvc/codec/src/lib.rs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 lvc/codec/src/lib.rs (limited to 'lvc/codec/src/lib.rs') diff --git a/lvc/codec/src/lib.rs b/lvc/codec/src/lib.rs new file mode 100644 index 0000000..5ebd91c --- /dev/null +++ b/lvc/codec/src/lib.rs @@ -0,0 +1,51 @@ +#![feature(portable_simd)] +#![feature(io_error_other)] +#![feature(box_syntax)] + +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, PartialEq, Eq)] +pub struct Pixel { + pub r: PixelValue, + pub g: PixelValue, + pub b: PixelValue, +} + +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] +pub struct P2 { + pub x: i32, + pub y: i32, +} + +pub struct Frame { + pub size: P2, + pub pixels: Vec, +} + +#[derive(Debug, Clone, Copy)] +pub struct View { + pub a: P2, + pub b: P2, +} + +#[derive(Debug, Clone)] +pub enum Block { + Split(Box, Box), + Lit(Vec), + Ref(Ref), +} + +#[derive(Debug, Clone, Copy, Default)] +pub struct Ref { + pub pos_off: P2, + pub color_off: Pixel, +} -- cgit v1.2.3-70-g09d2