mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 11:31:07 +00:00
deps: update vpx to 1.14.0
This commit is contained in:
parent
ddd635722d
commit
6b5dd45bbf
8 changed files with 170 additions and 21 deletions
5
deps/vpx/include/vpx/vp8cx.h
vendored
5
deps/vpx/include/vpx/vp8cx.h
vendored
|
@ -166,6 +166,7 @@ enum vp8e_enc_control_id {
|
|||
*
|
||||
* \note Valid range for VP8: -16..16
|
||||
* \note Valid range for VP9: -9..9
|
||||
* \note A negative value (-n) is treated as its absolute value (n) in VP9.
|
||||
*
|
||||
* Supported in codecs: VP8, VP9
|
||||
*/
|
||||
|
@ -302,7 +303,7 @@ enum vp8e_enc_control_id {
|
|||
* the feature is off, i.e., no golden frame boost in CBR mode and
|
||||
* average bitrate target is used.
|
||||
*
|
||||
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
|
||||
* For example, to allow 100% more bits, i.e., 2X, in a golden frame
|
||||
* than average frame, set this to 100.
|
||||
*
|
||||
* Supported in codecs: VP9
|
||||
|
@ -598,7 +599,7 @@ enum vp8e_enc_control_id {
|
|||
* the feature is off, i.e., no golden frame boost in CBR mode and
|
||||
* average bitrate target is used.
|
||||
*
|
||||
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
|
||||
* For example, to allow 100% more bits, i.e., 2X, in a golden frame
|
||||
* than average frame, set this to 100.
|
||||
*
|
||||
* Supported in codecs: VP8
|
||||
|
|
16
deps/vpx/include/vpx/vpx_codec.h
vendored
16
deps/vpx/include/vpx/vpx_codec.h
vendored
|
@ -318,19 +318,21 @@ const char *vpx_codec_err_to_string(vpx_codec_err_t err);
|
|||
* \param[in] ctx Pointer to this instance's context.
|
||||
*
|
||||
*/
|
||||
const char *vpx_codec_error(vpx_codec_ctx_t *ctx);
|
||||
const char *vpx_codec_error(const vpx_codec_ctx_t *ctx);
|
||||
|
||||
/*!\brief Retrieve detailed error information for codec context
|
||||
*
|
||||
* Returns a human readable string providing detailed information about
|
||||
* the last error.
|
||||
* the last error. The returned string is only valid until the next
|
||||
* vpx_codec_* function call (except vpx_codec_error and
|
||||
* vpx_codec_error_detail) on the codec context.
|
||||
*
|
||||
* \param[in] ctx Pointer to this instance's context.
|
||||
*
|
||||
* \retval NULL
|
||||
* No detailed information is available.
|
||||
*/
|
||||
const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
|
||||
const char *vpx_codec_error_detail(const vpx_codec_ctx_t *ctx);
|
||||
|
||||
/* REQUIRED FUNCTIONS
|
||||
*
|
||||
|
@ -345,9 +347,11 @@ const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
|
|||
* \param[in] ctx Pointer to this instance's context
|
||||
*
|
||||
* \retval #VPX_CODEC_OK
|
||||
* The codec algorithm initialized.
|
||||
* \retval #VPX_CODEC_MEM_ERROR
|
||||
* Memory allocation failed.
|
||||
* The codec instance has been destroyed.
|
||||
* \retval #VPX_CODEC_INVALID_PARAM
|
||||
* ctx is a null pointer.
|
||||
* \retval #VPX_CODEC_ERROR
|
||||
* Codec context not initialized.
|
||||
*/
|
||||
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx);
|
||||
|
||||
|
|
2
deps/vpx/include/vpx/vpx_decoder.h
vendored
2
deps/vpx/include/vpx/vpx_decoder.h
vendored
|
@ -127,7 +127,7 @@ typedef struct vpx_codec_dec_cfg {
|
|||
* \param[in] ver ABI version number. Must be set to
|
||||
* VPX_DECODER_ABI_VERSION
|
||||
* \retval #VPX_CODEC_OK
|
||||
* The decoder algorithm initialized.
|
||||
* The decoder algorithm has been initialized.
|
||||
* \retval #VPX_CODEC_MEM_ERROR
|
||||
* Memory allocation failed.
|
||||
*/
|
||||
|
|
14
deps/vpx/include/vpx/vpx_encoder.h
vendored
14
deps/vpx/include/vpx/vpx_encoder.h
vendored
|
@ -31,6 +31,7 @@ extern "C" {
|
|||
|
||||
#include "./vpx_codec.h"
|
||||
#include "./vpx_ext_ratectrl.h"
|
||||
#include "./vpx_tpl.h"
|
||||
|
||||
/*! Temporal Scalability: Maximum length of the sequence defining frame
|
||||
* layer membership
|
||||
|
@ -57,9 +58,9 @@ extern "C" {
|
|||
* types, removing or reassigning enums, adding/removing/rearranging
|
||||
* fields to structures
|
||||
*/
|
||||
#define VPX_ENCODER_ABI_VERSION \
|
||||
(15 + VPX_CODEC_ABI_VERSION + \
|
||||
VPX_EXT_RATECTRL_ABI_VERSION) /**<\hideinitializer*/
|
||||
#define VPX_ENCODER_ABI_VERSION \
|
||||
(16 + VPX_CODEC_ABI_VERSION + VPX_EXT_RATECTRL_ABI_VERSION + \
|
||||
VPX_TPL_ABI_VERSION) /**<\hideinitializer*/
|
||||
|
||||
/*! \brief Encoder capabilities bitfield
|
||||
*
|
||||
|
@ -858,7 +859,7 @@ typedef struct vpx_svc_parameters {
|
|||
|
||||
/*!\brief Initialize an encoder instance
|
||||
*
|
||||
* Initializes a encoder context using the given interface. Applications
|
||||
* Initializes an encoder context using the given interface. Applications
|
||||
* should call the vpx_codec_enc_init convenience macro instead of this
|
||||
* function directly, to ensure that the ABI version number parameter
|
||||
* is properly initialized.
|
||||
|
@ -867,6 +868,9 @@ typedef struct vpx_svc_parameters {
|
|||
* is not thread safe and should be guarded with a lock if being used
|
||||
* in a multithreaded context.
|
||||
*
|
||||
* If vpx_codec_enc_init_ver() fails, it is not necessary to call
|
||||
* vpx_codec_destroy() on the encoder context.
|
||||
*
|
||||
* \param[in] ctx Pointer to this instance's context.
|
||||
* \param[in] iface Pointer to the algorithm interface to use.
|
||||
* \param[in] cfg Configuration to use, if known. May be NULL.
|
||||
|
@ -906,7 +910,7 @@ vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx,
|
|||
* \param[in] ver ABI version number. Must be set to
|
||||
* VPX_ENCODER_ABI_VERSION
|
||||
* \retval #VPX_CODEC_OK
|
||||
* The decoder algorithm initialized.
|
||||
* The encoder algorithm has been initialized.
|
||||
* \retval #VPX_CODEC_MEM_ERROR
|
||||
* Memory allocation failed.
|
||||
*/
|
||||
|
|
48
deps/vpx/include/vpx/vpx_ext_ratectrl.h
vendored
48
deps/vpx/include/vpx/vpx_ext_ratectrl.h
vendored
|
@ -16,6 +16,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "./vpx_integer.h"
|
||||
#include "./vpx_tpl.h"
|
||||
|
||||
/*!\brief Current ABI version number
|
||||
*
|
||||
|
@ -25,7 +26,7 @@ extern "C" {
|
|||
* types, removing or reassigning enums, adding/removing/rearranging
|
||||
* fields to structures.
|
||||
*/
|
||||
#define VPX_EXT_RATECTRL_ABI_VERSION (6)
|
||||
#define VPX_EXT_RATECTRL_ABI_VERSION (7)
|
||||
|
||||
/*!\brief The control type of the inference API.
|
||||
* In VPX_RC_QP mode, the external rate control model determines the
|
||||
|
@ -47,6 +48,14 @@ typedef enum vpx_rc_type {
|
|||
VPX_RC_GOP_QP_RDMULT = VPX_RC_QP | VPX_RC_GOP | VPX_RC_RDMULT
|
||||
} vpx_rc_type_t;
|
||||
|
||||
/*!\brief The rate control mode for the external rate control model.
|
||||
*/
|
||||
typedef enum vpx_ext_rc_mode {
|
||||
VPX_RC_QMODE = 0,
|
||||
VPX_RC_VBR = 1,
|
||||
VPX_RC_CQ = 2,
|
||||
} vpx_ext_rc_mode_t;
|
||||
|
||||
/*!\brief Abstract rate control model handler
|
||||
*
|
||||
* The encoder will receive the model handler from create_model() defined in
|
||||
|
@ -271,6 +280,10 @@ typedef struct vpx_rc_frame_stats {
|
|||
* number of frames whose stats are accumulated.
|
||||
*/
|
||||
double count;
|
||||
/*!
|
||||
* Number of new mv in a frame.
|
||||
*/
|
||||
double new_mv_count;
|
||||
} vpx_rc_frame_stats_t;
|
||||
|
||||
/*!\brief Collection of first pass frame stats
|
||||
|
@ -294,12 +307,21 @@ typedef struct 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 */
|
||||
/*!
|
||||
* Target bitrate in kilobytes per second
|
||||
*/
|
||||
int target_bitrate_kbps;
|
||||
int frame_rate_num; /**< numerator of frame rate */
|
||||
int frame_rate_den; /**< denominator of frame rate */
|
||||
/*!
|
||||
* The following fields are only for external rate control models that support
|
||||
* different rate control modes.
|
||||
*/
|
||||
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 */
|
||||
} vpx_rc_config_t;
|
||||
|
||||
/*!\brief Information passed to the external rate control model to
|
||||
|
@ -385,13 +407,13 @@ typedef struct vpx_rc_gop_decision {
|
|||
* This callback is invoked by the encoder to create an external rate control
|
||||
* model.
|
||||
*
|
||||
* \param[in] priv Callback's private data
|
||||
* \param[in] ratectrl_config Pointer to vpx_rc_config_t
|
||||
* \param[out] rate_ctrl_model_pt Pointer to vpx_rc_model_t
|
||||
* \param[in] priv Callback's private data
|
||||
* \param[in] ratectrl_config Pointer to vpx_rc_config_t
|
||||
* \param[out] rate_ctrl_model_ptr Pointer to vpx_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_pt);
|
||||
vpx_rc_model_t *rate_ctrl_model_ptr);
|
||||
|
||||
/*!\brief Send first pass stats to the external rate control model callback
|
||||
* prototype
|
||||
|
@ -406,6 +428,18 @@ 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
|
||||
* callback prototype
|
||||
*
|
||||
* This callback is invoked by the encoder to send TPL stats for the GOP to the
|
||||
* external rate control model.
|
||||
*
|
||||
* \param[in] rate_ctrl_model rate control model
|
||||
* \param[in] tpl_gop_stats TPL stats for current GOP
|
||||
*/
|
||||
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 Receive encode frame decision callback prototype
|
||||
*
|
||||
* This callback is invoked by the encoder to receive encode frame decision from
|
||||
|
@ -487,6 +521,10 @@ typedef struct vpx_rc_funcs {
|
|||
* Send first pass stats to the external rate control model.
|
||||
*/
|
||||
vpx_rc_send_firstpass_stats_cb_fn_t send_firstpass_stats;
|
||||
/*!
|
||||
* Send TPL stats for current GOP to the external rate control model.
|
||||
*/
|
||||
vpx_rc_send_tpl_gop_stats_cb_fn_t send_tpl_gop_stats;
|
||||
/*!
|
||||
* Get encodeframe decision from the external rate control model.
|
||||
*/
|
||||
|
|
102
deps/vpx/include/vpx/vpx_tpl.h
vendored
Normal file
102
deps/vpx/include/vpx/vpx_tpl.h
vendored
Normal file
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
/*!\file
|
||||
* \brief Describes the TPL stats descriptor and associated operations
|
||||
*
|
||||
*/
|
||||
#ifndef VPX_VPX_VPX_TPL_H_
|
||||
#define VPX_VPX_VPX_TPL_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "./vpx_integer.h"
|
||||
#include "./vpx_codec.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!\brief Current ABI version number
|
||||
*
|
||||
* \internal
|
||||
* If this file is altered in any way that changes the ABI, this value
|
||||
* must be bumped. Examples include, but are not limited to, changing
|
||||
* types, removing or reassigning enums, adding/removing/rearranging
|
||||
* fields to structures
|
||||
*/
|
||||
#define VPX_TPL_ABI_VERSION (2) /**<\hideinitializer*/
|
||||
|
||||
/*!\brief Temporal dependency model stats for each block before propagation */
|
||||
typedef struct VpxTplBlockStats {
|
||||
int16_t row; /**< Pixel row of the top left corner */
|
||||
int16_t col; /**< Pixel col of the top left corner */
|
||||
int64_t intra_cost; /**< Intra cost */
|
||||
int64_t inter_cost; /**< Inter cost */
|
||||
int16_t mv_r; /**< Motion vector row */
|
||||
int16_t mv_c; /**< Motion vector col */
|
||||
int64_t recrf_rate; /**< Rate from reconstructed ref frame */
|
||||
int64_t recrf_dist; /**< Distortion from reconstructed ref frame */
|
||||
int ref_frame_index; /**< Ref frame index in the ref frame buffer */
|
||||
} VpxTplBlockStats;
|
||||
|
||||
/*!\brief Temporal dependency model stats for each frame before propagation */
|
||||
typedef struct VpxTplFrameStats {
|
||||
int frame_width; /**< Frame width */
|
||||
int frame_height; /**< Frame height */
|
||||
int num_blocks; /**< Number of blocks. Size of block_stats_list */
|
||||
VpxTplBlockStats *block_stats_list; /**< List of tpl stats for each block */
|
||||
} VpxTplFrameStats;
|
||||
|
||||
/*!\brief Temporal dependency model stats for each GOP before propagation */
|
||||
typedef struct VpxTplGopStats {
|
||||
int size; /**< GOP size, also the size of frame_stats_list. */
|
||||
VpxTplFrameStats *frame_stats_list; /**< List of tpl stats for each frame */
|
||||
} VpxTplGopStats;
|
||||
|
||||
/*!\brief Write VpxTplGopStats to file
|
||||
*
|
||||
* Accepts an opened file handle and writes \p tpl_gop_stats.
|
||||
*
|
||||
* \param[in] tpl_file A FILE pointer that's already been opened.
|
||||
* \param[in] tpl_gop_stats VpxTplGopStats that contains TPL stats for the
|
||||
* whole GOP.
|
||||
*
|
||||
* \return VPX_CODEC_OK if TPL stats are successfully written.
|
||||
*/
|
||||
vpx_codec_err_t vpx_write_tpl_gop_stats(FILE *tpl_file,
|
||||
const VpxTplGopStats *tpl_gop_stats);
|
||||
|
||||
/*!\brief Read VpxTplGopStats from file
|
||||
*
|
||||
* Accepts an opened file handle and reads TPL stats and stores them into
|
||||
* \p tpl_gop_stats. Allocates memory for TPL stats.
|
||||
*
|
||||
* \param[in] tpl_file A FILE pointer that's already been opened.
|
||||
* \param[out] tpl_gop_stats VpxTplGopStats that contains TPL stats for the
|
||||
* whole GOP.
|
||||
*
|
||||
* \return VPX_CODEC_OK if TPL stats are successfully read from file.
|
||||
*/
|
||||
vpx_codec_err_t vpx_read_tpl_gop_stats(FILE *tpl_file,
|
||||
VpxTplGopStats *tpl_gop_stats);
|
||||
|
||||
/*!\brief Free the memory allocated for VpxTplGopStats
|
||||
*
|
||||
* \param[in] tpl_gop_stats VpxTplGopStats that contains TPL stats for the
|
||||
* whole GOP.
|
||||
*/
|
||||
void vpx_free_tpl_gop_stats(VpxTplGopStats *tpl_gop_stats);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VPX_VPX_TPL_H_
|
BIN
deps/vpx/lib/libvpx.a
vendored
BIN
deps/vpx/lib/libvpx.a
vendored
Binary file not shown.
4
deps/vpx/lib/pkgconfig/vpx.pc
vendored
4
deps/vpx/lib/pkgconfig/vpx.pc
vendored
|
@ -1,4 +1,4 @@
|
|||
# pkg-config file from libvpx v1.13.1
|
||||
# pkg-config file from libvpx v1.14.0
|
||||
prefix=
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
|
@ -6,7 +6,7 @@ includedir=${prefix}/include
|
|||
|
||||
Name: vpx
|
||||
Description: WebM Project VPx codec implementation
|
||||
Version: 1.13.1
|
||||
Version: 1.14.0
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lvpx -lm
|
||||
|
|
Loading…
Reference in a new issue