Commit 6dc45909 authored by Romain Vimont's avatar Romain Vimont Committed by Thomas Daede

Expose tiled view of frame motion vectors

Add a convenience method to access the whole FrameMotionVectors as
TileMotionVectors.
parent 5ebc6e3b
......@@ -18,6 +18,7 @@ use crate::FrameState;
use crate::partition::*;
use crate::partition::RefType::*;
use crate::plane::*;
use crate::tiling::*;
use crate::util::Pixel;
use std::ops::{Index, IndexMut};
......@@ -280,6 +281,16 @@ impl FrameMotionVectors {
rows,
}
}
#[inline(always)]
pub fn as_tile_motion_vectors(&self) -> TileMotionVectors<'_> {
TileMotionVectors::new(self, 0, 0, self.cols, self.rows)
}
#[inline(always)]
pub fn as_tile_motion_vectors_mut(&mut self) -> TileMotionVectorsMut<'_> {
TileMotionVectorsMut::new(self, 0, 0, self.cols, self.rows)
}
}
impl Index<usize> for FrameMotionVectors {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment