Realm

oa::video::convert_format

Convert a frame between Nv12 and Yuv420Planar8 plane layouts without changing content, extent, or component ranges. Each plane is repacked by a resample dispatch at identity mapping; NV12’s interleaved chroma pair splits into two dispatches (or merges from two) through per-component stride selection. Errors Returns an error for a non-device-planar frame, a same-format or non-admitted target, or a runtime recording failure.

FnRust public API

Function Documentation

pub fn convert_format( frame: &VideoFrame, format: VideoPixelFormat ) -> Result<VideoFrame>
Convert a frame between Nv12 and Yuv420Planar8 plane layouts without changing content, extent, or component ranges. Each plane is repacked by a resample dispatch at identity mapping; NV12’s interleaved chroma pair splits into two dispatches (or merges from two) through per-component stride selection. Errors Returns an error for a non-device-planar frame, a same-format or non-admitted target, or a runtime recording failure.