summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorCheng Chen <chengchen@google.com>2022-05-13 10:59:06 -0700
committerCheng Chen <chengchen@google.com>2022-05-27 14:36:13 -0700
commit4832bcff20d34ed25a771f3704cfe0a046dbd0f9 (patch)
treed6b4ef591d7bfbec101ebb167cb438aa21e2070a /vpx
parent9f1329f8ac88ea5d7c6ae5d6a57221c36cf85ac8 (diff)
downloadlibvpx-4832bcff20d34ed25a771f3704cfe0a046dbd0f9.tar.gz
L2E: Add control type for the external rate control API
Two control types are defined: QP and GOP control. Now the API only supports the QP model. Change-Id: Ib3a712964b9d2282c93993ee56e0558e4795fb46
Diffstat (limited to 'vpx')
-rw-r--r--vpx/vpx_ext_ratectrl.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/vpx/vpx_ext_ratectrl.h b/vpx/vpx_ext_ratectrl.h
index a193e5595..5b426b6cf 100644
--- a/vpx/vpx_ext_ratectrl.h
+++ b/vpx/vpx_ext_ratectrl.h
@@ -25,7 +25,15 @@ extern "C" {
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures.
*/
-#define VPX_EXT_RATECTRL_ABI_VERSION (1)
+#define VPX_EXT_RATECTRL_ABI_VERSION (2)
+
+/*!\brief The control type of the inference API.
+ * In VPX_RC_QP mode, the external rate control model determines the
+ * quantization parameter (QP) for each frame.
+ * In VPX_RC_GOP mode, the external rate control model determines the
+ * group of picture (GOP) of the video sequence.
+ */
+typedef enum vpx_rc_type { VPX_RC_QP = 0, VPX_RC_GOP = 1 } vpx_rc_type_t;
/*!\brief Abstract rate control model handler
*
@@ -328,6 +336,10 @@ typedef vpx_rc_status_t (*vpx_rc_delete_model_cb_fn_t)(
*/
typedef struct vpx_rc_funcs {
/*!
+ * The rate control type of this API.
+ */
+ vpx_rc_type_t rc_type;
+ /*!
* Create an external rate control model.
*/
vpx_rc_create_model_cb_fn_t create_model;