@@ -1050,6 +1050,15 @@ typedef enum {
10501050 * columns supported for encoding with tile support.
10511051 */
10521052 VAConfigAttribEncMaxTileCols = 57 ,
1053+ /**
1054+ * \brief Encoding tuning mode attribute. Read-only.
1055+ *
1056+ * This attribute conveys whether the driver supports different tuning modes
1057+ * for encoding. The attribute value is any combination of VA_ENC_TUNING_MODE_XXX.
1058+ *
1059+ * The tuning mode is passed to the driver using VAEncMiscParameterBufferQualityLevel.
1060+ */
1061+ VAConfigAttribEncTuningMode = 58 ,
10531062 /**@}*/
10541063 VAConfigAttribTypeMax
10551064} VAConfigAttribType ;
@@ -2707,6 +2716,13 @@ typedef struct _VAEncMiscParameterBufferMultiPassFrameSize {
27072716 unsigned long va_reserved [VA_PADDING_LOW ];
27082717} VAEncMiscParameterBufferMultiPassFrameSize ;
27092718
2719+ /** \brief Default tuning mode */
2720+ #define VA_ENC_TUNING_MODE_DEFAULT 0x00000000
2721+ /** \brief Compromise quality to lower the latency of video encode operations */
2722+ #define VA_ENC_TUNING_MODE_LOW_LATENCY 0x00000001
2723+ /** \brief Compromise quality for lowest latency of video encode operations */
2724+ #define VA_ENC_TUNING_MODE_ULTRA_LOW_LATENCY 0x00000002
2725+
27102726/**
27112727 * \brief Encoding quality level.
27122728 *
@@ -2717,15 +2733,20 @@ typedef struct _VAEncMiscParameterBufferMultiPassFrameSize {
27172733 * attribute. A lower value means higher quality, and a value of 1 represents the highest
27182734 * quality. The quality level setting is used as a trade-off between quality and speed/power
27192735 * consumption, with higher quality corresponds to lower speed and higher power consumption.
2736+ * The number of supported tuning modes can be queried through the VAConfigAttribEncTuningMode
2737+ * attribute.
27202738 */
27212739typedef struct _VAEncMiscParameterBufferQualityLevel {
27222740 /** \brief Encoding quality level setting. When set to 0, default quality
27232741 * level is used.
27242742 */
27252743 uint32_t quality_level ;
27262744
2745+ /** \brief Encoding tuning mode setting, see VA_ENC_TUNING_MODE_XXX */
2746+ uint32_t tuning_mode ;
2747+
27272748 /** \brief Reserved bytes for future use, must be zero */
2728- uint32_t va_reserved [VA_PADDING_LOW ];
2749+ uint32_t va_reserved [VA_PADDING_LOW - 1 ];
27292750} VAEncMiscParameterBufferQualityLevel ;
27302751
27312752/**
0 commit comments