From cc1f02a71bd3ad5235ac92dec2d9c516c74f8b1c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 6 Dec 2022 08:41:48 +0100 Subject: decode somewhat works --- evc/src/bin/decode.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'evc/src/bin/decode.rs') diff --git a/evc/src/bin/decode.rs b/evc/src/bin/decode.rs index 0a00426..af6edc6 100644 --- a/evc/src/bin/decode.rs +++ b/evc/src/bin/decode.rs @@ -45,13 +45,7 @@ fn main() -> anyhow::Result<()> { fn blit_block(block: &Block, mut target: View<&mut Frame>, prev: View<&Frame>) { match &block.inner { - BlockInner::Literal(pixels) => { - for x in 0..block.size.0 { - for y in 0..block.size.1 { - target[(x, y)] = pixels[x + y * block.size.0] - } - } - } + BlockInner::Literal(pixels) => target.set_pixels(pixels), BlockInner::Split(box [a, b]) => { let [at, bt] = target.split_mut_unsafe(); let [ap, bp] = prev.split(); -- cgit v1.2.3-70-g09d2