diff options
author | angiebird <angiebird@google.com> | 2020-10-12 15:12:03 -0700 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2020-10-20 17:13:59 -0700 |
commit | 90271b22016b89a115206a38ab4790a76cce3553 (patch) | |
tree | 42e3be8964b9b3c55d740cb3cc2d0178df9b5d5c /vpx | |
parent | e94000aa35c5beb8901952abb9c0d037d3c977f1 (diff) | |
download | libvpx-90271b22016b89a115206a38ab4790a76cce3553.tar libvpx-90271b22016b89a115206a38ab4790a76cce3553.tar.gz libvpx-90271b22016b89a115206a38ab4790a76cce3553.tar.bz2 libvpx-90271b22016b89a115206a38ab4790a76cce3553.zip |
Add vpx_rc_status_t
Let callback functions in vpx_ext_ratectrl.h
return vpx_rc_status_t
Bug: webm:1707
Change-Id: I4ebed47278b228740f6c73b07aa472787b2617d2
Diffstat (limited to 'vpx')
-rw-r--r-- | vpx/vpx_ext_ratectrl.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vpx/vpx_ext_ratectrl.h b/vpx/vpx_ext_ratectrl.h index c99434457..2f4266096 100644 --- a/vpx/vpx_ext_ratectrl.h +++ b/vpx/vpx_ext_ratectrl.h @@ -39,6 +39,11 @@ typedef struct vpx_rc_encodeframe_result { int64_t pixel_count; } vpx_rc_encodeframe_result_t; +typedef enum vpx_rc_status { + vpx_rc_ok = 0, + vpx_rc_error = 1, +} vpx_rc_status_t; + // This is a mirror of vp9's FIRSTPASS_STATS // Only spatial_layer_id is omitted typedef struct vpx_rc_frame_stats { @@ -92,7 +97,7 @@ typedef struct vpx_rc_config { * \param[in] ratectrl_config Pointer to vpx_rc_config_t * \param[out] rate_ctrl_model_pt Pointer to vpx_rc_model_t */ -typedef int (*vpx_rc_create_model_cb_fn_t)( +typedef vpx_rc_status_t (*vpx_rc_create_model_cb_fn_t)( void *priv, const vpx_rc_config_t *ratectrl_config, vpx_rc_model_t *rate_ctrl_model_pt); @@ -105,7 +110,7 @@ typedef int (*vpx_rc_create_model_cb_fn_t)( * \param[in] rate_ctrl_model rate control model * \param[in] first_pass_stats first pass stats */ -typedef int (*vpx_rc_send_firstpass_stats_cb_fn_t)( +typedef vpx_rc_status_t (*vpx_rc_send_firstpass_stats_cb_fn_t)( vpx_rc_model_t rate_ctrl_model, const vpx_rc_firstpass_stats_t *first_pass_stats); @@ -118,7 +123,7 @@ typedef int (*vpx_rc_send_firstpass_stats_cb_fn_t)( * \param[in] encode_frame_info information of the coding frame * \param[out] frame_decision encode decision of the coding frame */ -typedef int (*vpx_rc_get_encodeframe_decision_cb_fn_t)( +typedef vpx_rc_status_t (*vpx_rc_get_encodeframe_decision_cb_fn_t)( vpx_rc_model_t rate_ctrl_model, const vpx_rc_encodeframe_info_t *encode_frame_info, vpx_rc_encodeframe_decision_t *frame_decision); @@ -131,7 +136,7 @@ typedef int (*vpx_rc_get_encodeframe_decision_cb_fn_t)( * \param[in] rate_ctrl_model rate control model * \param[out] encode_frame_result encode result of the coding frame */ -typedef int (*vpx_rc_update_encodeframe_result_cb_fn_t)( +typedef vpx_rc_status_t (*vpx_rc_update_encodeframe_result_cb_fn_t)( vpx_rc_model_t rate_ctrl_model, const vpx_rc_encodeframe_result_t *encode_frame_result); @@ -142,7 +147,8 @@ typedef int (*vpx_rc_update_encodeframe_result_cb_fn_t)( * * \param[in] rate_ctrl_model rate control model */ -typedef int (*vpx_rc_delete_model_cb_fn_t)(vpx_rc_model_t rate_ctrl_model); +typedef vpx_rc_status_t (*vpx_rc_delete_model_cb_fn_t)( + vpx_rc_model_t rate_ctrl_model); typedef struct vpx_rc_funcs { vpx_rc_create_model_cb_fn_t create_model; |