/*!\brief Current ABI version number * *\internal *IfthisfileisalteredinanywaythatchangestheABI,thisvalue *mustbebumped.Examplesinclude,butarenotlimitedto,changing *types,removingorreassigningenums,adding/removing/rearranging *fieldstostructures.
*/ #define VPX_EXT_RATECTRL_ABI_VERSION (7 + VPX_TPL_ABI_VERSION)
/*!\brief Corresponds to MAX_STATIC_GF_GROUP_LENGTH defined in vp9_ratectrl.h
*/ #define VPX_RC_MAX_STATIC_GF_GROUP_LENGTH 250
/*!\brief Max number of ref frames returned by the external RC. * *CorrespondstoMAX_REF_FRAMESdefinedinvp9_blockd.h.
*/ #define VPX_RC_MAX_REF_FRAMES 4
/*!\brief Name for the ref frames returned by the external RC. * *Correspondstotherefframesdefinedinvp9_blockd.h.
*/ typedefenum vpx_rc_ref_name {
VPX_RC_INVALID_REF_FRAME = -1,
VPX_RC_INTRA_FRAME = 0,
VPX_RC_LAST_FRAME = 1,
VPX_RC_GOLDEN_FRAME = 2,
VPX_RC_ALTREF_FRAME = 3,
} vpx_rc_ref_name_t;
/*!\brief Abstract rate control model handler * *Theencoderwillreceivethemodelhandlerfrom *vpx_rc_funcs_t::create_model().
*/ typedefvoid *vpx_rc_model_t;
/*!\brief A reserved value for the q index. *Iftheexternalratecontrolmodelreturnsthisvalue, *theencoderwillusethedefaultqselectedbylibvpx'sratecontrol *system.
*/ #define VPX_DEFAULT_Q -1
/*!\brief A reserved value for the rdmult. *Iftheexternalratecontrolmodelreturnsthisvalue, *theencoderwillusethedefaultrdmultselectedbylibvpx'sratecontrol *system.
*/ #define VPX_DEFAULT_RDMULT -1
/*!\brief Superblock quantization parameters *Storethesuperblockquantizationparameters
*/ typedefstruct sb_parameters { int q_index; /**< Quantizer step index [0..255]*/ int rdmult; /**< Superblock level Lagrangian multiplier*/
} sb_params;
/*!\brief Encode frame decision made by the external rate control model * *Theencoderwillreceivethedecisionfromtheexternalratecontrolmodel *throughvpx_rc_funcs_t::get_encodeframe_decision().
*/ typedefstruct vpx_rc_encodeframe_decision { int q_index; /**< Required: Quantizer step index [0..255]*/ int rdmult; /**< Required: Frame level Lagrangian multiplier*/ int delta_q_uv; /**< Required: Delta QP for UV */ /*! *Optional:Superblockquantizationparameters *Itiszeroinitializedbydefault.ItwillbesetforkeyandARFframes *butnotleafframes.
*/
sb_params *sb_params_list;
} vpx_rc_encodeframe_decision_t;
/*!\brief Information for the frame to be encoded. * *Theencoderwillsendtheinformationtoexternalratecontrolmodelthrough *vpx_rc_funcs_t::get_encodeframe_decision(). *
*/ typedefstruct vpx_rc_encodeframe_info { /*! *0:Keyframe *1:Interframe *2:Alternatereferenceframe *3:Overlayframe *4:Goldenframe
*/ int frame_type; int show_index; /**< display index, starts from zero*/ int coding_index; /**< coding index, starts from zero*/ /*! *indexofthecurrentframeinthisgroupofpicture,startsfromzero.
*/ int gop_index; int ref_frame_coding_indexes[3]; /**< three reference frames' coding indices*/ /*! *Thevalidityofthethreereferenceframes. *0:Invalid *1:Valid
*/ int ref_frame_valid_list[3]; /*! *ThelengthofthecurrentGOP.
*/ int gop_size; /*! *WhetherthecurrentGOPusesanaltref.
*/ int use_alt_ref;
} vpx_rc_encodeframe_info_t;
/*!\brief Frame coding result * *Theencoderwillsendtheresulttotheexternalratecontrolmodelthrough *vpx_rc_funcs_t::update_encodeframe_result().
*/ typedefstruct vpx_rc_encodeframe_result {
int64_t bit_count; /**< number of bits spent on coding the frame*/ int actual_encoding_qindex; /**< the actual qindex used to encode the frame*/
} vpx_rc_encodeframe_result_t;
/*!\brief Status returned by rate control callback functions.
*/ typedefenum vpx_rc_status {
VPX_RC_OK = 0,
VPX_RC_ERROR = 1,
} vpx_rc_status_t;
/*!\brief Collection of first pass frame stats
*/ typedefstruct vpx_rc_firstpass_stats { /*! *Pointertofirstpassframestats. *Thepointedarrayofvpx_rc_frame_stats_tshouldhavelengthequalto *numberofshowframesinthevideo.
*/
vpx_rc_frame_stats_t *frame_stats; /*! *Numberofshowframesinthevideo.
*/ int num_frames;
} vpx_rc_firstpass_stats_t;
/*!\brief Encode config sent to external rate control model
*/ typedefstruct vpx_rc_config { int frame_width; /**< frame width */ int frame_height; /**< frame height */ int show_frame_count; /**< number of visible frames in the video */ int max_gf_interval; /**< max GOP size in number of show frames */ int min_gf_interval; /**< min GOP size in number of show frames */ /*! *Targetbitrateinkilobytespersecond
*/ int target_bitrate_kbps; int frame_rate_num; /**< numerator of frame rate */ int frame_rate_den; /**< denominator of frame rate */ /*! *Thefollowingfieldsareonlyforexternalratecontrolmodelsthatsupport *differentratecontrolmodes.
*/
vpx_ext_rc_mode_t rc_mode; /**< Q mode or VBR mode */ int overshoot_percent; /**< for VBR mode only */ int undershoot_percent; /**< for VBR mode only */ int min_base_q_index; /**< for VBR mode only */ int max_base_q_index; /**< for VBR mode only */ int base_qp; /**< base QP for leaf frames, 0-255 */
} vpx_rc_config_t;
/*!\brief Control what ref frame to use and its index.
*/ typedefstruct vpx_rc_ref_frame { /*! *Refframeindex.Correspondingto|lst_fb_idx|,|gld_fb_idx|or *|alt_fb_idx|inVP9_COMPdependingontherefframe#name.
*/ int index[VPX_RC_MAX_REF_FRAMES]; /*! *Refframename.Thisdecideswhetherthe#indexisusedas *|lst_fb_idx|,|gld_fb_idx|or|alt_fb_idx|inVP9_COMP. *
*/
vpx_rc_ref_name_t name[VPX_RC_MAX_REF_FRAMES];
} vpx_rc_ref_frame_t;
/*!\brief The decision made by the external rate control model to set the *groupofpicture.
*/ typedefstruct vpx_rc_gop_decision { int gop_coding_frames; /**< The number of frames of this GOP */ int use_alt_ref; /**< Whether to use alt ref for this GOP */ int use_key_frame; /**< Whether to set key frame for this GOP */ /*! *FrametypeforeachframeinthisGOP. *Thiswillbepopulatedto|update_type|inGF_GROUPdefinedin *vp9_firstpass.h
*/
vpx_rc_frame_update_type_t update_type[VPX_RC_MAX_STATIC_GF_GROUP_LENGTH + 2]; /*! Ref frame buffer index to be updated for each frame in this GOP. */ int update_ref_index[VPX_RC_MAX_STATIC_GF_GROUP_LENGTH + 2]; /*! Ref frame list to be used for each frame in this GOP. */
vpx_rc_ref_frame_t ref_frame_list[VPX_RC_MAX_STATIC_GF_GROUP_LENGTH + 2];
} vpx_rc_gop_decision_t;
/*!\brief The decision made by the external rate control model to set the *keyframelocationandtheshowframecountinthekeyframegroup
*/ typedefstruct vpx_rc_key_frame_decision { int key_frame_show_index; /**< This key frame's show index in the video */ int key_frame_group_size; /**< Show frame count of this key frame group */
} vpx_rc_key_frame_decision_t;
/*!\brief Create an external rate control model callback prototype * *Thiscallbackisinvokedbytheencodertocreateanexternalratecontrol *model. * *\param[in]privCallback'sprivatedata *\param[in]ratectrl_configPointertovpx_rc_config_t *\param[out]rate_ctrl_model_ptrPointertovpx_rc_model_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_ptr);
/*!\brief Send first pass stats to the external rate control model callback *prototype * *Thiscallbackisinvokedbytheencodertosendfirstpassstatstothe *externalratecontrolmodel. * *\param[in]rate_ctrl_modelratecontrolmodel *\param[in]first_pass_statsfirstpassstats
*/ 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);
/*!\brief Send TPL stats for the current GOP to the external rate control model *callbackprototype * *ThiscallbackisinvokedbytheencodertosendTPLstatsfortheGOPtothe *externalratecontrolmodel. * *\param[in]rate_ctrl_modelratecontrolmodel *\param[in]tpl_gop_statsTPLstatsforcurrentGOP
*/ typedef vpx_rc_status_t (*vpx_rc_send_tpl_gop_stats_cb_fn_t)(
vpx_rc_model_t rate_ctrl_model, const VpxTplGopStats *tpl_gop_stats);
/*!\brief Get the key frame decision from the external rate control model. * *Thiscallbackisinvokedbytheencodertogetkeyframedecisionfrom *theexternalratecontrolmodel. * *\param[in]rate_ctrl_modelratecontrolmodel *\param[out]key_frame_decisionkeyframedecisionfromthemodel
*/ typedef vpx_rc_status_t (*vpx_rc_get_key_frame_decision_cb_fn_t)(
vpx_rc_model_t rate_ctrl_model,
vpx_rc_key_frame_decision_t *key_frame_decision);
/*!\brief Get the GOP structure from the external rate control model. * *ThiscallbackisinvokedbytheencodertogetGOPdecisionsfrom *theexternalratecontrolmodel. * *\param[in]rate_ctrl_modelratecontrolmodel *\param[out]gop_decisionGOPdecisionfromthemodel
*/ typedef vpx_rc_status_t (*vpx_rc_get_gop_decision_cb_fn_t)(
vpx_rc_model_t rate_ctrl_model, vpx_rc_gop_decision_t *gop_decision);
/*!\brief Get the frame rdmult from the external rate control model. * *Thiscallbackisinvokedbytheencodertogetrdmultfrom *theexternalratecontrolmodel. * *\param[in]rate_ctrl_modelratecontrolmodel *\param[in]frame_infoinformationcollectedfromtheencoder *\param[out]rdmultframerate-distortionmultiplierfromthemodel
*/ typedef vpx_rc_status_t (*vpx_rc_get_frame_rdmult_cb_fn_t)(
vpx_rc_model_t rate_ctrl_model, const vpx_rc_encodeframe_info_t *frame_info, int *rdmult);
/*!\brief Delete the external rate control model callback prototype * *Thiscallbackisinvokedbytheencodertodeletetheexternalratecontrol *model. * *\param[in]rate_ctrl_modelratecontrolmodel
*/ typedef vpx_rc_status_t (*vpx_rc_delete_model_cb_fn_t)(
vpx_rc_model_t rate_ctrl_model);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.