Skip to content

Commit

Permalink
deps: update vpx to 1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Nov 7, 2024
1 parent cb98e5f commit 1927ed7
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 168 deletions.
10 changes: 10 additions & 0 deletions deps/vpx/include/vpx/vp8cx.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,14 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_TPL,

/*!\brief Codec control function to enable key frame temporal filtering.
*
* Vp9 allows the encoder to run key frame temporal filtering and use it to
* improve the compression performance. To enable, set this parameter to be
* 1. The default value is set to be 0.
*/
VP9E_SET_KEY_FRAME_FILTERING,

/*!\brief Codec control function to enable postencode frame drop.
*
* This will allow encoder to drop frame after it's encoded.
Expand Down Expand Up @@ -1078,6 +1086,8 @@ VPX_CTRL_USE_TYPE(VP9E_SET_SVC_SPATIAL_LAYER_SYNC,
#define VPX_CTRL_VP9E_SET_SVC_SPATIAL_LAYER_SYNC
VPX_CTRL_USE_TYPE(VP9E_SET_TPL, int)
#define VPX_CTRL_VP9E_SET_TPL
VPX_CTRL_USE_TYPE(VP9E_SET_KEY_FRAME_FILTERING, int)
#define VPX_CTRL_VP9E_SET_KEY_FRAME_FILTERING
VPX_CTRL_USE_TYPE(VP9E_SET_POSTENCODE_DROP, unsigned int)
#define VPX_CTRL_VP9E_SET_POSTENCODE_DROP
VPX_CTRL_USE_TYPE(VP9E_SET_DELTA_Q_UV, int)
Expand Down
4 changes: 2 additions & 2 deletions deps/vpx/include/vpx/vpx_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {

/*!\brief Decorator indicating a function is deprecated */
#ifndef VPX_DEPRECATED
#if defined(__GNUC__) && __GNUC__
#if defined(__GNUC__)
#define VPX_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define VPX_DEPRECATED
Expand All @@ -60,7 +60,7 @@ extern "C" {
#endif /* VPX_DEPRECATED */

#ifndef VPX_DECLSPEC_DEPRECATED
#if defined(__GNUC__) && __GNUC__
#if defined(__GNUC__)
#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
#elif defined(_MSC_VER)
/*!\brief \copydoc #VPX_DEPRECATED */
Expand Down
8 changes: 5 additions & 3 deletions deps/vpx/include/vpx/vpx_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
extern "C" {
#endif

#include "./vpx_codec.h"
#include "./vpx_codec.h" // IWYU pragma: export
#include "./vpx_frame_buffer.h"

/*!\brief Current ABI version number
Expand Down Expand Up @@ -152,7 +152,7 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
* \param[in] iface Pointer to the algorithm interface
* \param[in] data Pointer to a block of data to parse
* \param[in] data_sz Size of the data buffer
* \param[in,out] si Pointer to stream info to update. The size member
* \param[in,out] si Pointer to stream info to update. The sz member
* \ref MUST be properly initialized, but \ref MAY be
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
Expand All @@ -170,7 +170,7 @@ vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
* Returns information about the stream that has been parsed during decoding.
*
* \param[in] ctx Pointer to this instance's context
* \param[in,out] si Pointer to stream info to update. The size member
* \param[in,out] si Pointer to stream info to update. The sz member
* \ref MUST be properly initialized, but \ref MAY be
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
Expand Down Expand Up @@ -205,6 +205,8 @@ vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
* this frame.
* \param[in] deadline Soft deadline the decoder should attempt to meet,
* in us. Set to zero for unlimited.
* NOTE: The deadline parameter is ignored. Always
* pass 0.
*
* \return Returns #VPX_CODEC_OK if the coded data was processed completely
* and future pictures can be decoded without error. Otherwise,
Expand Down
38 changes: 29 additions & 9 deletions deps/vpx/include/vpx/vpx_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
extern "C" {
#endif

#include "./vpx_codec.h"
#include "./vpx_codec.h" // IWYU pragma: export
#include "./vpx_ext_ratectrl.h"
#include "./vpx_tpl.h"

/*! Temporal Scalability: Maximum length of the sequence defining frame
* layer membership
Expand All @@ -57,10 +56,15 @@ extern "C" {
* must be bumped. Examples include, but are not limited to, changing
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*
* \note
* VPX_ENCODER_ABI_VERSION has a VPX_EXT_RATECTRL_ABI_VERSION component
* because the VP9E_SET_EXTERNAL_RATE_CONTROL codec control uses
* vpx_rc_funcs_t.
*/
#define VPX_ENCODER_ABI_VERSION \
(16 + VPX_CODEC_ABI_VERSION + VPX_EXT_RATECTRL_ABI_VERSION + \
VPX_TPL_ABI_VERSION) /**<\hideinitializer*/
#define VPX_ENCODER_ABI_VERSION \
(18 + VPX_CODEC_ABI_VERSION + \
VPX_EXT_RATECTRL_ABI_VERSION) /**<\hideinitializer*/

/*! \brief Encoder capabilities bitfield
*
Expand Down Expand Up @@ -460,6 +464,8 @@ typedef struct vpx_codec_enc_cfg {
/*!\brief Target data rate
*
* Target bitrate to use for this stream, in kilobits per second.
* Internally capped to the smaller of the uncompressed bitrate and
* 1000000 kilobits per second.
*/
unsigned int rc_target_bitrate;

Expand Down Expand Up @@ -988,12 +994,18 @@ vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx,
*/
vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx);

/*!\brief Encode Deadline
*
* This type indicates a deadline, in microseconds, to be passed to
* vpx_codec_encode().
*/
typedef unsigned long vpx_enc_deadline_t;
/*!\brief deadline parameter analogous to VPx REALTIME mode. */
#define VPX_DL_REALTIME (1)
#define VPX_DL_REALTIME 1ul
/*!\brief deadline parameter analogous to VPx GOOD QUALITY mode. */
#define VPX_DL_GOOD_QUALITY (1000000)
#define VPX_DL_GOOD_QUALITY 1000000ul
/*!\brief deadline parameter analogous to VPx BEST QUALITY mode. */
#define VPX_DL_BEST_QUALITY (0)
#define VPX_DL_BEST_QUALITY 0ul
/*!\brief Encode a frame
*
* Encodes a video frame at the given "presentation time." The presentation
Expand All @@ -1018,6 +1030,8 @@ vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx);
*
* \param[in] ctx Pointer to this instance's context
* \param[in] img Image data to encode, NULL to flush.
* Encoding sample values outside the range
* [0..(1<<img->bit_depth)-1] is undefined behavior.
* \param[in] pts Presentation time stamp, in timebase units.
* \param[in] duration Duration to show frame, in timebase units.
* \param[in] flags Flags to use for encoding this frame.
Expand All @@ -1033,7 +1047,7 @@ vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx);
vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img,
vpx_codec_pts_t pts, unsigned long duration,
vpx_enc_frame_flags_t flags,
unsigned long deadline);
vpx_enc_deadline_t deadline);

/*!\brief Set compressed data output buffer
*
Expand Down Expand Up @@ -1077,6 +1091,12 @@ vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img,
* The buffer was set successfully.
* \retval #VPX_CODEC_INVALID_PARAM
* A parameter was NULL, the image format is unsupported, etc.
*
* \note
* `duration` and `deadline` are of the unsigned long type, which can be 32
* or 64 bits. `duration` and `deadline` must be less than or equal to
* UINT32_MAX so that their ranges are independent of the size of unsigned
* long.
*/
vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx,
const vpx_fixed_buf_t *buf,
Expand Down
Loading

0 comments on commit 1927ed7

Please sign in to comment.