Skip to main content

decode_rows_par

Function decode_rows_par 

Source
pub fn decode_rows_par<F>(
    data: &[u8],
    hdr: &LjpegHeader,
    parallel: bool,
    sink: F,
) -> Result<()>
where F: FnMut(usize, &[u16]) -> Result<()>,
Expand description

decode_rows that first decodes large scans on all threads when parallel is set (decode_frame_parallel; scans with restart markers one interval per task). Rows reach sink in order either way with identical values; corrupt streams always take the sequential path, so errors are identical too.