pub struct PlaneBuffer { /* private fields */ }Expand description
Buffer for a single video plane (Y, U, or V).
Implementations§
Source§impl PlaneBuffer
impl PlaneBuffer
Sourcepub fn new(
width: u32,
height: u32,
bit_depth: u8,
plane_type: PlaneType,
) -> Self
pub fn new( width: u32, height: u32, bit_depth: u8, plane_type: PlaneType, ) -> Self
Create a new plane buffer.
Sourcepub fn with_stride(
width: u32,
height: u32,
stride: usize,
bit_depth: u8,
plane_type: PlaneType,
) -> Self
pub fn with_stride( width: u32, height: u32, stride: usize, bit_depth: u8, plane_type: PlaneType, ) -> Self
Create a plane buffer with custom stride.
Sourcepub const fn plane_type(&self) -> PlaneType
pub const fn plane_type(&self) -> PlaneType
Get the plane type.
Sourcepub fn set_clamped(&mut self, x: u32, y: u32, value: i16)
pub fn set_clamped(&mut self, x: u32, y: u32, value: i16)
Set a pixel value with clamping to valid range.
Sourcepub fn copy_from(&mut self, other: &PlaneBuffer) -> ReconstructResult<()>
pub fn copy_from(&mut self, other: &PlaneBuffer) -> ReconstructResult<()>
Sourcepub fn copy_block_from(
&mut self,
other: &PlaneBuffer,
src_x: u32,
src_y: u32,
dst_x: u32,
dst_y: u32,
width: u32,
height: u32,
)
pub fn copy_block_from( &mut self, other: &PlaneBuffer, src_x: u32, src_y: u32, dst_x: u32, dst_y: u32, width: u32, height: u32, )
Copy a block from another plane buffer.
Trait Implementations§
Source§impl Clone for PlaneBuffer
impl Clone for PlaneBuffer
Source§fn clone(&self) -> PlaneBuffer
fn clone(&self) -> PlaneBuffer
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 PlaneBuffer
impl RefUnwindSafe for PlaneBuffer
impl Send for PlaneBuffer
impl Sync for PlaneBuffer
impl Unpin for PlaneBuffer
impl UnsafeUnpin for PlaneBuffer
impl UnwindSafe for PlaneBuffer
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