summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bian <jonathan.bian@intel.com>2013-06-13 22:04:30 -0700
committerXiang, Haihao <haihao.xiang@intel.com>2014-08-22 13:55:59 +0800
commit6c16be92c56a8f136790510e06817a21241c9fe9 (patch)
tree27e1d9b3dec76110080e42dbb54b4aad77578542
parentacfcd5f0637a951d50c5112c7dfbd46f1d0dcdb3 (diff)
downloadlibva-v1.3.x.tar.gz
Added VAConfigEncQualityRange attribute and VAEncMiscParameterBufferQualityLevel to support encoder quality settings.v1.3.x
(cherry picked from commit 24a14f9d13e6fe0c25d4094c4884aa4076ed05bc) Conflicts: va/va.h
-rw-r--r--va/va.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/va/va.h b/va/va.h
index 979328a..adb0d6e 100644
--- a/va/va.h
+++ b/va/va.h
@@ -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.