aboutsummaryrefslogtreecommitdiff
path: root/lvc/src/decode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lvc/src/decode.rs')
-rw-r--r--lvc/src/decode.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/lvc/src/decode.rs b/lvc/src/decode.rs
deleted file mode 100644
index 771cba9..0000000
--- a/lvc/src/decode.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-use crate::{split::split, Block, Frame, View, P2};
-use rayon::join;
-
-pub fn decode(last_frame: &Frame, frame: &mut Frame, view: View, block: &Block) {
- match block {
- Block::Lit(pxs) => frame.import(view, &pxs),
- Block::Split(a, b) => {
- let [av, bv] = split(view);
- let (frame1, frame2) =
- unsafe { (&mut *(frame as *mut Frame), &mut *(frame as *mut Frame)) };
- join(
- || decode(last_frame, frame1, av, &a),
- || decode(last_frame, frame2, bv, &b),
- );
- }
- Block::Ref(r) => {
- for y in view.a.y..view.b.y {
- for x in view.a.x..view.b.x {
- let p = P2 { x, y };
- frame[p] = last_frame[p + r.pos_off] + r.color_off
- }
- }
- }
- }
-}