From e5758c48c44cd952468594eca33a663e5ae3225f Mon Sep 17 00:00:00 2001 From: Sil Vilerino Date: Fri, 22 Sep 2023 08:32:51 -0400 Subject: [PATCH] va: Add VAConfigAttribEncMaxTileRows and VAConfigAttribEncMaxTileCols Currently there is no way of exposing the driver tile_rows and tile_cols limitations for encoding with tiles. For codecs like AV1 there is a cap specifying the max number of tiles, but without differentiating cols/rows. Different hardware may have restrictions which may need to be taken into account. More specifically, D3D12 encode exposes the maximum rows/cols and adding VAConfigAttribEncMaxTileRows/Cols allows for mapping that information to the VAOn12 driver. Signed-off-by: Sil Vilerino --- va/va.h | 14 ++++++++++++++ va/va_str.c | 2 ++ 2 files changed, 16 insertions(+) diff --git a/va/va.h b/va/va.h index 311ff61a1..e0df2b56d 100644 --- a/va/va.h +++ b/va/va.h @@ -1036,6 +1036,20 @@ typedef enum { * The value returned uses the VAConfigAttribValEncPerBlockControl type. */ VAConfigAttribEncPerBlockControl = 55, + /** + * \brief Maximum number of tile rows. Read-only. + * + * This attribute determines the maximum number of tile + * rows supported for encoding with tile support. + */ + VAConfigAttribEncMaxTileRows = 56, + /** + * \brief Maximum number of tile cols. Read-only. + * + * This attribute determines the maximum number of tile + * columns supported for encoding with tile support. + */ + VAConfigAttribEncMaxTileCols = 57, /**@}*/ VAConfigAttribTypeMax } VAConfigAttribType; diff --git a/va/va_str.c b/va/va_str.c index 99df94877..3d96f9b66 100644 --- a/va/va_str.c +++ b/va/va_str.c @@ -149,6 +149,8 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType) TOSTR(VAConfigAttribEncAV1Ext1); TOSTR(VAConfigAttribEncAV1Ext2); TOSTR(VAConfigAttribEncPerBlockControl); + TOSTR(VAConfigAttribEncMaxTileRows); + TOSTR(VAConfigAttribEncMaxTileCols); case VAConfigAttribTypeMax: break; }