def jpeg.restart.marker

gralha-jpeg-decode@0.1.0.1 · jpeg.bend:457

import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg
import Base

457def jpeg.restart.marker(marker: JPEGMarker, scan: JPEGScan, expected: U32) -> JPEGScan:
458  JPEGMarker{tag, at, ok} = marker
459  JPEGScan{components, JPEGStream{data, position, word, count, spectral, valid}} = scan
460  JPEGScan{jpeg.components.reset(components), JPEGStream{data, at, 0, 0, jpeg.spectral.eob(spectral, 0), valid && ok && U32.is_eq(tag, expected)}}

Uses (8)

Used by (1)