MCPcopy Create free account
hub / github.com/RustCV/RustCV / from_format

Method from_format

rustcv-backend-msmf/src/stream.rs:176–181  ·  view source on GitHub ↗

Determines the buffer layout from a pixel format.

(format: PixelFormat)

Source from the content-addressed store, hash-verified

174impl BufferLayout {
175 /// Determines the buffer layout from a pixel format.
176 fn from_format(format: PixelFormat) -> Self {
177 match format {
178 PixelFormat::Known(FourCC::NV12) | PixelFormat::Known(FourCC::YV12) => Self::Planar,
179 _ => Self::Packed,
180 }
181 }
182}
183
184pub struct MsmfStream {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected