Function webp_plane_distortion

Source
pub unsafe fn webp_plane_distortion(
    src: *const u8,
    src_stride: usize,
    ref_: *const u8,
    ref_stride: usize,
    width: c_int,
    height: c_int,
    x_step: usize,
    type_: c_int,
    distortion: *mut f32,
    result: *mut f32,
) -> c_int
Expand description

Compute the single distortion for packed planes of samples.

‘src’ will be compared to ‘ref’, and the raw distortion stored into ‘*distortion’. The refined metric (log(MSE), log(1 - ssim),…’ will be stored in ‘*result’. ‘x_step’ is the horizontal stride (in bytes) between samples. ‘src/ref_stride’ is the byte distance between rows. Returns false in case of error (bad parameter, memory allocation error, …).