eb1f64a01e
We only support equal MB/CTB per slice (with last slice possibly smaller) and this is not possible to fully describe with libva slice structure constraints. Report that we support arbitrary macroblocks per slice, verify if the slice structure requested by application can be used, otherwise divide the slices equally to achieve the requested number of slices. Also stop reporting power of two structure support, as that implies different size for each slice which cannot be supported. This fixes issue where slice encoding is not available at all with some applications (only supporting arbitrary macroblocks) or the number of slices being different from the requested number. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30363>