pub fn decode_scan(
data: &[u8],
scan_start: usize,
frame: &FrameInfo,
scan_components: &[ScanComponent],
dc_specs: &[Option<HuffmanSpec>; 4],
ac_specs: &[Option<HuffmanSpec>; 4],
restart_interval: u16,
) -> Result<(Vec<DctGrid>, usize)>Expand description
Decode the entropy-coded scan data into DctGrids.
data: full JPEG file bytesscan_start: byte offset of the first entropy-coded byte (right after SOS header)frame: parsed frame infoscan_components: component selectors from SOSdc_specs/ac_specs: Huffman table specs, indexed by table IDrestart_interval: from DRI marker, 0 = no restarts
Returns (grids, end_position). end_position is the byte after the last scan byte.