diff options
author | metamuffin <metamuffin@disroot.org> | 2023-11-18 14:16:51 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-11-18 14:16:51 +0100 |
commit | 14051d7470d7662430694f0752d00483b52e1278 (patch) | |
tree | 5dbd97687a95b96b4502ef27c5d25daede2fffff /flowy/src/main.rs | |
parent | 89ecbf2027f09824c8f92e5ff4771ef72c6a44d3 (diff) | |
download | video-codec-experiments-14051d7470d7662430694f0752d00483b52e1278.tar video-codec-experiments-14051d7470d7662430694f0752d00483b52e1278.tar.bz2 video-codec-experiments-14051d7470d7662430694f0752d00483b52e1278.tar.zst |
better search
Diffstat (limited to 'flowy/src/main.rs')
-rw-r--r-- | flowy/src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/flowy/src/main.rs b/flowy/src/main.rs index 60e30c0..a0a4024 100644 --- a/flowy/src/main.rs +++ b/flowy/src/main.rs @@ -1,5 +1,6 @@ pub mod motion; +use framework::Framework; use log::{debug, info}; use motion::{dec::MotionDecoder, enc::MotionEncoder, CommonBuffers, Params}; use pollster::FutureExt; @@ -68,17 +69,20 @@ fn main() { let mut buffer = vec![0u8; width * height * 4]; + let (mut framework, fparams) = Framework::init(); + menc.write_uniforms(&queue); mdec.write_uniforms(&queue); info!("ready (setup took {:?})", t.elapsed()); + let mut i = 0; loop { let rp = RoundParams { swap: i % 2 }; debug!("read"); stdin().read_exact(&mut buffer).unwrap(); + framework.next_frame_manual(); - let t = Instant::now(); debug!("upload"); bufs.upload(&queue, ¶ms, &rp, &buffer); @@ -98,7 +102,7 @@ fn main() { debug!("download"); bufs.download(&device, &mut buffer); - info!("frame #{i} took {:?}", t.elapsed()); + framework.encode_done(&[]); debug!("write"); stdout().write_all(&buffer).unwrap(); i += 1; |