VA_ENC_SLICE_STRUCTURE_EQUAL_MULTI_ROWS is added to in the latest libva (1.8.0) which matches the hardware behaviour: /** \brief Driver supports any number of rows per slice but they must * be the same for all slices except for the last one, which must be * equal or smaller to the previous slices. */ And VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS is kind of deprecated for iHD since it's somehow introduced in [1] which is misleading from what we actually handles. [1]<https://github.com/intel/libva/commit/0e6d5441f19bdc674b4da3169d614d10fd644778>
Showing the changes to libavcodec/vaapi_encode.c (1 of 1 file). Show all
Unified · Split
| @@ -1900,6 +1900,9 @@ static av_cold int vaapi_encode_init_slice_structure(AVCodecContext *avctx) · 1899 unmodified lines | |||
| 1900 | req_slices = avctx->slices; | 1900 | req_slices = avctx->slices; |
| 1901 | } | 1901 | } |
| 1902 | if (slice_structure & VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS || | 1902 | if (slice_structure & VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS || |
| 1903 | #if VA_CHECK_VERSION(1, 8, 0) | ||
| 1904 | slice_structure & VA_ENC_SLICE_STRUCTURE_EQUAL_MULTI_ROWS || | ||
| 1905 | #endif | ||
| 1903 | slice_structure & VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS) { | 1906 | slice_structure & VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS) { |
| 1904 | ctx->nb_slices = req_slices; | 1907 | ctx->nb_slices = req_slices; |
| 1905 | ctx->slice_size = ctx->slice_block_rows / ctx->nb_slices; | 1908 | ctx->slice_size = ctx->slice_block_rows / ctx->nb_slices; |