diff options
author | Jonathan Bian <jonathan.bian@intel.com> | 2013-06-13 22:04:30 -0700 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-09-07 23:14:42 +0800 |
commit | c0af733a147306b4e79354174dc1be56de7dfeb7 (patch) | |
tree | b3bcda446036d00f3ea96b35f6f06945b6f994d1 /va | |
parent | c356638098e55453d2fac8bbb92eafc8cc32d6f4 (diff) | |
download | libva-c0af733a147306b4e79354174dc1be56de7dfeb7.tar.gz |
Added VAConfigEncQualityRange attribute and VAEncMiscParameterBufferQualityLevel to support encoder quality settings.
(cherry picked from commit 24a14f9d13e6fe0c25d4094c4884aa4076ed05bc)
Conflicts:
va/va.h
Diffstat (limited to 'va')
-rw-r--r-- | va/va.h | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -386,6 +386,15 @@ typedef enum * through VAEncSliceParameterBufferH264::macroblock_info. */ VAConfigAttribEncMacroblockInfo = 16, + /** + * \brief Encoding quality range attribute. Read-only. + * + * This attribute conveys whether the driver supports different quality level settings + * for encoding. A value less than or equal to 1 means that the encoder only has a single + * quality setting, and a value greater than 1 represents the number of quality levels + * that can be configured. e.g. a value of 2 means there are two distinct quality levels. + */ + VAConfigAttribEncQualityRange = 21, /**@}*/ VAConfigAttribTypeMax } VAConfigAttribType; @@ -939,6 +948,7 @@ typedef enum VAEncMiscParameterTypeMaxFrameSize = 4, /** \brief Buffer type used for HRD parameters. */ VAEncMiscParameterTypeHRD = 5, + VAEncMiscParameterTypeQualityLevel = 6, } VAEncMiscParameterType; /** \brief Packed header type. */ @@ -1071,6 +1081,22 @@ typedef struct _VAEncMiscParameterBufferMaxFrameSize { } VAEncMiscParameterBufferMaxFrameSize; /** + * \brief Encoding quality level. + * + * The encoding quality could be set through this structure, if the implementation + * supports multiple quality levels. The quality level set through this structure is + * persistent over the entire coded sequence, or until a new structure is being sent. + * The quality level range can be queried through the VAConfigAttribEncQualityRange + * attribute. A lower value means higher quality, and a value of 1 represents the highest + * quality. The quality level setting is used as a trade-off between quality and speed/power + * consumption, with higher quality corresponds to lower speed and higher power consumption. + */ +typedef struct _VAEncMiscParameterBufferQualityLevel { + /** \brief Encoding quality level setting. */ + unsigned int quality_level; +} VAEncMiscParameterBufferQualityLevel; + +/* * There will be cases where the bitstream buffer will not have enough room to hold * the data for the entire slice, and the following flags will be used in the slice * parameter to signal to the server for the possible cases. |