Macaw.Data.Operations.Transforms.M4 (macaw_data v0.12.0)

View Source

m4 (spec/04 §4.5): per pixel column the first, last, least and greatest rows, deduplicated in order, so every column's extremes survive. width is frame-bound. A reducer (spec/04 §7).

A combine (spec/04 §1.4) on the bucket ladder (Macaw.Data.Operations.Transforms.Ladder): each chunk's partial is its buckets' first, last, least and greatest points at the level whose bucket is at most a quarter of a pixel; the merge folds each bucket into the pixel column its start lies in, so the answer is exact M4 over pixel columns whose boundaries move to a bucket edge, at most one bucket away.