fn compute_stripe_geometries(
height: usize,
n: usize,
codec: Codec,
) -> Vec<(usize, usize)>Expand description
Divide height into n contiguous regions as (y_start, height), by codec.
- JPEG: JPEG has no vertical subsampling, so stripes may be any height; the heights differ
by at most one row — the first
remainderstripes take one extra each — and every row of the frame is covered. - Video: one region, its height forced even since 4:2:0 pairs chroma rows vertically. The deliberate cost is that a single trailing odd row may be left uncovered — preferable to an odd-height picture the encoder cannot represent.