#[non_exhaustive]pub enum ChromaDownsample {
SitingAware,
BoxAverage,
Nearest,
}Expand description
Chroma downsampling filter for subsampled YCbCr capture (4:2:0, 4:2:2, 4:4:0, 4:1:1).
Ignored for full-resolution (1×1) planar RGB, 4:4:4 YCbCr/GBR, and monochrome targets.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SitingAware
Phase-exact separable triangle downsampler honoring PlanarCaptureSpec::chroma_siting
and PlanarCaptureSpec::visible_rect crop origin.
Produces exact [1, 2, 1]/4 co-sited filtering for Left/TopLeft 2× axes,
[1, 3, 3, 1]/8 dual-bilinear filtering for Center 2× axes, and exact
dyadic triangle taps for 4× axes, with zero phase shift and edge clamping.
Refuses ChromaSiting::Unknown on any subsampled axis unless
PlanarCaptureOptions::unknown_siting_fallback is set.
BoxAverage
Unweighted box average over each chroma cell’s luma pixels, honoring crop origin
and clamping at visible edges. Works even when chroma_siting == ChromaSiting::Unknown.
Nearest
Nearest luma sample at each chroma sample center, honoring PlanarCaptureSpec::chroma_siting
and PlanarCaptureSpec::visible_rect crop origin.
Refuses ChromaSiting::Unknown on any subsampled axis unless
PlanarCaptureOptions::unknown_siting_fallback is set.
Trait Implementations§
Source§impl Clone for ChromaDownsample
impl Clone for ChromaDownsample
Source§fn clone(&self) -> ChromaDownsample
fn clone(&self) -> ChromaDownsample
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more