pub struct V210Layout { /* private fields */ }Expand description
Validated V210 storage geometry, including optional initialized row padding.
Width must be positive and divisible by six. Height must be positive. Rows
contain at least width / 6 * 16 bytes; their stride must be divisible by four.
Both the V210 storage and equivalent P216 frame must fit MAX_VIDEO_BYTES.
Implementations§
Source§impl V210Layout
impl V210Layout
Sourcepub fn new(width: u32, height: u32) -> Result<Self>
pub fn new(width: u32, height: u32) -> Result<Self>
Create a tightly packed layout of complete six-pixel groups.
§Errors
Error::InvalidFrame for a width that is zero or not a multiple of
six, a zero height, or storage beyond the video limit.
Sourcepub fn with_line_stride_bytes(
width: u32,
height: u32,
stride_bytes: usize,
) -> Result<Self>
pub fn with_line_stride_bytes( width: u32, height: u32, stride_bytes: usize, ) -> Result<Self>
Sourcepub const fn line_stride_bytes(self) -> usize
pub const fn line_stride_bytes(self) -> usize
Byte stride between V210 rows.
Sourcepub const fn required_words(self) -> usize
pub const fn required_words(self) -> usize
Complete required storage, including row padding, in 32-bit words.
Sourcepub const fn active_words_per_row(self) -> usize
pub const fn active_words_per_row(self) -> usize
Active 32-bit words in each row, excluding padding.
Trait Implementations§
Source§impl Clone for V210Layout
impl Clone for V210Layout
impl Copy for V210Layout
Source§impl Debug for V210Layout
impl Debug for V210Layout
impl Eq for V210Layout
Source§impl Hash for V210Layout
impl Hash for V210Layout
Source§impl PartialEq for V210Layout
impl PartialEq for V210Layout
impl StructuralPartialEq for V210Layout
Auto Trait Implementations§
impl Freeze for V210Layout
impl RefUnwindSafe for V210Layout
impl Send for V210Layout
impl Sync for V210Layout
impl Unpin for V210Layout
impl UnsafeUnpin for V210Layout
impl UnwindSafe for V210Layout
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