Deps: Update bundled ffmpeg headers to 9.0

This commit is contained in:
Stenzek
2026-08-06 18:22:55 +10:00
parent d6d8a7be19
commit e86af51c8e
32 changed files with 701 additions and 384 deletions
+1 -1
View File
@@ -1 +1 @@
8.1
9.0
+15 -49
View File
@@ -353,6 +353,10 @@ typedef struct RcOverride{
* Discard cropping information from SPS.
*/
#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
/**
* Force audio encoders to use a fixed frame size.
*/
#define AV_CODEC_FLAG2_FIXED_FRAME_SIZE (1 << 17)
/**
* Show all frames before the first keyframe
@@ -1050,18 +1054,20 @@ typedef struct AVCodecContext {
*/
AVChannelLayout ch_layout;
/* The following data should not be initialized. */
/**
* Number of samples per channel in an audio frame.
*
* - encoding: set by libavcodec in avcodec_open2(). Each submitted frame
* - encoding: may be set by the user before calling avcodec_open2(), and
* libavcodec may then overwrite it if needed. Each submitted frame
* except the last must contain exactly frame_size samples per channel.
* May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the
* May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, except
* when AV_CODEC_FLAG2_FIXED_FRAME_SIZE is requested, then the
* frame size is not restricted.
* - decoding: may be set by some decoders to indicate constant frame size
*/
int frame_size;
/* The following data should not be initialized. */
/**
* number of bytes per packet if constant and known or 0
* Used by some WAV based audio codecs.
@@ -1639,19 +1645,6 @@ typedef struct AVCodecContext {
*/
int level;
#if FF_API_CODEC_PROPS
/**
* Properties of the stream that gets decoded
* - encoding: unused
* - decoding: set by libavcodec
*/
attribute_deprecated
unsigned properties;
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
#endif
/**
* Skip loop filtering for selected frames.
* - encoding: unused
@@ -2158,6 +2151,8 @@ const AVClass *avcodec_get_subtitle_rect_class(void);
* of the corresponding fields in codec.
*
* @return >= 0 on success, a negative AVERROR code on failure
*
* @relates AVCodecParameters
*/
int avcodec_parameters_from_context(struct AVCodecParameters *par,
const AVCodecContext *codec);
@@ -2169,6 +2164,8 @@ int avcodec_parameters_from_context(struct AVCodecParameters *par,
* Fields in codec that do not have a counterpart in par are not touched.
*
* @return >= 0 on success, a negative AVERROR code on failure.
*
* @relates AVCodecParameters
*/
int avcodec_parameters_to_context(AVCodecContext *codec,
const struct AVCodecParameters *par);
@@ -2410,7 +2407,8 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
* For audio:
* If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame
* can have any number of samples.
* If it is not set, frame->nb_samples must be equal to
* If it is not set, or AV_CODEC_FLAG2_FIXED_FRAME_SIZE was
* requested, then frame->nb_samples must be equal to
* avctx->frame_size for all frames except the last.
* The final frame may be smaller than avctx->frame_size.
* @retval 0 success
@@ -2750,35 +2748,7 @@ typedef struct AVCodecParserContext {
} AVCodecParserContext;
typedef struct AVCodecParser {
#if FF_API_PARSER_CODECID
int codec_ids[7]; /* several codec IDs are permitted */
#else
enum AVCodecID codec_ids[7]; /* several codec IDs are permitted */
#endif
#if FF_API_PARSER_PRIVATE
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavcodec and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/
attribute_deprecated
int priv_data_size;
attribute_deprecated
int (*parser_init)(AVCodecParserContext *s);
/* This callback never returns an error, a negative value means that
* the frame start was in a previous packet. */
attribute_deprecated
int (*parser_parse)(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size);
attribute_deprecated
void (*parser_close)(AVCodecParserContext *s);
attribute_deprecated
int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
#endif
} AVCodecParser;
/**
@@ -2792,11 +2762,7 @@ typedef struct AVCodecParser {
*/
const AVCodecParser *av_parser_iterate(void **opaque);
#if FF_API_PARSER_CODECID
AVCodecParserContext *av_parser_init(int codec_id);
#else
AVCodecParserContext *av_parser_init(enum AVCodecID codec_id);
#endif
/**
* Parse a packet.
+3
View File
@@ -19,6 +19,9 @@
#ifndef AVCODEC_AVDCT_H
#define AVCODEC_AVDCT_H
#include <stddef.h>
#include <stdint.h>
#include "libavutil/opt.h"
/**
-22
View File
@@ -27,11 +27,8 @@
#include "libavutil/hwcontext.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavutil/samplefmt.h"
#include "libavcodec/codec_id.h"
#include "libavcodec/version_major.h"
/**
* @addtogroup lavc_core
@@ -191,18 +188,6 @@ typedef struct AVCodec {
int capabilities;
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
/**
* Deprecated codec capabilities.
*/
attribute_deprecated
const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config()
const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}
@@ -217,13 +202,6 @@ typedef struct AVCodec {
* (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>").
*/
const char *wrapper_name;
/**
* Array of supported channel layouts, terminated with a zeroed layout.
* @deprecated use avcodec_get_supported_config()
*/
attribute_deprecated
const AVChannelLayout *ch_layouts;
} AVCodec;
/**
+2 -9
View File
@@ -24,8 +24,6 @@
#include "libavutil/avutil.h"
#include "libavutil/samplefmt.h"
#include "version_major.h"
/**
* @addtogroup lavc_core
* @{
@@ -206,9 +204,6 @@ enum AVCodecID {
AV_CODEC_ID_BMV_VIDEO,
AV_CODEC_ID_VBLE,
AV_CODEC_ID_DXTORY,
#if FF_API_V408_CODECID
AV_CODEC_ID_V410,
#endif
AV_CODEC_ID_XWD,
AV_CODEC_ID_CDXL,
AV_CODEC_ID_XBM,
@@ -256,10 +251,6 @@ enum AVCodecID {
AV_CODEC_ID_012V,
AV_CODEC_ID_AVUI,
AV_CODEC_ID_TARGA_Y216,
#if FF_API_V408_CODECID
AV_CODEC_ID_V308,
AV_CODEC_ID_V408,
#endif
AV_CODEC_ID_YUV4,
AV_CODEC_ID_AVRN,
AV_CODEC_ID_CPIA,
@@ -332,6 +323,7 @@ enum AVCodecID {
AV_CODEC_ID_APV,
AV_CODEC_ID_PRORES_RAW,
AV_CODEC_ID_JPEGXS,
AV_CODEC_ID_WEBP_ANIM,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@@ -566,6 +558,7 @@ enum AVCodecID {
AV_CODEC_ID_LC3,
AV_CODEC_ID_G728,
AV_CODEC_ID_AHX,
AV_CODEC_ID_APPLE_APAC,
/* subtitle codecs */
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
+95 -46
View File
@@ -33,16 +33,18 @@
#include "packet.h"
/**
* @addtogroup lavc_core
* @defgroup lavc_codec_params Codec parameters
* @ingroup lavc_core
* @{
*/
/**
* This struct describes the properties of an encoded stream.
*
* sizeof(AVCodecParameters) is not a part of the public ABI, this struct must
* be allocated with avcodec_parameters_alloc() and freed with
* avcodec_parameters_free().
* @note
* The `sizeof(AVCodecParameters)` is not a part of the public ABI,
* therefore this struct must be allocated with ::avcodec_parameters_alloc()
* and freed with ::avcodec_parameters_free().
*/
typedef struct AVCodecParameters {
/**
@@ -61,9 +63,9 @@ typedef struct AVCodecParameters {
/**
* Extra binary data needed for initializing the decoder, codec-dependent.
*
* Must be allocated with av_malloc() and will be freed by
* avcodec_parameters_free(). The allocated size of extradata must be at
* least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding
* Must be allocated with ::av_malloc() and will be freed by
* ::avcodec_parameters_free(). The allocated size of extradata must be at
* least #extradata_size + ::AV_INPUT_BUFFER_PADDING_SIZE, with the padding
* bytes zeroed.
*/
uint8_t *extradata;
@@ -75,19 +77,19 @@ typedef struct AVCodecParameters {
/**
* Additional data associated with the entire stream.
*
* Should be allocated with av_packet_side_data_new() or
* av_packet_side_data_add(), and will be freed by avcodec_parameters_free().
* Should be allocated with ::av_packet_side_data_new() or
* ::av_packet_side_data_add(), and will be freed by ::avcodec_parameters_free().
*/
AVPacketSideData *coded_side_data;
/**
* Amount of entries in @ref coded_side_data.
* Amount of entries in #coded_side_data.
*/
int nb_coded_side_data;
/**
* - video: the pixel format, the value corresponds to enum AVPixelFormat.
* - audio: the sample format, the value corresponds to enum AVSampleFormat.
* - Video: the pixel format, the value corresponds to enum ::AVPixelFormat.
* - Audio: the sample format, the value corresponds to enum ::AVSampleFormat.
*/
int format;
@@ -103,22 +105,27 @@ typedef struct AVCodecParameters {
* formats to actually decode them. It's the number of bits for one sample in
* the actual coded bitstream.
*
* This could be for example 4 for ADPCM
* For PCM formats this matches bits_per_raw_sample
* Can be 0
* This could be, for example, 4, for ADPCM.
* For PCM formats this matches #bits_per_raw_sample.
*
* Can be 0.
*/
int bits_per_coded_sample;
/**
* This is the number of valid bits in each output sample. If the
* sample format has more bits, the least significant bits are additional
* padding bits, which are always 0. Use right shifts to reduce the sample
* to its actual size. For example, audio formats with 24 bit samples will
* have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32.
* To get the original sample use "(int32_t)sample >> 8"."
* The number of valid bits in each output sample.
*
* For ADPCM this might be 12 or 16 or similar
* Can be 0
* If the sample format has more bits, the least significant bits are additional
* padding bits, which are always 0. Use right shifts to reduce the sample
* to its actual size.
*
* For example, audio formats with 24-bit samples will have #bits_per_raw_sample
* set to 24, and ::format set to ::AV_SAMPLE_FMT_S32. To get the original sample,
* use: `(int32_t)sample >> 8`.
*
* For ADPCM, this might be 12 or 16, or similar.
*
* Can be 0.
*/
int bits_per_raw_sample;
@@ -129,39 +136,55 @@ typedef struct AVCodecParameters {
int level;
/**
* Video only. The dimensions of the video frame in pixels.
* The width of the video frame in pixels.
*
* Video only.
*/
int width;
/**
* The height of the video frame in pixels.
*
* Video only.
*/
int height;
/**
* Video only. The aspect ratio (width / height) which a single pixel
* The aspect ratio (width/height) which a single pixel
* should have when displayed.
*
* When the aspect ratio is unknown / undefined, the numerator should be
* When the aspect ratio is unknown or undefined, the numerator should be
* set to 0 (the denominator may have any value).
*
* Video only.
*/
AVRational sample_aspect_ratio;
/**
* Video only. Number of frames per second, for streams with constant frame
* durations. Should be set to { 0, 1 } when some frames have differing
* Number of frames per second, for streams with constant frame
* durations. Should be set to `{ 0, 1 }` when some frames have differing
* durations or if the value is not known.
*
* @note This field corresponds to values that are stored in codec-level
* headers and is typically overridden by container/transport-layer
* timestamps, when available. It should thus be used only as a last resort,
* when no higher-level timing information is available.
*
* Video only.
*/
AVRational framerate;
/**
* Video only. The order of the fields in interlaced video.
* The order of the fields in interlaced video.
*
* Video only.
*/
enum AVFieldOrder field_order;
/**
* Video only. Additional colorspace characteristics.
* Additional colorspace characteristics.
*
* Video only.
*/
enum AVColorRange color_range;
enum AVColorPrimaries color_primaries;
@@ -170,46 +193,65 @@ typedef struct AVCodecParameters {
enum AVChromaLocation chroma_location;
/**
* Video only. Number of delayed frames.
* Number of delayed frames.
*
* Video only.
*/
int video_delay;
/**
* Audio only. The channel layout and number of channels.
* The channel layout and number of channels.
*
* Audio only.
*/
AVChannelLayout ch_layout;
/**
* Audio only. The number of audio samples per second.
* The number of audio samples per second.
*
* Audio only.
*/
int sample_rate;
/**
* Audio only. The number of bytes per coded audio frame, required by some
* formats.
* The number of bytes per coded audio frame, required by some formats.
*
* Audio only.
*
* Corresponds to nBlockAlign in WAVEFORMATEX.
*/
int block_align;
/**
* Audio only. Audio frame size, if known. Required by some formats to be static.
* Audio frame size, if known. Required by some formats to be static.
*
* Audio only.
*/
int frame_size;
/**
* Audio only. The amount of padding (in samples) inserted by the encoder at
* Number of padding audio samples at the start.
*
* The amount of padding (in samples) inserted by the encoder at
* the beginning of the audio. I.e. this number of leading decoded samples
* must be discarded by the caller to get the original audio without leading
* must be discarded to get the original audio without leading
* padding.
*
* Audio only.
*/
int initial_padding;
/**
* Audio only. The amount of padding (in samples) appended by the encoder to
* Number of padding audio samples at the end.
*
* The amount of padding (in samples) appended by the encoder to
* the end of the audio. I.e. this number of decoded samples must be
* discarded by the caller from the end of the stream to get the original
* discarded from the end of the stream to get the original
* audio without any trailing padding.
*
* Audio only.
*/
int trailing_padding;
/**
* Audio only. Number of samples to skip after a discontinuity.
* Number of audio samples to skip after a discontinuity.
*
* Audio only.
*/
int seek_preroll;
@@ -219,21 +261,26 @@ typedef struct AVCodecParameters {
enum AVAlphaMode alpha_mode;
} AVCodecParameters;
/**
* @relates AVCodecParameters
* @{
*/
/**
* Allocate a new AVCodecParameters and set its fields to default values
* (unknown/invalid/0). The returned struct must be freed with
* avcodec_parameters_free().
* ::avcodec_parameters_free().
*/
AVCodecParameters *avcodec_parameters_alloc(void);
/**
* Free an AVCodecParameters instance and everything associated with it and
* write NULL to the supplied pointer.
* write `NULL` to the supplied pointer.
*/
void avcodec_parameters_free(AVCodecParameters **par);
/**
* Copy the contents of src to dst. Any allocated fields in dst are freed and
* Copy the contents of \p src to \p dst. Any allocated fields in dst are freed and
* replaced with newly allocated duplicates of the corresponding fields in src.
*
* @return >= 0 on success, a negative AVERROR code on failure.
@@ -241,11 +288,13 @@ void avcodec_parameters_free(AVCodecParameters **par);
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src);
/**
* This function is the same as av_get_audio_frame_duration(), except it works
* with AVCodecParameters instead of an AVCodecContext.
* This function is the same as ::av_get_audio_frame_duration(), except it works
* with ::AVCodecParameters instead of an ::AVCodecContext.
*/
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
/** @} */
/**
* @}
*/
+18 -5
View File
@@ -36,7 +36,6 @@
#include "libavutil/buffer.h"
#include "libavutil/dict.h"
#include "libavutil/rational.h"
#include "version_major.h"
/** Data type identifiers for TIFF tags */
enum AVTiffDataType {
@@ -138,7 +137,7 @@ int32_t av_exif_get_tag_id(const char *name);
* ID, it will set the existing one to have the other information provided. Otherwise, it
* will allocate a new entry.
*
* This function reallocates ifd->entries using av_realloc and allocates (using av_malloc)
* This function reallocates ifd->entries using av_fast_realloc and allocates (using av_malloc)
* a new value member of the entry, then copies the contents of value into that buffer.
*/
int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTiffDataType type,
@@ -154,8 +153,14 @@ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTif
* will be written into *value.
*
* If the entry was present and returned successfully, a positive number is returned.
*
* The positive number is equal to 1 plus the offset at which the entry was found. If the
* entry was found at the top level, this will be in the range of 1 to the number of entries
* in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater
* than the number of entries in the top-level IFD.
*
* If the entry was not found, *value is left untouched and zero is returned.
* If an error occurred, a negative number is returned.
* If an error occurred, a negative AVERROR is returned.
*/
int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value);
@@ -163,8 +168,16 @@ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags,
* Remove an entry from the provided EXIF metadata struct.
*
* If the entry was present and removed successfully, a positive number is returned.
* If the entry was not found, zero is returned.
* If an error occurred, a negative number is returned.
*
* The positive number is equal to 1 plus the offset at which the entry was found. If the
* entry was found at the top level, this will be in the range of 1 to the number of entries
* in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater
* than the number of entries in the top-level IFD. This refers to the state of the IFD before
* the entry was removed, e.g. if the last entry is removed, a 1 is returned, but the IFD has
* no entries anymore.
*
* If the entry was not found, zero is returned and the IFD is left untouched.
* If an error occurred, a negative AVERROR is returned.
*/
int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags);
+16 -9
View File
@@ -368,6 +368,21 @@ enum AVPacketSideDataType {
*/
AV_PKT_DATA_EXIF,
/**
* HDR dynamic metadata associated with a video frame. The payload is an
* AVDynamicHDRSmpte2094App5 type and contains information for color volume
* transform as specified in the SMPTE 2094-50 standard.
*/
AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5,
/**
* Dolby Vision enhancement-layer HEVC decoder configuration.
* Parsed from the @c hvcE box in ISOM-based containers or the
* corresponding BlockAdditionMapping in Matroska. The data is a raw
* HEVCDecoderConfigurationRecord as defined in ISO 14496-15.
*/
AV_PKT_DATA_HEVC_CONF,
/**
* The number of side data types.
* This is not part of the public API/ABI in the sense that it may
@@ -632,14 +647,6 @@ typedef struct AVPacket {
AVRational time_base;
} AVPacket;
#if FF_API_INIT_PACKET
attribute_deprecated
typedef struct AVPacketList {
AVPacket pkt;
struct AVPacketList *next;
} AVPacketList;
#endif
#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
/**
@@ -817,7 +824,7 @@ uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType
* @param size pointer to store the size of the returned data
* @return pointer to data if successful, NULL otherwise
*/
uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size);
uint8_t *av_packet_pack_dictionary(const AVDictionary *dict, size_t *size);
/**
* Unpack a dictionary from side_data.
*
+1 -1
View File
@@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 28
#define LIBAVCODEC_VERSION_MINOR 1
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
+4 -18
View File
@@ -25,7 +25,7 @@
* Libavcodec version macros.
*/
#define LIBAVCODEC_VERSION_MAJOR 62
#define LIBAVCODEC_VERSION_MAJOR 63
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -37,23 +37,9 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 64)
#define FF_API_V408_CODECID (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_INTRA_DC_PRECISION (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_PARSER_PRIVATE (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_PARSER_CODECID (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove the OMX encoder on next major bump
#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove Sonic Lossy/Lossless encoders on next major bump
#define FF_CODEC_SONIC_ENC (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove Sonic decoder on next-next major bump
#define FF_CODEC_SONIC_DEC (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_INTRA_DC_PRECISION (LIBAVCODEC_VERSION_MAJOR < 64)
#define FF_API_MJPEG_EXTERN_HUFF (LIBAVCODEC_VERSION_MAJOR < 64)
#endif /* AVCODEC_VERSION_MAJOR_H */
+114 -40
View File
@@ -386,6 +386,7 @@ struct AVFrame;
creation_time-- date when the file was created, preferably in ISO 8601.
date -- date when the work was created, preferably in ISO 8601.
disc -- number of a subset, e.g. disc in a multi-disc collection.
disc_subtitle-- title of a subset, e.g. disc subtitle in a multi-disc collection.
encoder -- name/settings of the software/hardware that produced the file.
encoded_by -- person/group who created the file.
filename -- original name of the file.
@@ -495,6 +496,7 @@ typedef struct AVProbeData {
The user or muxer can override this through
AVFormatContext.avoid_negative_ts
*/
#define AVFMT_FIXED_FRAMESIZE 0x80000 /**< Format wants @ref AVCodecParameters.frame_size "fixed size audio frames." */
#define AVFMT_SEEK_TO_PTS 0x4000000 /**< Seeking is based on PTS */
@@ -517,10 +519,10 @@ typedef struct AVOutputFormat {
enum AVCodecID video_codec; /**< default video codec */
enum AVCodecID subtitle_codec; /**< default subtitle codec */
/**
* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER,
* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL,
* AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
* AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS,
* AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE
* AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE, AVFMT_FIXED_FRAMESIZE
*/
int flags;
@@ -556,9 +558,10 @@ typedef struct AVInputFormat {
const char *long_name;
/**
* Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS,
* AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,
* AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.
* Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL,
* AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX,
* AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH,
* AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.
*/
int flags;
@@ -1062,19 +1065,32 @@ typedef struct AVStreamGroupTileGrid {
} AVStreamGroupTileGrid;
/**
* AVStreamGroupLCEVC is meant to define the relation between video streams
* and a data stream containing LCEVC enhancement layer NALUs.
* AVStreamGroupLayeredVideo is meant to define the relation between a base
* layer video stream and a separate enhancement layer stream that together
* form a single layered video presentation (for example a video stream and a
* data stream containing LCEVC enhancement layer NALUs, or Dolby Vision
* Profile 7 dual-layer encoding).
*
* No more than one stream of
* @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC shall be present.
* The enhancement layer stream is identified by @ref el_index.
*/
typedef struct AVStreamGroupLCEVC {
typedef struct AVStreamGroupLayeredVideo {
const AVClass *av_class;
/**
* Index of the LCEVC data stream in AVStreamGroup.
* Index of the enhancement layer stream in AVStreamGroup.
*/
unsigned int lcevc_index;
#if FF_API_LCEVC_STRUCT
union {
#endif
unsigned int el_index;
#if FF_API_LCEVC_STRUCT
/**
* Alias for @ref el_index, kept for backward compatibility.
*/
attribute_deprecated
unsigned int lcevc_index;
};
#endif
/**
* Width of the final stream for presentation.
*/
@@ -1083,7 +1099,32 @@ typedef struct AVStreamGroupLCEVC {
* Height of the final image for presentation.
*/
int height;
} AVStreamGroupLCEVC;
} AVStreamGroupLayeredVideo;
#if FF_API_LCEVC_STRUCT
/**
* Alias kept for backward compatibility.
*
* AVStreamGroupLCEVC was renamed to @ref AVStreamGroupLayeredVideo.
*/
#define AVStreamGroupLCEVC AVStreamGroupLayeredVideo
#endif
/**
* AVStreamGroupTREF is meant to define the relation between video, audio,
* or subtitle streams, and a data stream containing metadata.
*
* No more than one stream of @ref AVCodecParameters.codec_type "codec_type"
* AVMEDIA_TYPE_DATA shall be present.
*/
typedef struct AVStreamGroupTREF {
const AVClass *av_class;
/**
* Index of the metadata stream in the AVStreamGroup.
*/
unsigned int metadata_index;
} AVStreamGroupTREF;
enum AVStreamGroupParamsType {
AV_STREAM_GROUP_PARAMS_NONE,
@@ -1091,6 +1132,8 @@ enum AVStreamGroupParamsType {
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION,
AV_STREAM_GROUP_PARAMS_TILE_GRID,
AV_STREAM_GROUP_PARAMS_LCEVC,
AV_STREAM_GROUP_PARAMS_TREF,
AV_STREAM_GROUP_PARAMS_DOLBY_VISION,
};
struct AVIAMFAudioElement;
@@ -1132,7 +1175,15 @@ typedef struct AVStreamGroup {
struct AVIAMFAudioElement *iamf_audio_element;
struct AVIAMFMixPresentation *iamf_mix_presentation;
struct AVStreamGroupTileGrid *tile_grid;
struct AVStreamGroupLayeredVideo *layered_video;
#if FF_API_LCEVC_STRUCT
/**
* deprecated, use layered_video.
*/
attribute_deprecated
struct AVStreamGroupLCEVC *lcevc;
#endif
struct AVStreamGroupTREF *tref;
} params;
/**
@@ -1538,7 +1589,12 @@ typedef struct AVFormatContext {
* Flags to enable debugging.
*/
int debug;
#define FF_FDEBUG_TS 0x0001
#define AV_FDEBUG_TS 0x0001
#define AV_FDEBUG_ID3V2 0x0002
#if FF_API_FDEBUG_TS
#define FF_FDEBUG_TS AV_FDEBUG_TS
#endif
/**
* The maximum number of streams.
@@ -2069,6 +2125,37 @@ int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
AVProgram *av_new_program(AVFormatContext *s, int id);
#define AVFMT_PROGCOPY_MATCH_BY_ID (1 << 0) ///< match streams using stream id
#define AVFMT_PROGCOPY_MATCH_BY_INDEX (1 << 1) ///< match streams using stream index
#define AVFMT_PROGCOPY_OVERWRITE (1 << 8) ///< overwrite pre-existing program having same ID
/**
* Copy an AVProgram from one AVFormatContext to another.
*
* Streams in the destination context whose designated attribute match the attribute of
* the streams in the source AVProgram index are added to the stream index of the copied
* AVProgram. The attribute is designated using AVFMT_PROGCOPY_MATCH_ flags.
*
* If a new program has to be added, the function expects and requires any existing buffer
* holding the array of pointers to AVPrograms in the destination context to have its size
* be a power-of-two value. This should be the case if all earlier programs were created
* using av_new_program or this function.
*
* @param dst pointer to the target muxer context
* @param src pointer to the source muxer context
* @param progid ID of the program to be copied
* @param flags combination of flags which determine how streams are matched and
* whether pre-existing AVProgram in target is overwritten.
* If no match condition is set, streams will be matched by ids if
* all source stream ids are non-zero and unique, else by index.
*
* @return >= 0 in case of success, Error EEXIST if target already has program with same ID
* and overwrite flag isn't set, else a negative AVERROR code in case of other
* failures.
*/
int av_program_copy(AVFormatContext *dst, const AVFormatContext *src, int progid, int flags);
/**
* @}
*/
@@ -2230,6 +2317,19 @@ AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);
/**
* Add the supplied index of a stream to the AVProgram with matching id.
*
* @param ac the format context which contains the target AVProgram
* @param progid the ID of the AVProgram whose stream index is to be updated
* @param idx the index of the stream to be added
*
* @return >=0 upon successful addition or if index was already present,
* AVERROR if no matching program is found or stream index is invalid or
* the stream index array reallocation failed.
*/
int av_program_add_stream_index2(AVFormatContext *ac, int progid, unsigned int idx);
/**
* Find the "best" stream in the file.
* The best stream is determined according to various heuristics as the most
@@ -3085,32 +3185,6 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,
int avformat_queue_attached_pictures(AVFormatContext *s);
#if FF_API_INTERNAL_TIMING
enum AVTimebaseSource {
AVFMT_TBCF_AUTO = -1,
AVFMT_TBCF_DECODER,
AVFMT_TBCF_DEMUXER,
#if FF_API_R_FRAME_RATE
AVFMT_TBCF_R_FRAMERATE,
#endif
};
/**
* @deprecated do not call this function
*/
attribute_deprecated
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
AVStream *ost, const AVStream *ist,
enum AVTimebaseSource copy_tb);
/**
* @deprecated do not call this function
*/
attribute_deprecated
AVRational av_stream_get_codec_timebase(const AVStream *st);
#endif
/**
* @}
*/
+1 -1
View File
@@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 12
#define LIBAVFORMAT_VERSION_MINOR 1
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -29,7 +29,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 62
#define LIBAVFORMAT_VERSION_MAJOR 63
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -41,11 +41,11 @@
* at once through the bump. This improves the git bisect-ability of the change.
*
*/
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 63)
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 64)
#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 63)
#define FF_API_FDEBUG_TS (LIBAVFORMAT_VERSION_MAJOR < 64)
#define FF_API_NO_DEFAULT_TLS_VERIFY (LIBAVFORMAT_VERSION_MAJOR < 63)
#define FF_API_LCEVC_STRUCT (LIBAVFORMAT_VERSION_MAJOR < 64)
#define FF_API_R_FRAME_RATE 1
+9 -1
View File
@@ -59,6 +59,14 @@
# define AV_HAS_STD_ATTRIBUTE(x) 0
#endif
#if AV_HAS_STD_ATTRIBUTE(fallthrough)
# define av_fallthrough [[fallthrough]]
#elif AV_HAS_ATTRIBUTE(fallthrough)
# define av_fallthrough __attribute__((fallthrough))
#else
# define av_fallthrough do {} while(0)
#endif
#ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
# define av_always_inline __attribute__((always_inline)) inline
@@ -111,7 +119,7 @@
# define av_cold
#endif
#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)
#if (AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__clang__ )) || AV_HAS_ATTRIBUTE(flatten)
# define av_flatten __attribute__((flatten))
#else
# define av_flatten
-24
View File
@@ -313,30 +313,6 @@ static inline void *av_x_if_null(const void *p, const void *x)
return (void *)(intptr_t)(p ? p : x);
}
#if FF_API_OPT_INT_LIST
/**
* Compute the length of an integer list.
*
* @param elsize size in bytes of each list element (only 1, 2, 4 or 8)
* @param term list terminator (usually 0 or -1)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
attribute_deprecated
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term) av_pure;
/**
* Compute the length of an integer list.
*
* @param term list terminator (usually 0 or -1)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
#define av_int_list_length(list, term) \
av_int_list_length_for_size(sizeof(*(list)), list, term)
#endif
/**
* Return the fractional representation of the internal time base.
*/
+1 -1
View File
@@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif
-11
View File
@@ -297,17 +297,6 @@ static av_always_inline av_const unsigned av_zero_extend_c(unsigned a, unsigned
return a & ((1U << p) - 1);
}
#if FF_API_MOD_UINTP2
#ifndef av_mod_uintp2
# define av_mod_uintp2 av_mod_uintp2_c
#endif
attribute_deprecated
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
{
return av_zero_extend_c(a, p);
}
#endif
/**
* Add two signed 32-bit values with saturation.
*
+2 -7
View File
@@ -82,6 +82,8 @@
#define AV_CPU_FLAG_SME2 (1 <<14)
#define AV_CPU_FLAG_SME_I16I64 (1 <<15)
#define AV_CPU_FLAG_SETEND (1 <<16)
#define AV_CPU_FLAG_PMULL (1 <<17)
#define AV_CPU_FLAG_EOR3 (1 <<18)
#define AV_CPU_FLAG_MMI (1 << 0)
#define AV_CPU_FLAG_MSA (1 << 1)
@@ -92,18 +94,11 @@
// RISC-V extensions
#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank)
#if FF_API_RISCV_FD_ZBA
#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP)
#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP)
#endif
#define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */
#define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */
#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
#if FF_API_RISCV_FD_ZBA
#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations
#endif
#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations
#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)
+1 -1
View File
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "8.1"
#define FFMPEG_VERSION "9.0"
#endif /* AVUTIL_FFVERSION_H */
+42 -3
View File
@@ -256,10 +256,49 @@ enum AVFrameSideDataType {
AV_FRAME_DATA_3D_REFERENCE_DISPLAYS,
/**
* Extensible image file format metadata. The payload is a buffer containing
* EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a.
* Exchangeable image file format metadata. The payload is a buffer containing
* EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. These four
* bytes signify the endianness, and occur as the first part of the TIFF header.
*/
AV_FRAME_DATA_EXIF,
AV_FRAME_DATA_EXIF,
/**
* HDR dynamic metadata associated with a video frame. The payload is
* an AVDynamicHDRSmpte2094App5 type and contains information for color
* volume transform as specified in the SMPTE 2094-50 standard.
*/
AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5,
/**
* IAMF Mix Gain Parameter Data associated with the audio frame. This metadata
* is in the form of the AVIAMFParamDefinition struct and contains information
* defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and
* Formats standard.
*/
AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM,
/**
* IAMF Demixing Info Parameter Data associated with the audio frame. This
* metadata is in the form of the AVIAMFParamDefinition struct and contains
* information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model
* and Formats standard.
*/
AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM,
/**
* IAMF Recon Gain Info Parameter Data associated with the audio frame. This
* metadata is in the form of the AVIAMFParamDefinition struct and contains
* information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model
* and Formats standard.
*/
AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM,
/**
* Color information from a RAW camera codecs, needed to correctly process
* the video data. The payload is an AVRawColorParams struct defined in
* libavutil/raw_color_params.h.
*/
AV_FRAME_DATA_RAW_COLOR_PARAMS,
};
enum AVActiveFormatDescription {
@@ -373,4 +373,108 @@ int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data,
*/
int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t *size);
/**
* This struct represents dynamic metadata for color volume transform as
* specified in the SMPTE 2094-50 standard.
*
* To be used as payload of a AVFrameSideData or AVPacketSideData with the
* appropriate type.
*
* @note The struct should be allocated with
* av_dynamic_smpte2094_app5_alloc() and its size is not a part of
* the public ABI.
*/
typedef struct AVDynamicHDRSmpte2094App5 {
/**
* Section C.2.1. smpte_st_2094_50_application_info()
*/
uint8_t application_version;
uint8_t minimum_application_version;
/**
* Section C.2.2 smpte_st_2094_50_color_volume_transform()
*/
uint8_t has_custom_hdr_reference_white_flag;
uint8_t has_adaptive_tone_map_flag;
uint16_t hdr_reference_white;
/**
* Section C.2.3 smpte_st_2094_50_adaptive_tone_map()
*/
uint16_t baseline_hdr_headroom;
uint8_t use_reference_white_tone_mapping_flag;
uint8_t num_alternate_images;
uint8_t gain_application_space_chromaticities_flag;
uint8_t has_common_component_mix_params_flag;
uint8_t has_common_curve_params_flag;
uint16_t gain_application_space_chromaticities[8];
uint16_t alternate_hdr_headrooms[4];
/**
* Section C.2.4 smpte_st_2094_50_component_mixing()
*/
uint8_t component_mixing_type[4];
uint8_t has_component_mixing_coefficient_flag[4][6];
uint16_t component_mixing_coefficient[4][6];
/**
* Section C.2.5 smpte_st_2094_50_gain_curve()
*/
uint8_t gain_curve_num_control_points_minus_1[4];
uint8_t gain_curve_use_pchip_slope_flag[4];
uint16_t gain_curve_control_points_x[4][32];
uint16_t gain_curve_control_points_y[4][32];
uint16_t gain_curve_control_points_theta[4][32];
} AVDynamicHDRSmpte2094App5;
/**
* Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to
* default values. The resulting struct can be freed using av_freep().
*
* @return An AVDynamicHDRSmpte2094App5 filled with default values or NULL
* on failure.
*/
AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(size_t* size);
/**
* Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame.
*
* @param frame The frame which side data is added to.
*
* @return The AVDynamicHDRSmpte2094App5 structure to be filled by caller or
* NULL on failure.
*/
AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* frame);
/**
* Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5.
*
* @param s A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure.
* @param data The byte array containing the raw ITU-T T.35 data.
* @param size Size of the data array in bytes.
*
* @return >= 0 on success. Otherwise, returns the appropriate AVERROR.
*/
int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* s, const uint8_t* data,
size_t size);
/**
* Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding
* the country_code, provider_code and provider_oriented_code.
*
* @param s A pointer containing the AVDynamicHDRSmpte2094App5 data.
* @param[in,out] data A pointer to pointer to a byte buffer to be filled with
* the serialized metadata. If *data is NULL, a buffer be will be allocated and
* a pointer to it stored in its place. The caller assumes ownership of the
* buffer. May be NULL, in which case the function will only store the required
* buffer size in *size.
* @param[in,out] size A pointer to a size to be set to the returned buffer's
* size. If *data is not NULL, *size must contain the size of the input buffer.
* May be NULL only if *data is NULL.
*
* @return >= 0 on success. Otherwise, returns the appropriate AVERROR.
*/
int av_dynamic_hdr_smpte2094_app5_to_t35(const AVDynamicHDRSmpte2094App5* s, uint8_t** data,
size_t* size);
#endif /* AVUTIL_HDR_DYNAMIC_METADATA_H */
@@ -26,6 +26,8 @@
#include <AMF/core/Context.h>
#include <AMF/core/Trace.h>
#include <AMF/core/Debug.h>
#include <AMF/components/ColorSpace.h>
#include "libavutil/mastering_display_metadata.h"
/**
* This struct is allocated as AVHWDeviceContext.hwctx
@@ -47,4 +49,10 @@ typedef struct AVAMFDeviceContext {
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt);
enum AVPixelFormat av_amf_to_av_format(enum AMF_SURFACE_FORMAT fmt);
enum AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM av_amf_get_color_profile(enum AVColorRange color_range, enum AVColorSpace color_space);
int av_amf_display_mastering_meta_to_hdrmeta(const AVMasteringDisplayMetadata *display_meta, AMFHDRMetadata *hdrmeta);
int av_amf_light_metadata_to_hdrmeta(const AVContentLightMetadata *light_meta, AMFHDRMetadata *hdrmeta);
int av_amf_extract_hdr_metadata(const AVFrame *frame, AMFHDRMetadata *hdrmeta);
int av_amf_attach_hdr_metadata(AVFrame *frame, const AMFHDRMetadata *hdrmeta);
#endif /* AVUTIL_HWCONTEXT_AMF_H */
@@ -116,58 +116,6 @@ typedef struct AVVulkanDeviceContext {
const char * const *enabled_dev_extensions;
int nb_enabled_dev_extensions;
#if FF_API_VULKAN_FIXED_QUEUES
/**
* Queue family index for graphics operations, and the number of queues
* enabled for it. If unavailable, will be set to -1. Not required.
* av_hwdevice_create() will attempt to find a dedicated queue for each
* queue family, or pick the one with the least unrelated flags set.
* Queue indices here may overlap if a queue has to share capabilities.
*/
attribute_deprecated
int queue_family_index;
attribute_deprecated
int nb_graphics_queues;
/**
* Queue family index for transfer operations and the number of queues
* enabled. Required.
*/
attribute_deprecated
int queue_family_tx_index;
attribute_deprecated
int nb_tx_queues;
/**
* Queue family index for compute operations and the number of queues
* enabled. Required.
*/
attribute_deprecated
int queue_family_comp_index;
attribute_deprecated
int nb_comp_queues;
/**
* Queue family index for video encode ops, and the amount of queues enabled.
* If the device doesn't support such, queue_family_encode_index will be -1.
* Not required.
*/
attribute_deprecated
int queue_family_encode_index;
attribute_deprecated
int nb_encode_queues;
/**
* Queue family index for video decode ops, and the amount of queues enabled.
* If the device doesn't support such, queue_family_decode_index will be -1.
* Not required.
*/
attribute_deprecated
int queue_family_decode_index;
attribute_deprecated
int nb_decode_queues;
#endif
#if FF_API_VULKAN_SYNC_QUEUES
/**
* Locks a queue, preventing other threads from submitting any command
@@ -199,6 +147,9 @@ typedef struct AVVulkanDeviceContext {
*/
AVVulkanDeviceQueueFamily qf[64];
int nb_qf;
/* Queue creation flags, for vkGetDeviceQueue2. */
VkDeviceQueueCreateFlags queue_flags;
} AVVulkanDeviceContext;
/**
@@ -336,7 +287,7 @@ struct AVVkFrame {
/**
* Updated after every barrier. One per VkImage.
*/
VkAccessFlagBits access[AV_NUM_DATA_POINTERS];
VkAccessFlagBits2 access[AV_NUM_DATA_POINTERS];
VkImageLayout layout[AV_NUM_DATA_POINTERS];
/**
@@ -355,11 +306,6 @@ struct AVVkFrame {
*/
uint64_t sem_value[AV_NUM_DATA_POINTERS];
/**
* Internal data.
*/
struct AVVkFrameInternal *internal;
/**
* Describes the binding offset of each image to the VkDeviceMemory.
* One per VkImage.
@@ -372,6 +318,11 @@ struct AVVkFrame {
* One per VkImage.
*/
uint32_t queue_family[AV_NUM_DATA_POINTERS];
/**
* Internal data. Not to be accessed by users in any way.
*/
struct AVVkFrameInternal *internal;
};
/**
-34
View File
@@ -28,7 +28,6 @@
*/
#include "rational.h"
#include "avutil.h"
#include "channel_layout.h"
#include "dict.h"
#include "log.h"
@@ -886,24 +885,6 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo
*/
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);
#if FF_API_OPT_INT_LIST
/**
* Set a binary option to an integer list.
*
* @param obj AVClass object to set options on
* @param name name of the binary option
* @param val pointer to an integer list (must have the correct type with
* regard to the contents of the list)
* @param term list terminator (usually 0 or -1)
* @param flags search flags
*/
#define av_opt_set_int_list(obj, name, val, term, flags) \
(av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \
AVERROR(EINVAL) : \
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
av_int_list_length(val, term) * sizeof(*(val)), flags))
#endif
/**
* Add, replace, or remove elements for an array option. Which of these
* operations is performed depends on the values of val and search_flags.
@@ -1071,21 +1052,6 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
* @}
*/
#if FF_API_OPT_PTR
/**
* Gets a pointer to the requested field in a struct.
* This function allows accessing a struct even when its fields are moved or
* renamed since the application making the access has been compiled,
*
* @returns a pointer to the field, it can be cast to the correct type and read
* or written to.
*
* @deprecated direct access to AVOption-exported fields is not supported
*/
attribute_deprecated
void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);
#endif
/**
* Check if given option is set to its default value.
*
@@ -0,0 +1,147 @@
/*
* Copyright (c) 2026 Lynne <[email protected]>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_RAW_COLOR_PARAMS_H
#define AVUTIL_RAW_COLOR_PARAMS_H
#include <stddef.h>
#include <stdint.h>
#include "frame.h"
#include "rational.h"
enum AVRawColorParamsType {
AV_RAW_COLOR_PARAMS_NONE = 0,
/**
* The union is valid when interpreted as AVProResRawColorParams
* (codec.prores_raw).
*/
AV_RAW_COLOR_PARAMS_PRORES_RAW,
};
/**
* ProRes RAW per-frame color transform, parsed from the prrf frame header.
*
* The correct rendering pipeline is:
* -> (sample - black_level) / (white_level - black_level)
* -> per-channel white balance (wb_red, 1.0 for G, wb_blue) pre-debayer
* -> debayer
* -> color_matrix (camera RGB -> CIE 1931 XYZ relative to D65)
* -> gain (scene-linear scale)
*
* Black/white levels live on the outer AVRawColorParams. The matrix output
* is linear-light CIE XYZ D65; convert to a working RGB space downstream.
*
* @note The struct must be allocated as part of AVRawColorParams using
* av_raw_color_params_alloc(). Its size is not a part of the public ABI.
*/
typedef struct AVProResRawColorParams {
/**
* White balance multiplier for the red channel, applied pre-debayer.
*/
AVRational wb_red;
/**
* White balance multiplier for the blue channel, applied pre-debayer.
* (The green channel is implicit 1.0 for ProRes RAW)
*/
AVRational wb_blue;
/**
* 3x3 row-major color matrix from camera RGB to linear-light CIE 1931
* XYZ relative to the D65 illuminant, applied post-debayer.
* out[i] = sum_j color_matrix[i][j] * in[j].
*/
AVRational color_matrix[3][3];
/**
* Post-matrix scene-linear scaling factor. Encodes highlight headroom the
* encoder reserved; multiply the matrixed values by this to recover
* scene-linear light.
*/
AVRational gain;
} AVProResRawColorParams;
/**
* Per-frame color information for a RAW camera codec. Carried as side data of
* type AV_FRAME_DATA_RAW_COLOR_PARAMS.
*
* The outer struct carries the fields every RAW codec exposes: the sensor's
* valid sample range and the white-balance correlated color temperature.
* The codec union holds the codec-specific transform parameters; `type`
* selects which member of the union is valid.
*
* The codec-specific transform (color_matrix or equivalent) always lands in
* linear-light CIE 1931 XYZ relative to the D65 illuminant, cameras don't
* have standard primaries, so XYZ is the only common target.
*
* @note The struct must be allocated using av_raw_color_params_alloc() or
* av_raw_color_params_create_side_data(). Its size is not a part of the
* public ABI.
*/
typedef struct AVRawColorParams {
/**
* Selects which member of `codec` is valid.
*/
enum AVRawColorParamsType type;
/**
* Lowest valid raw sample code (sensor black point)
*/
AVRational black_level;
/**
* Highest valid raw sample code (sensor white point)
*/
AVRational white_level;
/**
* Color temperature in Kelvin from with the camera's white balance.
* Informational; the math uses the codec-specific white-balance fields.
* 0 if not signaled.
*/
uint32_t wb_cct;
/**
* Additional codec-specific fields.
*/
union {
AVProResRawColorParams prores_raw;
} codec;
} AVRawColorParams;
/**
* Allocate an AVRawColorParams structure and zero-initialize it.
*
* @param size if non-NULL, set to sizeof(AVRawColorParams)
* @return the newly allocated struct or NULL on failure
*/
AVRawColorParams *av_raw_color_params_alloc(size_t *size);
/**
* Allocate and add an AVRawColorParams structure to an existing AVFrame as
* AV_FRAME_DATA_RAW_COLOR_PARAMS side data.
*
* @return the newly allocated struct, or NULL on failure
*/
AVRawColorParams *av_raw_color_params_create_side_data(AVFrame *frame);
#endif /* AVUTIL_RAW_COLOR_PARAMS_H */
+1 -2
View File
@@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
* @return the pointer to the filled buffer or NULL if sample_fmt is
* unknown or in case of other errors
* @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
+5 -10
View File
@@ -78,8 +78,8 @@
* @{
*/
#define LIBAVUTIL_VERSION_MAJOR 60
#define LIBAVUTIL_VERSION_MINOR 26
#define LIBAVUTIL_VERSION_MAJOR 61
#define LIBAVUTIL_VERSION_MINOR 1
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -105,14 +105,9 @@
* @{
*/
#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_OPT_PTR (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 62)
#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 62)
#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 62)
#define FF_API_VULKAN_SYNC_QUEUES (LIBAVUTIL_VERSION_MAJOR < 62)
/**
+1 -1
View File
@@ -30,7 +30,7 @@
#include "version_major.h"
#define LIBSWRESAMPLE_VERSION_MINOR 3
#define LIBSWRESAMPLE_VERSION_MINOR 1
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
@@ -26,6 +26,6 @@
* Libswresample version macros
*/
#define LIBSWRESAMPLE_VERSION_MAJOR 6
#define LIBSWRESAMPLE_VERSION_MAJOR 7
#endif /* SWRESAMPLE_VERSION_MAJOR_H */
+94 -23
View File
@@ -93,22 +93,42 @@ typedef enum SwsAlphaBlend {
SWS_ALPHA_BLEND_MAX_ENUM = 0x7FFFFFFF, /* force size to 32 bits, not a valid blend mode */
} SwsAlphaBlend;
typedef enum SwsFlags {
/**
* Scaler selection options. Only one may be active at a time.
*/
SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering
SWS_BILINEAR = 1 << 1, ///< bilinear filtering
SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline
SWS_X = 1 << 3, ///< experimental
SWS_POINT = 1 << 4, ///< nearest neighbor
SWS_AREA = 1 << 5, ///< area averaging
SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma
SWS_GAUSS = 1 << 7, ///< gaussian approximation
SWS_SINC = 1 << 8, ///< unwindowed sinc
SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc
SWS_SPLINE = 1 << 10, ///< cubic Keys spline
typedef enum SwsScaler {
SWS_SCALE_AUTO = 0,
SWS_SCALE_BILINEAR, ///< bilinear filtering
SWS_SCALE_BICUBIC, ///< 2-tap cubic BC-spline
SWS_SCALE_POINT, ///< nearest neighbor (point sampling)
SWS_SCALE_AREA, ///< area averaging
SWS_SCALE_GAUSSIAN, ///< 2-tap gaussian approximation
SWS_SCALE_SINC, ///< unwindowed sinc
SWS_SCALE_LANCZOS, ///< 3-tap sinc/sinc
SWS_SCALE_SPLINE, ///< unwindowned natural cubic spline
SWS_SCALE_NB, ///< not part of the ABI
SWS_SCALE_MAX_ENUM = 0x7FFFFFFF, ///< force size to 32 bits, not a valid filter type
} SwsScaler;
typedef enum SwsBackend {
/* Stable backends */
SWS_BACKEND_LEGACY = (1 << 0), ///< Legacy bespoke format-specific code
SWS_BACKEND_STABLE = SWS_BACKEND_LEGACY,
/* Unstable backends (auto-selected only if SWS_UNSTABLE is enabled) */
SWS_BACKEND_C = (1 << 1), ///< Template-based C reference implementation
SWS_BACKEND_MEMCPY = (1 << 2), ///< Fast path using libc memcpy() / memset()
SWS_BACKEND_X86 = (1 << 3), ///< Chained x86 SIMD kernels
SWS_BACKEND_AARCH64 = (1 << 4), ///< Chained AArch64 NEON kernels
SWS_BACKEND_SPIRV = (1 << 5), ///< Vulkan SPIR-V backend
SWS_BACKEND_UNSTABLE = SWS_BACKEND_C |
SWS_BACKEND_MEMCPY |
SWS_BACKEND_X86 |
SWS_BACKEND_AARCH64 |
SWS_BACKEND_SPIRV,
SWS_BACKEND_ALL = SWS_BACKEND_STABLE | SWS_BACKEND_UNSTABLE,
SWS_BACKEND_MAX_ENUM = 0x7FFFFFFF, ///< force size to 32 bits, not a valid backend
} SwsBackend;
typedef enum SwsFlags {
/**
* Return an error on underspecified conversions. Without this flag,
* unspecified fields are defaulted to sensible values.
@@ -158,9 +178,9 @@ typedef enum SwsFlags {
SWS_BITEXACT = 1 << 19,
/**
* Allow using experimental new code paths. This may be faster, slower,
* or produce different output, with semantics subject to change at any
* point in time. For testing and debugging purposes only.
* Allow/prefer using experimental new code paths. This may be faster,
* slower, or produce different output, with semantics subject to change
* at any point in time. For testing and debugging purposes only.
*/
SWS_UNSTABLE = 1 << 20,
@@ -169,6 +189,22 @@ typedef enum SwsFlags {
*/
SWS_DIRECT_BGR = 1 << 15, ///< This flag has no effect
SWS_ERROR_DIFFUSION = 1 << 23, ///< Set `SwsContext.dither` instead
/**
* Scaler selection options. Only one may be active at a time.
* Deprecated in favor of `SwsContext.scaler`.
*/
SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering
SWS_BILINEAR = 1 << 1, ///< bilinear filtering
SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline
SWS_X = 1 << 3, ///< experimental
SWS_POINT = 1 << 4, ///< nearest neighbor
SWS_AREA = 1 << 5, ///< area averaging
SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma
SWS_GAUSS = 1 << 7, ///< gaussian approximation
SWS_SINC = 1 << 8, ///< unwindowed sinc
SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc
SWS_SPLINE = 1 << 10, ///< unwindowed natural cubic spline
} SwsFlags;
typedef enum SwsIntent {
@@ -204,7 +240,8 @@ typedef struct SwsContext {
/**
* Extra parameters for fine-tuning certain scalers.
*/
double scaler_params[2];
#define SWS_NUM_SCALER_PARAMS 2
double scaler_params[SWS_NUM_SCALER_PARAMS];
/**
* How many threads to use for processing, or 0 for automatic selection.
@@ -248,6 +285,32 @@ typedef struct SwsContext {
*/
int intent;
/**
* Scaling filter. If set to something other than SWS_SCALE_AUTO, this will
* override the filter implied by `SwsContext.flags`.
*
* Note: Does not affect the legacy (stateful) API.
*/
SwsScaler scaler;
/**
* Scaler used specifically for up/downsampling subsampled (chroma) planes.
* If set to something other than SWS_SCALE_AUTO, this will override the
* filter implied by `SwsContext.scaler`. Otherwise, the same filter
* will be used for both main scaling and chroma subsampling.
*/
SwsScaler scaler_sub;
/**
* Bitmask of SWS_BACKEND_*. If non-zero, this will restrict the available
* backends to the specified set. If left as zero, a default set of
* backends will be selected automatically (based on SWS_UNSTABLE).
*
* Note: This is only relevant for the new API (sws_scale_frame()). The
* stateful legacy API always implies SWS_BACKEND_LEGACY.
*/
SwsBackend backends;
/* Remember to add new fields to graph.c:opts_equal() */
} SwsContext;
@@ -267,7 +330,8 @@ void sws_free_context(SwsContext **ctx);
***************************/
/**
* Test if a given (software) pixel format is supported.
* Test if a given (software) pixel format is supported by any backend,
* excluding unstable backends.
*
* @param output If 0, test if compatible with the source/input frame;
* otherwise, with the destination/output frame.
@@ -278,7 +342,8 @@ void sws_free_context(SwsContext **ctx);
int sws_test_format(enum AVPixelFormat format, int output);
/**
* Test if a given hardware pixel format is supported.
* Test if a given hardware pixel format is supported by any backend,
* excluding unstable backends.
*
* @param format The hardware format to check, or AV_PIX_FMT_NONE.
*
@@ -373,6 +438,14 @@ int sws_is_noop(const AVFrame *dst, const AVFrame *src);
*/
int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src);
/**
* Filter kernel cut-off value. Values below this (absolute) magnitude
* are cut off from the main filter kernel. Note that the window is
* always adjusted to the new filter radius, so there will never be
* any spectral leakage (for suitably windowed filters).
*/
#define SWS_MAX_REDUCE_CUTOFF 0.002
/*************************
* Legacy (stateful) API *
*************************/
@@ -382,8 +455,6 @@ int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src);
#define SWS_PARAM_DEFAULT 123456
#define SWS_MAX_REDUCE_CUTOFF 0.002
#define SWS_CS_ITU709 1
#define SWS_CS_FCC 4
#define SWS_CS_ITU601 5
+1 -1
View File
@@ -28,7 +28,7 @@
#include "version_major.h"
#define LIBSWSCALE_VERSION_MINOR 5
#define LIBSWSCALE_VERSION_MINOR 1
#define LIBSWSCALE_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
@@ -24,7 +24,7 @@
* swscale version macros
*/
#define LIBSWSCALE_VERSION_MAJOR 9
#define LIBSWSCALE_VERSION_MAJOR 10
/**
* FF_API_* defines may be placed below to indicate public API that will be