pub fn layout_from_format(
format: RawFormat,
width: u32,
height: u32,
) -> Result<FrameLayout, Error>Expand description
Validates a clip’s format and turns it into a FrameLayout.
Accepts integer YUV420, YUV422, and YUV444 sources at 8, 10, or 12-bit. Rejects RGB, since the denoiser’s channel distance weights are calibrated for YUV. Rejects float sample types and any other chroma subsampling.
Rejects GRAY too. Core’s Subsampling has no “no chroma” variant,
so a GRAY source would have to be represented as YUV444, which makes
av_denoise_core::frame::FrameLayout::chroma_dims report
full-resolution chroma planes that do not exist. The filter would
then have to fabricate and push full-size neutral chroma every
frame, four times the real data volume of true 4:2:0 chroma, purely
to work around a gap in the geometry type. GRAY is out of scope
until core can represent a source with no chroma planes at all.