@@ -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,15 @@ 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 latency of video encode operations to improve quality */
2722+ #define VA_ENC_TUNING_MODE_HIGH_QUALITY 0x00000001
2723+ /** \brief Compromise quality to lower the latency of video encode operations */
2724+ #define VA_ENC_TUNING_MODE_LOW_LATENCY 0x00000002
2725+ /** \brief Compromise quality for lowest latency of video encode operations */
2726+ #define VA_ENC_TUNING_MODE_ULTRA_LOW_LATENCY 0x00000004
2727+
27102728/**
27112729 * \brief Encoding quality level.
27122730 *
@@ -2717,15 +2735,20 @@ typedef struct _VAEncMiscParameterBufferMultiPassFrameSize {
27172735 * attribute. A lower value means higher quality, and a value of 1 represents the highest
27182736 * quality. The quality level setting is used as a trade-off between quality and speed/power
27192737 * consumption, with higher quality corresponds to lower speed and higher power consumption.
2738+ * The number of supported tuning modes can be queried through the VAConfigAttribEncTuningMode
2739+ * attribute.
27202740 */
27212741typedef struct _VAEncMiscParameterBufferQualityLevel {
27222742 /** \brief Encoding quality level setting. When set to 0, default quality
27232743 * level is used.
27242744 */
27252745 uint32_t quality_level ;
27262746
2747+ /** \brief Encoding tuning mode setting, see VA_ENC_TUNING_MODE_XXX */
2748+ uint32_t tuning_mode ;
2749+
27272750 /** \brief Reserved bytes for future use, must be zero */
2728- uint32_t va_reserved [VA_PADDING_LOW ];
2751+ uint32_t va_reserved [VA_PADDING_LOW - 1 ];
27292752} VAEncMiscParameterBufferQualityLevel ;
27302753
27312754/**
0 commit comments