Jpeg.jpeg.progressive.refine.symbol: def of gralha-jpeg-decode@0.1.0.1 Import: import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg Lines 331-343 of gralha-jpeg-decode@0.1.0.1/jpeg.bend: https://jend.leeeet.dev/read.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&start_line=331&end_line=343 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-bytes@0.1.0.1/bytes.bend as Bin def jpeg.progressive.refine.symbol(read: JPEGRead, +index: U32, +end: U32, +offset: U32, +p1: U32, +coefficients: Bin.Bytes, +predictor: U32) -> JPEGRefined: JPEGRead{symbol, stream} = read +rs = symbol +input = stream +run = (rs / 16 : U32) +count = (rs % 16 : U32) +ok = jpeg.stream.valid(input) && U32.is_le(count, 1) U.branch(JPEGRefined, Bool.not(ok), _ => JPEGRefined{U32.inc(end), JPEGBlock{jpeg.stream.invalid(input), coefficients, predictor}}, _ => U.branch(JPEGRefined, U32.is_eq(count, 1), _ => jpeg.progressive.refine.fresh(jpeg.bits(input, 1), index, end, run, offset, p1, coefficients, predictor), _ => U.branch(JPEGRefined, U32.is_eq(run, 15), _ => jpeg.progressive.walk(index, end, 16, 0, offset, p1, JPEGBlock{input, coefficients, predictor}), _ => jpeg.progressive.refine.eob(jpeg.progressive.eob(jpeg.bits(input, run), run, coefficients, predictor, 1), index, end, offset, p1)))) @unsafe Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.inc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mod https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGBlock https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGRead https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGRefined https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.bits https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.progressive.eob https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.progressive.refine.eob https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.progressive.refine.fresh https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.progressive.walk https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.stream.invalid https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.stream.valid https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch