update vpx to 1.11.0

This commit is contained in:
alexey.lysiuk 2021-10-30 16:27:40 +03:00
parent c36b5d81bb
commit bbd152e543
5 changed files with 194 additions and 9 deletions

View file

@ -712,6 +712,36 @@ enum vp8e_enc_control_id {
* Supported in codecs: VP9
*/
VP9E_SET_EXTERNAL_RATE_CONTROL,
/*!\brief Codec control to disable internal features in rate control.
*
* This will do 3 things, only for 1 pass:
* - Turn off low motion computation
* - Turn off gf update constraint on key frame frequency
* - Turn off content mode for cyclic refresh
*
* With those, the rate control is expected to work exactly the same as the
* interface provided in ratectrl_rtc.cc/h
*
* Supported in codecs: VP9
*/
VP9E_SET_RTC_EXTERNAL_RATECTRL,
/*!\brief Codec control function to get loopfilter level in the encoder.
*
* Supported in codecs: VP9
*/
VP9E_GET_LOOPFILTER_LEVEL,
/*!\brief Codec control to get last quantizers for all spatial layers.
*
* Return value uses an array of internal quantizers scale defined by the
* codec, for all spatial layers.
* The size of the array passed in should be #VPX_SS_MAX_LAYERS.
*
* Supported in codecs: VP9
*/
VP9E_GET_LAST_QUANTIZER_SVC_LAYERS,
};
/*!\brief vpx 1-D scaling mode
@ -969,6 +999,9 @@ VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
#define VPX_CTRL_VP8E_GET_LAST_QUANTIZER
VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
#define VPX_CTRL_VP8E_GET_LAST_QUANTIZER_64
VPX_CTRL_USE_TYPE(VP9E_GET_LAST_QUANTIZER_SVC_LAYERS, int *)
#define VPX_CTRL_VP9E_GET_LAST_QUANTIZER_SVC_LAYERS
VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *)
#define VPX_CTRL_VP9E_GET_SVC_LAYER_ID
@ -1037,6 +1070,9 @@ VPX_CTRL_USE_TYPE(VP9E_SET_ROW_MT, unsigned int)
VPX_CTRL_USE_TYPE(VP9E_GET_LEVEL, int *)
#define VPX_CTRL_VP9E_GET_LEVEL
VPX_CTRL_USE_TYPE(VP9E_GET_LOOPFILTER_LEVEL, int *)
#define VPX_CTRL_VP9E_GET_LOOPFILTER_LEVEL
VPX_CTRL_USE_TYPE(VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int)
#define VPX_CTRL_VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST
@ -1068,6 +1104,9 @@ VPX_CTRL_USE_TYPE(VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, int)
VPX_CTRL_USE_TYPE(VP9E_SET_DISABLE_LOOPFILTER, int)
#define VPX_CTRL_VP9E_SET_DISABLE_LOOPFILTER
VPX_CTRL_USE_TYPE(VP9E_SET_RTC_EXTERNAL_RATECTRL, int)
#define VPX_CTRL_VP9E_SET_RTC_EXTERNAL_RATECTRL
VPX_CTRL_USE_TYPE(VP9E_SET_EXTERNAL_RATE_CONTROL, vpx_rc_funcs_t *)
#define VPX_CTRL_VP9E_SET_EXTERNAL_RATE_CONTROL

View file

@ -58,7 +58,7 @@ extern "C" {
* fields to structures
*/
#define VPX_ENCODER_ABI_VERSION \
(14 + VPX_CODEC_ABI_VERSION + \
(15 + VPX_CODEC_ABI_VERSION + \
VPX_EXT_RATECTRL_ABI_VERSION) /**<\hideinitializer*/
/*! \brief Encoder capabilities bitfield
@ -457,7 +457,7 @@ typedef struct vpx_codec_enc_cfg {
/*!\brief Target data rate
*
* Target bandwidth to use for this stream, in kilobits per second.
* Target bitrate to use for this stream, in kilobits per second.
*/
unsigned int rc_target_bitrate;
@ -498,7 +498,7 @@ typedef struct vpx_codec_enc_cfg {
* undershoot level (current rate vs target) beyond which more aggressive
* corrective measures are taken.
* *
* Valid values in the range VP8:0-1000 VP9: 0-100.
* Valid values in the range VP8:0-100 VP9: 0-100.
*/
unsigned int rc_undershoot_pct;
@ -513,7 +513,7 @@ typedef struct vpx_codec_enc_cfg {
* overshoot level (current rate vs target) beyond which more aggressive
* corrective measures are taken.
*
* Valid values in the range VP8:0-1000 VP9: 0-100.
* Valid values in the range VP8:0-100 VP9: 0-100.
*/
unsigned int rc_overshoot_pct;
@ -693,6 +693,151 @@ typedef struct vpx_codec_enc_cfg {
*
*/
int temporal_layering_mode;
/*!\brief A flag indicating whether to use external rate control parameters.
* By default is 0. If set to 1, the following parameters will be used in the
* rate control system.
*/
int use_vizier_rc_params;
/*!\brief Active worst quality factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t active_wq_factor;
/*!\brief Error per macroblock adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t err_per_mb_factor;
/*!\brief Second reference default decay limit.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t sr_default_decay_limit;
/*!\brief Second reference difference factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t sr_diff_factor;
/*!\brief Keyframe error per macroblock adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t kf_err_per_mb_factor;
/*!\brief Keyframe minimum boost adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t kf_frame_min_boost_factor;
/*!\brief Keyframe maximum boost adjustment factor, for the first keyframe
* in a chunk.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t kf_frame_max_boost_first_factor;
/*!\brief Keyframe maximum boost adjustment factor, for subsequent keyframes.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t kf_frame_max_boost_subs_factor;
/*!\brief Keyframe maximum total boost adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t kf_max_total_boost_factor;
/*!\brief Golden frame maximum total boost adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t gf_max_total_boost_factor;
/*!\brief Golden frame maximum boost adjustment factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t gf_frame_max_boost_factor;
/*!\brief Zero motion power factor.
*
* Rate control parameters, set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t zm_factor;
/*!\brief Rate-distortion multiplier for inter frames.
* The multiplier is a crucial parameter in the calculation of rate distortion
* cost. It is often related to the qp (qindex) value.
* Rate control parameters, could be set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t rd_mult_inter_qp_fac;
/*!\brief Rate-distortion multiplier for alt-ref frames.
* The multiplier is a crucial parameter in the calculation of rate distortion
* cost. It is often related to the qp (qindex) value.
* Rate control parameters, could be set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t rd_mult_arf_qp_fac;
/*!\brief Rate-distortion multiplier for key frames.
* The multiplier is a crucial parameter in the calculation of rate distortion
* cost. It is often related to the qp (qindex) value.
* Rate control parameters, could be set from external experiment results.
* Only when |use_vizier_rc_params| is set to 1, the pass in value will be
* used. Otherwise, the default value is used.
*
*/
vpx_rational_t rd_mult_key_qp_fac;
} vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */
/*!\brief vp9 svc extra configure parameters

View file

@ -171,7 +171,8 @@ vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w,
/*!\brief Set the rectangle identifying the displayed portion of the image
*
* Updates the displayed rectangle (aka viewport) on the image surface to
* match the specified coordinates and size.
* match the specified coordinates and size. Specifically, sets img->d_w,
* img->d_h, and elements of the img->planes[] array.
*
* \param[in] img Image descriptor
* \param[in] x leftmost column
@ -179,7 +180,7 @@ vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w,
* \param[in] w width
* \param[in] h height
*
* \return 0 if the requested rectangle is valid, nonzero otherwise.
* \return 0 if the requested rectangle is valid, nonzero (-1) otherwise.
*/
int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y,
unsigned int w, unsigned int h);

BIN
deps/vpx/lib/libvpx.a vendored

Binary file not shown.

View file

@ -1,12 +1,12 @@
# pkg-config file from libvpx v1.10.0
# pkg-config file from libvpx v1.11.0
prefix=
exec_prefix=${prefix}
libdir=${prefix}/lib
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: vpx
Description: WebM Project VPx codec implementation
Version: 1.10.0
Version: 1.11.0
Requires:
Conflicts:
Libs: -L${libdir} -lvpx -lm