pub struct YCbCrPlanarEncoder { /* private fields */ }Expand description
Encoder for planar f32 YCbCr input.
Use when you have pre-converted YCbCr from video decoders, etc. Skips RGB->YCbCr conversion entirely.
Only valid with ColorMode::YCbCr. XYB mode requires RGB input.
Implementations§
Source§impl YCbCrPlanarEncoder
impl YCbCrPlanarEncoder
Sourcepub fn push(
&mut self,
planes: &YCbCrPlanes<'_>,
rows: usize,
stop: impl Stop,
) -> Result<()>
pub fn push( &mut self, planes: &YCbCrPlanes<'_>, rows: usize, stop: impl Stop, ) -> Result<()>
Push full-resolution planes. Encoder subsamples chroma as needed.
planes: Y, Cb, Cr plane data with per-plane stridesrows: Number of luma rows to pushstop: Cancellation token
Sourcepub fn push_subsampled(
&mut self,
planes: &YCbCrPlanes<'_>,
y_rows: usize,
stop: impl Stop,
) -> Result<()>
pub fn push_subsampled( &mut self, planes: &YCbCrPlanes<'_>, y_rows: usize, stop: impl Stop, ) -> Result<()>
Push with pre-subsampled chroma.
Cb/Cr are already at target chroma resolution.
y_rows is luma row count; chroma rows derived from ChromaSubsampling.
Sourcepub fn rows_pushed(&self) -> u32
pub fn rows_pushed(&self) -> u32
Get number of rows pushed so far.
Sourcepub fn rows_remaining(&self) -> u32
pub fn rows_remaining(&self) -> u32
Get number of rows remaining.
Auto Trait Implementations§
impl Freeze for YCbCrPlanarEncoder
impl RefUnwindSafe for YCbCrPlanarEncoder
impl Send for YCbCrPlanarEncoder
impl Sync for YCbCrPlanarEncoder
impl Unpin for YCbCrPlanarEncoder
impl UnwindSafe for YCbCrPlanarEncoder
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