Realm

oa::video::crop

Extract a luma-space region; chroma extents follow the format’s rules. x and y must be even so chroma stays subsample-aligned. Errors Returns an error for a non-device-planar frame, odd offsets, or a region outside the visible extent.

FnRust public API

Function Documentation

pub fn crop( frame: &VideoFrame, region: VideoRegion ) -> Result<VideoFrame>
Extract a luma-space region; chroma extents follow the format’s rules. x and y must be even so chroma stays subsample-aligned. Errors Returns an error for a non-device-planar frame, odd offsets, or a region outside the visible extent.