fn slice_layout(
structure: u32,
max_slices: u32,
rows: u32,
wanted: u32,
) -> Result<(u32, u32), String>Expand description
How many slices a picture of rows block rows is cut into and how many rows each
takes, for wanted slices under the driver’s slice structure and at most max_slices:
arbitrary rows as asked, equal rows with a shorter last slice where the driver wants them
equal (iHD’s H.264), a power of two of rows where that is all it takes, one row each
where it takes only that. A slice a row is 68 slices at 1080p, none predicting from the
row above and each restarting the entropy coder: on Intel Arc a scroll of text at one
quantizer cost 12.4 kB a frame so cut and 8.6 kB in four slices, at the same PSNR.