+/** \brief Attribute value for VAConfigAttribEncROI */
+typedef union _VAConfigAttribValEncROI {
+ struct {
+ /** \brief The number of ROI regions supported, 0 if ROI is not supported. */
+ unsigned int num_roi_regions : 8;
+ /**
+ * \brief A flag indicates whether ROI priority is supported
+ *
+ * \ref roi_rc_priority_support equal to 1 specifies the underlying driver supports
+ * ROI priority when VAConfigAttribRateControl != VA_RC_CQP, user can use \c roi_value
+ * in #VAEncROI to set ROI priority. \ref roi_rc_priority_support equal to 0 specifies
+ * the underlying driver doesn't support ROI priority.
+ *
+ * User should ignore \ref roi_rc_priority_support when VAConfigAttribRateControl == VA_RC_CQP
+ * because ROI delta QP is always required when VAConfigAttribRateControl == VA_RC_CQP.
+ */
+ unsigned int roi_rc_priority_support : 1;
+ /**
+ * \brief A flag indicates whether ROI delta QP is supported
+ *
+ * \ref roi_rc_qp_delat_support equal to 1 specifies the underlying driver supports
+ * ROI delta QP when VAConfigAttribRateControl != VA_RC_CQP, user can use \c roi_value
+ * in #VAEncROI to set ROI delta QP. \ref roi_rc_qp_delat_support equal to 0 specifies
+ * the underlying driver doesn't support ROI delta QP.
+ *
+ * User should ignore \ref roi_rc_qp_delat_support when VAConfigAttribRateControl == VA_RC_CQP
+ * because ROI delta QP is always required when VAConfigAttribRateControl == VA_RC_CQP.
+ */
+ unsigned int roi_rc_qp_delat_support : 1;
+ unsigned int reserved : 22;
+ } bits;
+ unsigned int value;
+} VAConfigAttribValEncROI;
+
+/** \brief Attribute value for VAConfigAttribEncRateControlExt */
+typedef union _VAConfigAttribValEncRateControlExt {
+ struct {
+ /**
+ * \brief The maximum number of temporal layers minus 1
+ *
+ * \ref max_num_temporal_layers_minus1 plus 1 specifies the maximum number of temporal
+ * layers that supported by the underlying driver. \ref max_num_temporal_layers_minus1
+ * equal to 0 implies the underlying driver doesn't support encoding with temporal layer.
+ */
+ unsigned int max_num_temporal_layers_minus1 : 8;
+
+ /**
+ * /brief support temporal layer bit-rate control flag
+ *
+ * \ref temporal_layer_bitrate_control_flag equal to 1 specifies the underlying driver
+ * can support bit-rate control per temporal layer when (#VAConfigAttribRateControl == #VA_RC_CBR ||
+ * #VAConfigAttribRateControl == #VA_RC_VBR).
+ *
+ * The underlying driver must set \ref temporal_layer_bitrate_control_flag to 0 when
+ * \c max_num_temporal_layers_minus1 is equal to 0
+ *
+ * To use bit-rate control per temporal layer, an application must send the right layer
+ * structure via #VAEncMiscParameterTemporalLayerStructure at the beginning of a coded sequence
+ * and then followed by #VAEncMiscParameterRateControl and #VAEncMiscParameterFrameRate structures
+ * for each layer, using the \c temporal_id field as the layer identifier. Otherwise
+ * the driver doesn't use bitrate control per temporal layer if an application doesn't send the
+ * layer structure via #VAEncMiscParameterTemporalLayerStructure to the driver. The driver returns
+ * VA_STATUS_ERROR_INVALID_PARAMETER if an application sends a wrong layer structure or doesn't send
+ * #VAEncMiscParameterRateControl and #VAEncMiscParameterFrameRate for each layer.
+ *
+ * The driver will ignore #VAEncMiscParameterTemporalLayerStructure and the \c temporal_id field
+ * in #VAEncMiscParameterRateControl and #VAEncMiscParameterFrameRate if
+ * \ref temporal_layer_bitrate_control_flag is equal to 0 or #VAConfigAttribRateControl == #VA_RC_CQP
+ */
+ unsigned int temporal_layer_bitrate_control_flag : 1;
+ unsigned int reserved : 23;
+ } bits;
+ unsigned int value;
+} VAConfigAttribValEncRateControlExt;
+