def jpeg.scan.extent
gralha-jpeg-decode@0.1.0.1 · jpeg.bend:516
import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
516def jpeg.scan.extent(xs: List<&2, JPEGComponent>, w: U32, h: U32, hm: U32, vm: U32, +vertical: Bool) -> U32:
517 match xs:
518 case Nil{}: 0
519 case Con{JPEGComponent{id, hh, vv, quant, dc, ac, predictor, bw, bh, coefficients, samples}, rest}:
520 jpeg.ceil((U.choose(U32, vertical, h, w) * U.choose(U32, vertical, vv, hh) : U32), (U.choose(U32, vertical, vm, hm) * 8 : U32))