From 6ae717304c48e7710a76a87cef2a1096ff450af2 Mon Sep 17 00:00:00 2001 From: XinfengZhang Date: Tue, 22 May 2018 23:16:24 +0800 Subject: [PATCH] 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 --- va/va.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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. -- 2.11.0