pub struct Plane { /* private fields */ }Expand description
One component’s reconstructed samples.
Implementations§
Source§impl Plane
impl Plane
Sourcepub fn get(&self, x: usize, y: usize) -> Option<u16>
pub fn get(&self, x: usize, y: usize) -> Option<u16>
The sample at (x, y), or None if outside the plane.
Sourcepub fn set(&mut self, x: usize, y: usize, value: u16)
pub fn set(&mut self, x: usize, y: usize, value: u16)
Set the sample at (x, y); out-of-range writes are dropped.
Sourcepub fn row(&self, y: usize) -> Option<&[u16]>
pub fn row(&self, y: usize) -> Option<&[u16]>
A read-only view of row y, or None if out of range.
Sourcepub fn sample_clamped(&self, x: isize, y: isize) -> u16
pub fn sample_clamped(&self, x: isize, y: isize) -> u16
The sample at signed (x, y), clamping the coordinates to the nearest
edge. This is how intra prediction reads neighbours that may lie off the
frame: the edge sample is replicated rather than treated as an error.
The plane must be non-empty; a zero-sized plane yields 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plane
impl RefUnwindSafe for Plane
impl Send for Plane
impl Sync for Plane
impl Unpin for Plane
impl UnsafeUnpin for Plane
impl UnwindSafe for Plane
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more