diff options
Diffstat (limited to 'va/va.h')
-rw-r--r-- | va/va.h | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -536,6 +536,13 @@ typedef enum */ VAConfigAttribEncQualityRange = 21, /** + * \brief Encoding quantization attribute. Read-only. + * + * This attribute conveys whether the driver supports certain types of quantization methods + * for encoding (e.g. trellis). See \c VA_ENC_QUANTIZATION_xxx for the list of quantization methods + */ + VAConfigAttribEncQuantization = 22, + /** * \brief Encoding skip frame attribute. Read-only. * * This attribute conveys whether the driver supports sending skip frame parameters @@ -736,6 +743,13 @@ typedef union _VAConfigAttribValEncJPEG { uint32_t value; } VAConfigAttribValEncJPEG; +/** @name Attribute values for VAConfigAttribEncQuantization */ +/**@{*/ +/** \brief Driver does not support special types of quantization */ +#define VA_ENC_QUANTIZATION_NONE 0x00000000 +/** \brief Driver supports trellis quantization */ +#define VA_ENC_QUANTIZATION_TRELLIS_SUPPORTED 0x00000001 +/**@}*/ /** \brief Attribute value for VAConfigAttribEncROI */ typedef union _VAConfigAttribValEncROI { struct { @@ -1380,6 +1394,8 @@ typedef enum /** \brief Buffer type used for HRD parameters. */ VAEncMiscParameterTypeHRD = 5, VAEncMiscParameterTypeQualityLevel = 6, + /** \brief Buffer type used for quantization parameters, it's per-sequence parameter*/ + VAEncMiscParameterTypeQuantization = 8, /** \brief Buffer type used for sending skip frame parameters to the encoder's * rate control, when the user has externally skipped frames. */ VAEncMiscParameterTypeSkipFrame = 9, @@ -1625,6 +1641,33 @@ typedef struct _VAEncMiscParameterBufferQualityLevel { } VAEncMiscParameterBufferQualityLevel; /** + * \brief Quantization settings for encoding. + * + * Some encoders support special types of quantization such as trellis, and this structure + * can be used by the app to control these special types of quantization by the encoder. + */ +typedef struct _VAEncMiscParameterQuantization +{ + union + { + /* if no flags is set then quantization is determined by the driver */ + struct + { + /* \brief disable trellis for all frames/fields */ + uint64_t disable_trellis : 1; + /* \brief enable trellis for I frames/fields */ + uint64_t enable_trellis_I : 1; + /* \brief enable trellis for P frames/fields */ + uint64_t enable_trellis_P : 1; + /* \brief enable trellis for B frames/fields */ + uint64_t enable_trellis_B : 1; + uint64_t reserved : 28; + } bits; + uint64_t value; + } quantization_flags; +} VAEncMiscParameterQuantization; + +/** * \brief Encoding skip frame. * * The application may choose to skip frames externally to the encoder (e.g. drop completely or |