Function libwebp_sys::WebPINewYUVA
source · pub unsafe extern "C" fn WebPINewYUVA(
luma: *mut u8,
luma_size: usize,
luma_stride: c_int,
u: *mut u8,
u_size: usize,
u_stride: c_int,
v: *mut u8,
v_size: usize,
v_stride: c_int,
a: *mut u8,
a_size: usize,
a_stride: c_int
) -> *mut WebPIDecoder
Expand description
This function allocates and initializes an incremental-decoder object, which will output the raw luma/chroma samples into a preallocated planes if supplied. The luma plane is specified by its pointer ‘luma’, its size ‘luma_size’ and its stride ‘luma_stride’. Similarly, the chroma-u plane is specified by the ‘u’, ‘u_size’ and ‘u_stride’ parameters, and the chroma-v plane by ‘v’ and ‘v_size’. And same for the alpha-plane. The ‘a’ pointer can be pass NULL in case one is not interested in the transparency plane. Conversely, ‘luma’ can be passed NULL if no preallocated planes are supplied. In this case, the output buffer will be automatically allocated (using MODE_YUVA) when decoding starts. All parameters are then ignored. Returns NULL if the allocation failed or if a parameter is invalid.