[go: up one dir, main page]

Function cros_codecs::i4xx_copy

source ·
pub fn i4xx_copy(
    src: &[u8],
    dst: &mut [u8],
    width: usize,
    height: usize,
    strides: [usize; 3],
    offsets: [usize; 3],
    (sub_h, sub_v): (bool, bool)
)
Expand description

Copies src into dst as I4xx (YUV tri-planar).

This function does not change the data layout beyond removing any padding in the source, i.e. both src and dst are 3-planar YUV buffers.

strides and offsets give the stride and starting position of each plane in src. In dst each plane will be put sequentially one after the other.

sub_h and sub_v enable horizontal and vertical sub-sampling, respectively. E.g, if both sub_h and sub_v are true the data will be 4:2:0, if only sub_v is true then it will be 4:2:2, and if both are false then we have 4:4:4.