pub struct ChromaLayout {
pub shift_x: u32,
pub shift_y: u32,
pub uv_rows_per_luma: usize,
}Expand description
Chroma addressing parameters for a semi-planar (NV12/NV16/NV24) format —
the single source of truth shared by the codec writer, CPU readers, and the
Linux + macOS GL shaders. See PixelFormat::chroma_layout.
Fields§
§shift_x: u32Right-shift applied to the luma x to get the chroma column: 1 = half
horizontal resolution (NV12/NV16), 0 = full resolution (NV24).
shift_y: u32Right-shift applied to the luma y to get the chroma row: 1 = half
vertical resolution (NV12), 0 = full vertical resolution (NV16/NV24).
uv_rows_per_luma: usizePhysical buffer rows the UV plane advances per chroma line: 1 for
NV12/NV16 (one (Cb,Cr) line fits in a single stride-wide row), 2 for
NV24 (a full-width 2*W-byte chroma line spans two stride-wide rows).
Trait Implementations§
Source§impl Clone for ChromaLayout
impl Clone for ChromaLayout
Source§fn clone(&self) -> ChromaLayout
fn clone(&self) -> ChromaLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChromaLayout
Source§impl Debug for ChromaLayout
impl Debug for ChromaLayout
impl Eq for ChromaLayout
Source§impl PartialEq for ChromaLayout
impl PartialEq for ChromaLayout
Source§fn eq(&self, other: &ChromaLayout) -> bool
fn eq(&self, other: &ChromaLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChromaLayout
Auto Trait Implementations§
impl Freeze for ChromaLayout
impl RefUnwindSafe for ChromaLayout
impl Send for ChromaLayout
impl Sync for ChromaLayout
impl Unpin for ChromaLayout
impl UnsafeUnpin for ChromaLayout
impl UnwindSafe for ChromaLayout
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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