summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinfengZhang <carl.zhang@intel.com>2018-05-22 23:16:24 +0800
committerXinfengZhang <carl.zhang@intel.com>2018-08-08 18:10:04 +0800
commit6ae717304c48e7710a76a87cef2a1096ff450af2 (patch)
treeb2fbadab589f4fe582a3207abe2bf60cd9daf95e
parenteefae9c0a7c80a368091577918080c553bb104e0 (diff)
downloadlibva-6ae717304c48e7710a76a87cef2a1096ff450af2.tar.gz
add new BRC mode definition QVBR
QVBR is Quality-Defined Variable Bitrate, comparing to VBR it add quality factor to the paramters Signed-off-by: XinfengZhang <carl.zhang@intel.com>
-rw-r--r--va/va.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/va/va.h b/va/va.h
index 4b75942..f075836 100644
--- a/va/va.h
+++ b/va/va.h
@@ -820,6 +820,13 @@ typedef struct _VAConfigAttrib {
* simultaneously. And BRC would adjust accordingly. This is so called
* Parallel BRC. */
#define VA_RC_PARALLEL 0x00000200
+/** \brief Quality defined VBR
+ * Use Quality factor to determine the good enough QP for each MB such that
+ * good enough quality can be obtained without waste of bits
+ * for this BRC mode, you must set all legacy VBR parameters
+ * and reuse quality_factor in \c VAEncMiscParameterRateControl
+ * */
+#define VA_RC_QVBR 0x00000400
/**@}*/
@@ -1907,6 +1914,7 @@ typedef struct _VAEncMiscParameterRateControl
/** Initial quality factor used in ICQ mode.
*
* This value must be between 1 and 51.
+ * this value will be deprecated in future, to use quality_factor instead of it.
*/
uint32_t ICQ_quality_factor;
/** Maximum quantiser value to use.
@@ -1915,8 +1923,13 @@ typedef struct _VAEncMiscParameterRateControl
* may exceed the target. Ignored if set to zero.
*/
uint32_t max_qp;
+ /** Quality factor
+ *
+ * the range will be different for different codec
+ */
+ uint32_t quality_factor;
/** Reserved bytes for future use, must be zero. */
- uint32_t va_reserved[VA_PADDING_MEDIUM - 2];
+ uint32_t va_reserved[VA_PADDING_MEDIUM - 3];
} VAEncMiscParameterRateControl;
/** Encode framerate parameters.