def jpeg.idct.horizontal
gralha-jpeg-decode@0.1.0.1 · jpeg.bend:627
import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg
import Base
import gralha-bytes@0.1.0.1/bytes.bend as Bin
627def jpeg.idct.horizontal(n: Nat, +u: U32, +x: U32, +row: U32, +offset: U32, +coefficients: Bin.Bytes, +quant: Bin.Bytes, acc: F32) -> F32:
628 match n:
629 case 0n: acc
630 case 1n+d:
631 +i = (row * 8 + u : U32)
632 jpeg.idct.horizontal(d, U32.inc(u), x, row, offset, coefficients, quant, (acc + jpeg.signed(Bin.bytes.get(coefficients, (offset + i : U32))) * U32.to_f32(Bin.bytes.get(quant, i)) * jpeg.idct.basis(x, u) : F32))