diff options
Diffstat (limited to 'mtree-test/src/bin/encode.rs')
-rw-r--r-- | mtree-test/src/bin/encode.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mtree-test/src/bin/encode.rs b/mtree-test/src/bin/encode.rs index f9b1b74..5a166c8 100644 --- a/mtree-test/src/bin/encode.rs +++ b/mtree-test/src/bin/encode.rs @@ -1,7 +1,7 @@ use framework::{BitstreamFilter, bitstream_filter_main}; use glam::{I16Vec2, i16vec2}; use mtree_test::{AbsRef, BLOCK_SIZE, Frame, LastFrames, frame_to_frame_rect_copy}; -use std::{collections::VecDeque, io::Result}; +use std::{collections::VecDeque, io::Result, time::Instant}; fn main() -> Result<()> { bitstream_filter_main::<Enc>() @@ -34,6 +34,7 @@ impl BitstreamFilter for Enc { let mut out = Vec::new(); let mut num_refs = 0; + let t = Instant::now(); for bx in 0..self.res.x / BLOCK_SIZE { for by in 0..self.res.y / BLOCK_SIZE { let boff = i16vec2(bx * BLOCK_SIZE, by * BLOCK_SIZE); @@ -70,10 +71,12 @@ impl BitstreamFilter for Enc { } } } + eprintln!("search\t{:?}", t.elapsed()); self.last.frames.push_back(frame); let frame_index = self.last.frame_offset + self.last.frames.len() as u64 - 1; + let t = Instant::now(); for xo in 0..self.res.x - BLOCK_SIZE { for yo in 0..self.res.y - BLOCK_SIZE { self.tree.insert( @@ -86,7 +89,9 @@ impl BitstreamFilter for Enc { ) } } - eprintln!("aaaaaaa {} {num_refs} aaaa", self.tree.depth()); + eprintln!("insert\t{:?}", t.elapsed()); + + eprintln!("depth={} refs={num_refs}", self.tree.depth()); out } |