+/** \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;
+