Skip to main content

downscale_frame

Function downscale_frame 

Source
pub fn downscale_frame(
    frame: &DecodedVideoFrame,
    factor: u32,
) -> Result<DecodedVideoFrame, String>
Expand description

The frame shrunk by factor (2 for half size, 4 for quarter), each output sample the mean of the factor x factor block it covers, the visible size rounded down to even numbers so 4:2:0 encoders take it.

ยงErrors

Returns a message for a factor below 2, a frame too small to shrink, or a plane shorter than its layout.