diff options
author | metamuffin <metamuffin@disroot.org> | 2023-11-18 02:39:47 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-11-18 02:39:47 +0100 |
commit | 28af3138598e5c5f7e4d7c70218c26f4d2f46208 (patch) | |
tree | 83a8e1559f4798b2f33cc59e35cd5d1931be2683 /flowy/src/motion/enc.rs | |
parent | ebd59fb09a4e094701f195d86662e1a9d00fed2b (diff) | |
download | video-codec-experiments-28af3138598e5c5f7e4d7c70218c26f4d2f46208.tar video-codec-experiments-28af3138598e5c5f7e4d7c70218c26f4d2f46208.tar.bz2 video-codec-experiments-28af3138598e5c5f7e4d7c70218c26f4d2f46208.tar.zst |
works very well
Diffstat (limited to 'flowy/src/motion/enc.rs')
-rw-r--r-- | flowy/src/motion/enc.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/flowy/src/motion/enc.rs b/flowy/src/motion/enc.rs index 76a2c7f..cb672a7 100644 --- a/flowy/src/motion/enc.rs +++ b/flowy/src/motion/enc.rs @@ -20,7 +20,9 @@ pub struct MotionEncoder { #[derive(Debug, Clone, Copy, Pod, Zeroable, Default)] pub struct EncoderUniform { block_size: [i32; 2], - output_stride: i32, + output_stride: u32, + search_radius: i32, + skip_threshold: f32, _pad: u32, } @@ -33,8 +35,10 @@ impl MotionEncoder { mapped_at_creation: false, }); let uniform = EncoderUniform { - block_size: [8, 8], - output_stride: (params.width / params.block_width) as i32, + block_size: [params.block_width as i32, params.block_height as i32], + output_stride: (params.width / params.block_width) as u32, + search_radius: 16, + skip_threshold: 0.04, ..Default::default() }; |