zoomvtools 2.0.0

Video motion vector analysis utilities in pure Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::mv::MotionVector;

#[derive(Debug, Clone, Copy)]
/// Decoded block entry from a packed vector stream.
pub struct FakeBlockData {
    /// Block origin on the analysis grid, in pixels.
    pub x: i32,
    /// Block origin on the analysis grid, in pixels.
    pub y: i32,
    /// Motion vector stored for this block.
    pub vector: MotionVector,
}

impl FakeBlockData {
    pub(crate) const fn update(&mut self, src: MotionVector) {
        self.vector = src;
    }
}