pub struct ResidualBuffer { /* private fields */ }Expand description
Buffer for all residual planes in a frame.
Implementations§
Source§impl ResidualBuffer
impl ResidualBuffer
Sourcepub fn new(width: u32, height: u32, subsampling: ChromaSubsampling) -> Self
pub fn new(width: u32, height: u32, subsampling: ChromaSubsampling) -> Self
Create a new residual buffer.
Sourcepub fn y_plane(&self) -> &ResidualPlane
pub fn y_plane(&self) -> &ResidualPlane
Get the Y plane.
Sourcepub fn y_plane_mut(&mut self) -> &mut ResidualPlane
pub fn y_plane_mut(&mut self) -> &mut ResidualPlane
Get the Y plane mutably.
Sourcepub fn u_plane(&self) -> Option<&ResidualPlane>
pub fn u_plane(&self) -> Option<&ResidualPlane>
Get the U plane.
Sourcepub fn u_plane_mut(&mut self) -> Option<&mut ResidualPlane>
pub fn u_plane_mut(&mut self) -> Option<&mut ResidualPlane>
Get the U plane mutably.
Sourcepub fn v_plane(&self) -> Option<&ResidualPlane>
pub fn v_plane(&self) -> Option<&ResidualPlane>
Get the V plane.
Sourcepub fn v_plane_mut(&mut self) -> Option<&mut ResidualPlane>
pub fn v_plane_mut(&mut self) -> Option<&mut ResidualPlane>
Get the V plane mutably.
Sourcepub fn plane(&self, plane_type: PlaneType) -> Option<&ResidualPlane>
pub fn plane(&self, plane_type: PlaneType) -> Option<&ResidualPlane>
Get a plane by type.
Sourcepub fn plane_mut(&mut self, plane_type: PlaneType) -> Option<&mut ResidualPlane>
pub fn plane_mut(&mut self, plane_type: PlaneType) -> Option<&mut ResidualPlane>
Get a plane mutably by type.
Sourcepub fn add_to_frame(&self, frame: &mut FrameBuffer) -> ReconstructResult<()>
pub fn add_to_frame(&self, frame: &mut FrameBuffer) -> ReconstructResult<()>
Sourcepub fn add_block_to_frame(
&self,
frame: &mut FrameBuffer,
plane: PlaneType,
x: u32,
y: u32,
width: u32,
height: u32,
) -> ReconstructResult<()>
pub fn add_block_to_frame( &self, frame: &mut FrameBuffer, plane: PlaneType, x: u32, y: u32, width: u32, height: u32, ) -> ReconstructResult<()>
Add residuals to a frame buffer for a specific block.
Trait Implementations§
Source§impl Clone for ResidualBuffer
impl Clone for ResidualBuffer
Source§fn clone(&self) -> ResidualBuffer
fn clone(&self) -> ResidualBuffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResidualBuffer
impl RefUnwindSafe for ResidualBuffer
impl Send for ResidualBuffer
impl Sync for ResidualBuffer
impl Unpin for ResidualBuffer
impl UnsafeUnpin for ResidualBuffer
impl UnwindSafe for ResidualBuffer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more