mirror of
https://github.com/stenzek/duckstation.git
synced 2026-01-31 02:05:18 +01:00
Deps: Update to FFmpeg 8.0
This commit is contained in:
@@ -101,7 +101,7 @@ if(NOT WIN32)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
find_package(FFMPEG 7.0.0 COMPONENTS avcodec avformat avutil swresample swscale)
|
||||
find_package(FFMPEG 8.0.0 COMPONENTS avcodec avformat avutil swresample swscale)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
message(WARNING "FFmpeg not found, using bundled headers.")
|
||||
endif()
|
||||
|
||||
@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -158,7 +158,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.0.2
|
||||
8.0
|
||||
|
||||
@@ -187,17 +187,6 @@ struct AVCodecParameters;
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if FF_API_BUFFER_MIN_SIZE
|
||||
/**
|
||||
* @ingroup lavc_encoding
|
||||
* minimum encoding buffer size
|
||||
* Used to avoid some checks during header writing.
|
||||
* @deprecated Unused: avcodec_receive_packet() does not work
|
||||
* with preallocated packet buffers.
|
||||
*/
|
||||
#define AV_INPUT_BUFFER_MIN_SIZE 16384
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup lavc_encoding
|
||||
*/
|
||||
@@ -234,18 +223,9 @@ typedef struct RcOverride{
|
||||
* Use qpel MC.
|
||||
*/
|
||||
#define AV_CODEC_FLAG_QPEL (1 << 4)
|
||||
#if FF_API_DROPCHANGED
|
||||
/**
|
||||
* Don't output frames whose parameters differ from first
|
||||
* decoded frame in stream.
|
||||
*
|
||||
* @deprecated callers should implement this functionality in their own code
|
||||
*/
|
||||
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
|
||||
#endif
|
||||
/**
|
||||
* Request the encoder to output reconstructed frames, i.e.\ frames that would
|
||||
* be produced by decoding the encoded bistream. These frames may be retrieved
|
||||
* be produced by decoding the encoded bitstream. These frames may be retrieved
|
||||
* by calling avcodec_receive_frame() immediately after a successful call to
|
||||
* avcodec_receive_packet().
|
||||
*
|
||||
@@ -515,16 +495,21 @@ typedef struct AVCodecContext {
|
||||
int flags2;
|
||||
|
||||
/**
|
||||
* some codecs need / can use extradata like Huffman tables.
|
||||
* MJPEG: Huffman tables
|
||||
* rv10: additional flags
|
||||
* MPEG-4: global headers (they can be in the bitstream or here)
|
||||
* The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
|
||||
* than extradata_size to avoid problems if it is read with the bitstream reader.
|
||||
* The bytewise contents of extradata must not depend on the architecture or CPU endianness.
|
||||
* Must be allocated with the av_malloc() family of functions.
|
||||
* - encoding: Set/allocated/freed by libavcodec.
|
||||
* - decoding: Set/allocated/freed by user.
|
||||
* Out-of-band global headers that may be used by some codecs.
|
||||
*
|
||||
* - decoding: Should be set by the caller when available (typically from a
|
||||
* demuxer) before opening the decoder; some decoders require this to be
|
||||
* set and will fail to initialize otherwise.
|
||||
*
|
||||
* The array must be allocated with the av_malloc() family of functions;
|
||||
* allocated size must be at least AV_INPUT_BUFFER_PADDING_SIZE bytes
|
||||
* larger than extradata_size.
|
||||
*
|
||||
* - encoding: May be set by the encoder in avcodec_open2() (possibly
|
||||
* depending on whether the AV_CODEC_FLAG_GLOBAL_HEADER flag is set).
|
||||
*
|
||||
* After being set, the array is owned by the codec and freed in
|
||||
* avcodec_free_context().
|
||||
*/
|
||||
uint8_t *extradata;
|
||||
int extradata_size;
|
||||
@@ -565,23 +550,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
AVRational framerate;
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
/**
|
||||
* For some codecs, the time base is closer to the field rate than the frame rate.
|
||||
* Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
|
||||
* if no telecine is used ...
|
||||
*
|
||||
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
|
||||
*
|
||||
* @deprecated
|
||||
* - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
|
||||
* - encoding: Set AVCodecContext.framerate instead
|
||||
*
|
||||
*/
|
||||
attribute_deprecated
|
||||
int ticks_per_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec delay.
|
||||
*
|
||||
@@ -1648,165 +1616,29 @@ typedef struct AVCodecContext {
|
||||
* See the AV_PROFILE_* defines in defs.h.
|
||||
*/
|
||||
int profile;
|
||||
#if FF_API_FF_PROFILE_LEVEL
|
||||
/** @deprecated The following defines are deprecated; use AV_PROFILE_*
|
||||
* in defs.h instead. */
|
||||
#define FF_PROFILE_UNKNOWN -99
|
||||
#define FF_PROFILE_RESERVED -100
|
||||
|
||||
#define FF_PROFILE_AAC_MAIN 0
|
||||
#define FF_PROFILE_AAC_LOW 1
|
||||
#define FF_PROFILE_AAC_SSR 2
|
||||
#define FF_PROFILE_AAC_LTP 3
|
||||
#define FF_PROFILE_AAC_HE 4
|
||||
#define FF_PROFILE_AAC_HE_V2 28
|
||||
#define FF_PROFILE_AAC_LD 22
|
||||
#define FF_PROFILE_AAC_ELD 38
|
||||
#define FF_PROFILE_MPEG2_AAC_LOW 128
|
||||
#define FF_PROFILE_MPEG2_AAC_HE 131
|
||||
|
||||
#define FF_PROFILE_DNXHD 0
|
||||
#define FF_PROFILE_DNXHR_LB 1
|
||||
#define FF_PROFILE_DNXHR_SQ 2
|
||||
#define FF_PROFILE_DNXHR_HQ 3
|
||||
#define FF_PROFILE_DNXHR_HQX 4
|
||||
#define FF_PROFILE_DNXHR_444 5
|
||||
|
||||
#define FF_PROFILE_DTS 20
|
||||
#define FF_PROFILE_DTS_ES 30
|
||||
#define FF_PROFILE_DTS_96_24 40
|
||||
#define FF_PROFILE_DTS_HD_HRA 50
|
||||
#define FF_PROFILE_DTS_HD_MA 60
|
||||
#define FF_PROFILE_DTS_EXPRESS 70
|
||||
#define FF_PROFILE_DTS_HD_MA_X 61
|
||||
#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
|
||||
|
||||
|
||||
#define FF_PROFILE_EAC3_DDP_ATMOS 30
|
||||
|
||||
#define FF_PROFILE_TRUEHD_ATMOS 30
|
||||
|
||||
#define FF_PROFILE_MPEG2_422 0
|
||||
#define FF_PROFILE_MPEG2_HIGH 1
|
||||
#define FF_PROFILE_MPEG2_SS 2
|
||||
#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
|
||||
#define FF_PROFILE_MPEG2_MAIN 4
|
||||
#define FF_PROFILE_MPEG2_SIMPLE 5
|
||||
|
||||
#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
|
||||
#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
|
||||
|
||||
#define FF_PROFILE_H264_BASELINE 66
|
||||
#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
|
||||
#define FF_PROFILE_H264_MAIN 77
|
||||
#define FF_PROFILE_H264_EXTENDED 88
|
||||
#define FF_PROFILE_H264_HIGH 100
|
||||
#define FF_PROFILE_H264_HIGH_10 110
|
||||
#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
|
||||
#define FF_PROFILE_H264_HIGH_422 122
|
||||
#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_STEREO_HIGH 128
|
||||
#define FF_PROFILE_H264_HIGH_444 144
|
||||
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
|
||||
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_CAVLC_444 44
|
||||
|
||||
#define FF_PROFILE_VC1_SIMPLE 0
|
||||
#define FF_PROFILE_VC1_MAIN 1
|
||||
#define FF_PROFILE_VC1_COMPLEX 2
|
||||
#define FF_PROFILE_VC1_ADVANCED 3
|
||||
|
||||
#define FF_PROFILE_MPEG4_SIMPLE 0
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
|
||||
#define FF_PROFILE_MPEG4_CORE 2
|
||||
#define FF_PROFILE_MPEG4_MAIN 3
|
||||
#define FF_PROFILE_MPEG4_N_BIT 4
|
||||
#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
|
||||
#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
|
||||
#define FF_PROFILE_MPEG4_HYBRID 8
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
|
||||
#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
|
||||
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
|
||||
#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
|
||||
#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
|
||||
|
||||
#define FF_PROFILE_VP9_0 0
|
||||
#define FF_PROFILE_VP9_1 1
|
||||
#define FF_PROFILE_VP9_2 2
|
||||
#define FF_PROFILE_VP9_3 3
|
||||
|
||||
#define FF_PROFILE_HEVC_MAIN 1
|
||||
#define FF_PROFILE_HEVC_MAIN_10 2
|
||||
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
|
||||
#define FF_PROFILE_HEVC_REXT 4
|
||||
#define FF_PROFILE_HEVC_SCC 9
|
||||
|
||||
#define FF_PROFILE_VVC_MAIN_10 1
|
||||
#define FF_PROFILE_VVC_MAIN_10_444 33
|
||||
|
||||
#define FF_PROFILE_AV1_MAIN 0
|
||||
#define FF_PROFILE_AV1_HIGH 1
|
||||
#define FF_PROFILE_AV1_PROFESSIONAL 2
|
||||
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
|
||||
#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
|
||||
|
||||
#define FF_PROFILE_SBC_MSBC 1
|
||||
|
||||
#define FF_PROFILE_PRORES_PROXY 0
|
||||
#define FF_PROFILE_PRORES_LT 1
|
||||
#define FF_PROFILE_PRORES_STANDARD 2
|
||||
#define FF_PROFILE_PRORES_HQ 3
|
||||
#define FF_PROFILE_PRORES_4444 4
|
||||
#define FF_PROFILE_PRORES_XQ 5
|
||||
|
||||
#define FF_PROFILE_ARIB_PROFILE_A 0
|
||||
#define FF_PROFILE_ARIB_PROFILE_C 1
|
||||
|
||||
#define FF_PROFILE_KLVA_SYNC 0
|
||||
#define FF_PROFILE_KLVA_ASYNC 1
|
||||
|
||||
#define FF_PROFILE_EVC_BASELINE 0
|
||||
#define FF_PROFILE_EVC_MAIN 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Encoding level descriptor.
|
||||
* - encoding: Set by user, corresponds to a specific level defined by the
|
||||
* codec, usually corresponding to the profile level, if not specified it
|
||||
* is set to FF_LEVEL_UNKNOWN.
|
||||
* is set to AV_LEVEL_UNKNOWN.
|
||||
* - decoding: Set by libavcodec.
|
||||
* See AV_LEVEL_* in defs.h.
|
||||
*/
|
||||
int level;
|
||||
#if FF_API_FF_PROFILE_LEVEL
|
||||
/** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
|
||||
* in defs.h instead. */
|
||||
#define FF_LEVEL_UNKNOWN -99
|
||||
#endif
|
||||
|
||||
#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.
|
||||
@@ -1895,8 +1727,13 @@ typedef struct AVCodecContext {
|
||||
* For SUBTITLE_ASS subtitle type, it should contain the whole ASS
|
||||
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
|
||||
* the Format line following. It shouldn't include any Dialogue line.
|
||||
* - encoding: Set/allocated/freed by user (before avcodec_open2())
|
||||
* - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
|
||||
*
|
||||
* - encoding: May be set by the caller before avcodec_open2() to an array
|
||||
* allocated with the av_malloc() family of functions.
|
||||
* - decoding: May be set by libavcodec in avcodec_open2().
|
||||
*
|
||||
* After being set, the array is owned by the codec and freed in
|
||||
* avcodec_free_context().
|
||||
*/
|
||||
int subtitle_header_size;
|
||||
uint8_t *subtitle_header;
|
||||
@@ -2380,24 +2217,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
|
||||
*/
|
||||
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
|
||||
|
||||
#if FF_API_AVCODEC_CLOSE
|
||||
/**
|
||||
* Close a given AVCodecContext and free all the data associated with it
|
||||
* (but not the AVCodecContext itself).
|
||||
*
|
||||
* Calling this function on an AVCodecContext that hasn't been opened will free
|
||||
* the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
|
||||
* codec. Subsequent calls will do nothing.
|
||||
*
|
||||
* @deprecated Do not use this function. Use avcodec_free_context() to destroy a
|
||||
* codec context (either open or closed). Opening and closing a codec context
|
||||
* multiple times is not supported anymore -- use multiple codec contexts
|
||||
* instead.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int avcodec_close(AVCodecContext *avctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Free all allocated data in the given subtitle struct.
|
||||
*
|
||||
@@ -3081,7 +2900,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
||||
*
|
||||
* @note for encoders, this function will only do something if the encoder
|
||||
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
|
||||
* will drain any remaining packets, and can then be re-used for a different
|
||||
* will drain any remaining packets, and can then be reused for a different
|
||||
* stream (as opposed to sending a null frame which will leave the encoder
|
||||
* in a permanent EOF state after draining). This can be desirable if the
|
||||
* cost of tearing down and replacing the encoder instance is high.
|
||||
@@ -3116,8 +2935,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
|
||||
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
|
||||
|
||||
/**
|
||||
* @return a positive value if s is open (i.e. avcodec_open2() was called on it
|
||||
* with no corresponding avcodec_close()), 0 otherwise.
|
||||
* @return a positive value if s is open (i.e. avcodec_open2() was called on it),
|
||||
* 0 otherwise.
|
||||
*/
|
||||
int avcodec_is_open(AVCodecContext *s);
|
||||
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
* 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 AVCODEC_AVFFT_H
|
||||
#define AVCODEC_AVFFT_H
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "version_major.h"
|
||||
#if FF_API_AVFFT
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavc_fft
|
||||
* FFT functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lavc_fft FFT functions
|
||||
* @ingroup lavc_misc
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef float FFTSample;
|
||||
|
||||
typedef struct FFTComplex {
|
||||
FFTSample re, im;
|
||||
} FFTComplex;
|
||||
|
||||
typedef struct FFTContext FFTContext;
|
||||
|
||||
/**
|
||||
* Set up a complex FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
|
||||
*/
|
||||
attribute_deprecated
|
||||
FFTContext *av_fft_init(int nbits, int inverse);
|
||||
|
||||
/**
|
||||
* Do the permutation needed BEFORE calling ff_fft_calc().
|
||||
* @deprecated without replacement
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fft_permute(FFTContext *s, FFTComplex *z);
|
||||
|
||||
/**
|
||||
* Do a complex FFT with the parameters defined in av_fft_init(). The
|
||||
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
|
||||
* @deprecated use the av_tx_fn value returned by av_tx_init, which also does permutation
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fft_calc(FFTContext *s, FFTComplex *z);
|
||||
|
||||
attribute_deprecated
|
||||
void av_fft_end(FFTContext *s);
|
||||
|
||||
/**
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
|
||||
* with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
|
||||
*/
|
||||
attribute_deprecated
|
||||
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
|
||||
attribute_deprecated
|
||||
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_mdct_end(FFTContext *s);
|
||||
|
||||
/* Real Discrete Fourier Transform */
|
||||
|
||||
enum RDFTransformType {
|
||||
DFT_R2C,
|
||||
IDFT_C2R,
|
||||
IDFT_R2C,
|
||||
DFT_C2R,
|
||||
};
|
||||
|
||||
typedef struct RDFTContext RDFTContext;
|
||||
|
||||
/**
|
||||
* Set up a real FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param trans the type of transform
|
||||
*
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
|
||||
*/
|
||||
attribute_deprecated
|
||||
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
|
||||
attribute_deprecated
|
||||
void av_rdft_calc(RDFTContext *s, FFTSample *data);
|
||||
attribute_deprecated
|
||||
void av_rdft_end(RDFTContext *s);
|
||||
|
||||
/* Discrete Cosine Transform */
|
||||
|
||||
typedef struct DCTContext DCTContext;
|
||||
|
||||
enum DCTTransformType {
|
||||
DCT_II = 0,
|
||||
DCT_III,
|
||||
DCT_I,
|
||||
DST_I,
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up DCT.
|
||||
*
|
||||
* @param nbits size of the input array:
|
||||
* (1 << nbits) for DCT-II, DCT-III and DST-I
|
||||
* (1 << nbits) + 1 for DCT-I
|
||||
* @param type the type of transform
|
||||
*
|
||||
* @note the first element of the input of DST-I is ignored
|
||||
*
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
|
||||
*/
|
||||
attribute_deprecated
|
||||
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
|
||||
attribute_deprecated
|
||||
void av_dct_calc(DCTContext *s, FFTSample *data);
|
||||
attribute_deprecated
|
||||
void av_dct_end (DCTContext *s);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* FF_API_AVFFT */
|
||||
#endif /* AVCODEC_AVFFT_H */
|
||||
@@ -80,21 +80,6 @@
|
||||
*/
|
||||
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
|
||||
|
||||
#if FF_API_SUBFRAMES
|
||||
/**
|
||||
* Codec can output multiple frames per AVPacket
|
||||
* Normally demuxers return one frame at a time, demuxers which do not do
|
||||
* are connected to a parser to split what they return into proper frames.
|
||||
* This flag is reserved to the very rare category of codecs which have a
|
||||
* bitstream that cannot be split into frames without timeconsuming
|
||||
* operations like full decoding. Demuxers carrying such bitstreams thus
|
||||
* may return multiple frames in a packet. This has many disadvantages like
|
||||
* prohibiting stream copy in many cases thus it should only be considered
|
||||
* as a last resort.
|
||||
*/
|
||||
#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec is experimental and is thus avoided in favor of non experimental
|
||||
* encoders
|
||||
|
||||
@@ -206,7 +206,9 @@ 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,
|
||||
@@ -254,8 +256,10 @@ 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,
|
||||
@@ -322,6 +326,11 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_RTV1,
|
||||
AV_CODEC_ID_VMIX,
|
||||
AV_CODEC_ID_LEAD,
|
||||
AV_CODEC_ID_DNXUC,
|
||||
AV_CODEC_ID_RV60,
|
||||
AV_CODEC_ID_JPEGXL_ANIM,
|
||||
AV_CODEC_ID_APV,
|
||||
AV_CODEC_ID_PRORES_RAW,
|
||||
|
||||
/* various PCM "codecs" */
|
||||
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
||||
@@ -416,6 +425,8 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
|
||||
AV_CODEC_ID_ADPCM_IMA_ACORN,
|
||||
AV_CODEC_ID_ADPCM_XMD,
|
||||
AV_CODEC_ID_ADPCM_IMA_XBOX,
|
||||
AV_CODEC_ID_ADPCM_SANYO,
|
||||
|
||||
/* AMR */
|
||||
AV_CODEC_ID_AMR_NB = 0x12000,
|
||||
@@ -544,6 +555,7 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_OSQ,
|
||||
AV_CODEC_ID_QOA,
|
||||
AV_CODEC_ID_LC3,
|
||||
AV_CODEC_ID_G728,
|
||||
|
||||
/* subtitle codecs */
|
||||
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
|
||||
@@ -573,6 +585,7 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
|
||||
AV_CODEC_ID_TTML,
|
||||
AV_CODEC_ID_ARIB_CAPTION,
|
||||
AV_CODEC_ID_IVTV_VBI,
|
||||
|
||||
/* other specific kind of codecs (generally used for attachments) */
|
||||
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
|
||||
@@ -590,6 +603,7 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_BIN_DATA,
|
||||
AV_CODEC_ID_SMPTE_2038,
|
||||
AV_CODEC_ID_LCEVC,
|
||||
AV_CODEC_ID_SMPTE_436M_ANC,
|
||||
|
||||
|
||||
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
|
||||
|
||||
@@ -148,7 +148,7 @@ typedef struct AVCodecParameters {
|
||||
* durations. Should be set to { 0, 1 } when some frames have differing
|
||||
* durations or if the value is not known.
|
||||
*
|
||||
* @note This field correponds to values that are stored in codec-level
|
||||
* @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.
|
||||
|
||||
130
dep/ffmpeg/include/libavcodec/container_fifo.h
Normal file
130
dep/ffmpeg/include/libavcodec/container_fifo.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* 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_CONTAINER_FIFO_H
|
||||
#define AVUTIL_CONTAINER_FIFO_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* AVContainerFifo is a FIFO for "containers" - dynamically allocated reusable
|
||||
* structs (e.g. AVFrame or AVPacket). AVContainerFifo uses an internal pool of
|
||||
* such containers to avoid allocating and freeing them repeatedly.
|
||||
*/
|
||||
typedef struct AVContainerFifo AVContainerFifo;
|
||||
|
||||
enum AVContainerFifoFlags {
|
||||
/**
|
||||
* Signal to av_container_fifo_write() that it should make a new reference
|
||||
* to data in src rather than consume its contents.
|
||||
*
|
||||
* @note you must handle this flag manually in your own fifo_transfer()
|
||||
* callback
|
||||
*/
|
||||
AV_CONTAINER_FIFO_FLAG_REF = (1 << 0),
|
||||
|
||||
/**
|
||||
* This and all higher bits in flags may be set to any value by the caller
|
||||
* and are guaranteed to be passed through to the fifo_transfer() callback
|
||||
* and not be interpreted by AVContainerFifo code.
|
||||
*/
|
||||
AV_CONTAINER_FIFO_FLAG_USER = (1 << 16),
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocate a new AVContainerFifo for the container type defined by provided
|
||||
* callbacks.
|
||||
*
|
||||
* @param opaque user data that will be passed to the callbacks provided to this
|
||||
* function
|
||||
* @param container_alloc allocate a new container instance and return a pointer
|
||||
* to it, or NULL on failure
|
||||
* @param container_reset reset the provided container instance to a clean state
|
||||
* @param container_free free the provided container instance
|
||||
* @param fifo_transfer Transfer the contents of container src to dst.
|
||||
* @param flags currently unused
|
||||
*
|
||||
* @return newly allocated AVContainerFifo, or NULL on failure
|
||||
*/
|
||||
AVContainerFifo*
|
||||
av_container_fifo_alloc(void *opaque,
|
||||
void* (*container_alloc)(void *opaque),
|
||||
void (*container_reset)(void *opaque, void *obj),
|
||||
void (*container_free) (void *opaque, void *obj),
|
||||
int (*fifo_transfer) (void *opaque, void *dst, void *src, unsigned flags),
|
||||
unsigned flags);
|
||||
|
||||
/**
|
||||
* Allocate an AVContainerFifo instance for AVFrames.
|
||||
*
|
||||
* @param flags currently unused
|
||||
*/
|
||||
AVContainerFifo *av_container_fifo_alloc_avframe(unsigned flags);
|
||||
|
||||
/**
|
||||
* Free a AVContainerFifo and everything in it.
|
||||
*/
|
||||
void av_container_fifo_free(AVContainerFifo **cf);
|
||||
|
||||
/**
|
||||
* Write the contents of obj to the FIFO.
|
||||
*
|
||||
* The fifo_transfer() callback previously provided to av_container_fifo_alloc()
|
||||
* will be called with obj as src in order to perform the actual transfer.
|
||||
*/
|
||||
int av_container_fifo_write(AVContainerFifo *cf, void *obj, unsigned flags);
|
||||
|
||||
/**
|
||||
* Read the next available object from the FIFO into obj.
|
||||
*
|
||||
* The fifo_read() callback previously provided to av_container_fifo_alloc()
|
||||
* will be called with obj as dst in order to perform the actual transfer.
|
||||
*/
|
||||
int av_container_fifo_read(AVContainerFifo *cf, void *obj, unsigned flags);
|
||||
|
||||
/**
|
||||
* Access objects stored in the FIFO without retrieving them. The
|
||||
* fifo_transfer() callback will NOT be invoked and the FIFO state will not be
|
||||
* modified.
|
||||
*
|
||||
* @param pobj Pointer to the object stored in the FIFO will be written here on
|
||||
* success. The object remains owned by the FIFO and the caller may
|
||||
* only access it as long as the FIFO is not modified.
|
||||
* @param offset Position of the object to retrieve - 0 is the next item that
|
||||
* would be read, 1 the one after, etc. Must be smaller than
|
||||
* av_container_fifo_can_read().
|
||||
*
|
||||
* @retval 0 success, a pointer was written into pobj
|
||||
* @retval AVERROR(EINVAL) invalid offset value
|
||||
*/
|
||||
int av_container_fifo_peek(AVContainerFifo *cf, void **pobj, size_t offset);
|
||||
|
||||
/**
|
||||
* Discard the specified number of elements from the FIFO.
|
||||
*
|
||||
* @param nb_elems number of elements to discard, MUST NOT be larger than
|
||||
* av_fifo_can_read(f)
|
||||
*/
|
||||
void av_container_fifo_drain(AVContainerFifo *cf, size_t nb_elems);
|
||||
|
||||
/**
|
||||
* @return number of objects available for reading
|
||||
*/
|
||||
size_t av_container_fifo_can_read(const AVContainerFifo *cf);
|
||||
|
||||
#endif // AVCODEC_CONTAINER_FIFO_H
|
||||
@@ -185,6 +185,9 @@
|
||||
#define AV_PROFILE_PRORES_4444 4
|
||||
#define AV_PROFILE_PRORES_XQ 5
|
||||
|
||||
#define AV_PROFILE_PRORES_RAW 0
|
||||
#define AV_PROFILE_PRORES_RAW_HQ 1
|
||||
|
||||
#define AV_PROFILE_ARIB_PROFILE_A 0
|
||||
#define AV_PROFILE_ARIB_PROFILE_C 1
|
||||
|
||||
@@ -194,6 +197,14 @@
|
||||
#define AV_PROFILE_EVC_BASELINE 0
|
||||
#define AV_PROFILE_EVC_MAIN 1
|
||||
|
||||
#define AV_PROFILE_APV_422_10 33
|
||||
#define AV_PROFILE_APV_422_12 44
|
||||
#define AV_PROFILE_APV_444_10 55
|
||||
#define AV_PROFILE_APV_444_12 66
|
||||
#define AV_PROFILE_APV_4444_10 77
|
||||
#define AV_PROFILE_APV_4444_12 88
|
||||
#define AV_PROFILE_APV_400_10 99
|
||||
|
||||
|
||||
#define AV_LEVEL_UNKNOWN -99
|
||||
|
||||
@@ -325,6 +336,20 @@ typedef struct AVProducerReferenceTime {
|
||||
int flags;
|
||||
} AVProducerReferenceTime;
|
||||
|
||||
/**
|
||||
* RTCP SR (Sender Report) information
|
||||
*
|
||||
* The received sender report information for an RTSP
|
||||
* stream, exposed as AV_PKT_DATA_RTCP_SR side data.
|
||||
*/
|
||||
typedef struct AVRTCPSenderReport {
|
||||
uint32_t ssrc; ///< Synchronization source identifier
|
||||
uint64_t ntp_timestamp; ///< NTP time when the report was sent
|
||||
uint32_t rtp_timestamp; ///< RTP time when the report was sent
|
||||
uint32_t sender_nb_packets; ///< Total number of packets sent
|
||||
uint32_t sender_nb_bytes; ///< Total number of bytes sent (excluding headers or padding)
|
||||
} AVRTCPSenderReport;
|
||||
|
||||
/**
|
||||
* Encode extradata length to a buffer. Used by xiph codecs.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
@@ -18,23 +16,31 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_VERSION_MAJOR_H
|
||||
#define AVFILTER_VERSION_MAJOR_H
|
||||
|
||||
#ifndef AVUTIL_HWCONTEXT_AMF_H
|
||||
#define AVUTIL_HWCONTEXT_AMF_H
|
||||
|
||||
#include "pixfmt.h"
|
||||
#include "hwcontext.h"
|
||||
#include <AMF/core/Factory.h>
|
||||
#include <AMF/core/Context.h>
|
||||
#include <AMF/core/Trace.h>
|
||||
#include <AMF/core/Debug.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavfi
|
||||
* Libavfilter version macros
|
||||
* This struct is allocated as AVHWDeviceContext.hwctx
|
||||
*/
|
||||
typedef struct AVAMFDeviceContext {
|
||||
void * library;
|
||||
AMFFactory *factory;
|
||||
void *trace_writer;
|
||||
|
||||
#define LIBAVFILTER_VERSION_MAJOR 10
|
||||
int64_t version; ///< version of AMF runtime
|
||||
AMFContext *context;
|
||||
AMF_MEMORY_TYPE memory_type;
|
||||
} AVAMFDeviceContext;
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
* dropped at a future version bump. The defines themselves are not part of
|
||||
* the public API and may change, break or disappear at any time.
|
||||
*/
|
||||
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt);
|
||||
enum AVPixelFormat av_amf_to_av_format(enum AMF_SURFACE_FORMAT fmt);
|
||||
|
||||
#define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11)
|
||||
|
||||
#endif /* AVFILTER_VERSION_MAJOR_H */
|
||||
#endif /* AVUTIL_HWCONTEXT_AMF_H */
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* Copyright (c) 2025 Zhao Zhili <quinkblack@foxmail.com>
|
||||
*
|
||||
* 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
|
||||
@@ -18,14 +18,17 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef POSTPROC_VERSION_MAJOR_H
|
||||
#define POSTPROC_VERSION_MAJOR_H
|
||||
#ifndef AVUTIL_HWCONTEXT_OH_H
|
||||
#define AVUTIL_HWCONTEXT_OH_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Libpostproc version macros
|
||||
* OpenHarmony codec device
|
||||
*/
|
||||
typedef struct AVOHCodecDeviceContext {
|
||||
/**
|
||||
* Pointer to OHNativeWindow
|
||||
*/
|
||||
void *native_window;
|
||||
} AVOHCodecDeviceContext;
|
||||
|
||||
#define LIBPOSTPROC_VERSION_MAJOR 58
|
||||
|
||||
#endif /* POSTPROC_VERSION_MAJOR_H */
|
||||
#endif /* AVUTIL_HWCONTEXT_OH_H */
|
||||
@@ -142,7 +142,7 @@ enum AVPacketSideDataType {
|
||||
AV_PKT_DATA_CPB_PROPERTIES,
|
||||
|
||||
/**
|
||||
* Recommmends skipping the specified number of samples
|
||||
* Recommends skipping the specified number of samples
|
||||
* @code
|
||||
* u32le number of samples to skip from start of this packet
|
||||
* u32le number of samples to skip from end of this packet
|
||||
@@ -345,6 +345,23 @@ enum AVPacketSideDataType {
|
||||
*/
|
||||
AV_PKT_DATA_LCEVC,
|
||||
|
||||
/**
|
||||
* This side data contains information about the reference display width(s)
|
||||
* and reference viewing distance(s) as well as information about the
|
||||
* corresponding reference stereo pair(s), i.e., the pair(s) of views to be
|
||||
* displayed for the viewer's left and right eyes on the reference display
|
||||
* at the reference viewing distance.
|
||||
* The payload is the AV3DReferenceDisplaysInfo struct defined in
|
||||
* libavutil/tdrdi.h.
|
||||
*/
|
||||
AV_PKT_DATA_3D_REFERENCE_DISPLAYS,
|
||||
|
||||
/**
|
||||
* Contains the last received RTCP SR (Sender Report) information
|
||||
* in the form of the AVRTCPSenderReport struct.
|
||||
*/
|
||||
AV_PKT_DATA_RTCP_SR,
|
||||
|
||||
/**
|
||||
* The number of side data types.
|
||||
* This is not part of the public API/ABI in the sense that it may
|
||||
@@ -356,10 +373,6 @@ enum AVPacketSideDataType {
|
||||
AV_PKT_DATA_NB
|
||||
};
|
||||
|
||||
#if FF_API_QUALITY_FACTOR
|
||||
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This structure stores auxiliary information for decoding, presenting, or
|
||||
* otherwise processing the coded stream. It is typically exported by demuxers
|
||||
@@ -368,11 +381,11 @@ enum AVPacketSideDataType {
|
||||
*
|
||||
* Global side data is handled as follows:
|
||||
* - During demuxing, it may be exported through
|
||||
* @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
|
||||
* @ref AVCodecParameters.coded_side_data "AVStream's codec parameters", which can
|
||||
* then be passed as input to decoders through the
|
||||
* @ref AVCodecContext.coded_side_data "decoder context's side data", for
|
||||
* initialization.
|
||||
* - For muxing, it can be fed through @ref AVStream.codecpar.side_data
|
||||
* - For muxing, it can be fed through @ref AVCodecParameters.coded_side_data
|
||||
* "AVStream's codec parameters", typically the output of encoders through
|
||||
* the @ref AVCodecContext.coded_side_data "encoder context's side data", for
|
||||
* initialization.
|
||||
@@ -880,6 +893,13 @@ int av_packet_make_writable(AVPacket *pkt);
|
||||
*/
|
||||
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
|
||||
|
||||
/**
|
||||
* Allocate an AVContainerFifo instance for AVPacket.
|
||||
*
|
||||
* @param flags currently unused
|
||||
*/
|
||||
struct AVContainerFifo *av_container_fifo_alloc_avpacket(unsigned flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
297
dep/ffmpeg/include/libavcodec/refstruct.h
Normal file
297
dep/ffmpeg/include/libavcodec/refstruct.h
Normal file
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
* 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_REFSTRUCT_H
|
||||
#define AVUTIL_REFSTRUCT_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* RefStruct is an API for creating reference-counted objects
|
||||
* with minimal overhead. The API is designed for objects,
|
||||
* not buffers like the AVBuffer API. The main differences
|
||||
* to the AVBuffer API are as follows:
|
||||
*
|
||||
* - It uses void* instead of uint8_t* as its base type due to
|
||||
* its focus on objects.
|
||||
* - There are no equivalents of AVBuffer and AVBufferRef.
|
||||
* E.g. there is no way to get the usable size of the object:
|
||||
* The user is supposed to know what is at the other end of
|
||||
* the pointer. It also avoids one level of indirection.
|
||||
* - Custom allocators are not supported. This allows to simplify
|
||||
* the implementation and reduce the amount of allocations.
|
||||
* - It also has the advantage that the user's free callback need
|
||||
* only free the resources owned by the object, but not the
|
||||
* object itself.
|
||||
* - Because referencing (and replacing) an object managed by the
|
||||
* RefStruct API does not involve allocations, they can not fail
|
||||
* and therefore need not be checked.
|
||||
*
|
||||
* @note Referencing and unreferencing the buffers is thread-safe and thus
|
||||
* may be done from multiple threads simultaneously without any need for
|
||||
* additional locking.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This union is used for all opaque parameters in this API to spare the user
|
||||
* to cast const away in case the opaque to use is const-qualified.
|
||||
*
|
||||
* The functions provided by this API with an AVRefStructOpaque come in pairs
|
||||
* named foo_c and foo. The foo function accepts void* as opaque and is just
|
||||
* a wrapper around the foo_c function; "_c" means "(potentially) const".
|
||||
*/
|
||||
typedef union {
|
||||
void *nc;
|
||||
const void *c;
|
||||
} AVRefStructOpaque;
|
||||
|
||||
/**
|
||||
* If this flag is set in av_refstruct_alloc_ext_c(), the object will not
|
||||
* be initially zeroed.
|
||||
*/
|
||||
#define AV_REFSTRUCT_FLAG_NO_ZEROING (1 << 0)
|
||||
|
||||
/**
|
||||
* Allocate a refcounted object of usable size `size` managed via
|
||||
* the RefStruct API.
|
||||
*
|
||||
* By default (in the absence of flags to the contrary),
|
||||
* the returned object is initially zeroed.
|
||||
*
|
||||
* @param size Desired usable size of the returned object.
|
||||
* @param flags A bitwise combination of AV_REFSTRUCT_FLAG_* flags.
|
||||
* @param opaque A pointer that will be passed to the free_cb callback.
|
||||
* @param free_cb A callback for freeing this object's content
|
||||
* when its reference count reaches zero;
|
||||
* it must not free the object itself.
|
||||
* @return A pointer to an object of the desired size or NULL on failure.
|
||||
*/
|
||||
void *av_refstruct_alloc_ext_c(size_t size, unsigned flags, AVRefStructOpaque opaque,
|
||||
void (*free_cb)(AVRefStructOpaque opaque, void *obj));
|
||||
|
||||
/**
|
||||
* A wrapper around av_refstruct_alloc_ext_c() for the common case
|
||||
* of a non-const qualified opaque.
|
||||
*
|
||||
* @see av_refstruct_alloc_ext_c()
|
||||
*/
|
||||
static inline
|
||||
void *av_refstruct_alloc_ext(size_t size, unsigned flags, void *opaque,
|
||||
void (*free_cb)(AVRefStructOpaque opaque, void *obj))
|
||||
{
|
||||
return av_refstruct_alloc_ext_c(size, flags, (AVRefStructOpaque){.nc = opaque},
|
||||
free_cb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Equivalent to av_refstruct_alloc_ext(size, 0, NULL, NULL)
|
||||
*/
|
||||
static inline
|
||||
void *av_refstruct_allocz(size_t size)
|
||||
{
|
||||
return av_refstruct_alloc_ext(size, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrement the reference count of the underlying object and automatically
|
||||
* free the object if there are no more references to it.
|
||||
*
|
||||
* `*objp == NULL` is legal and a no-op.
|
||||
*
|
||||
* @param objp Pointer to a pointer that is either NULL or points to an object
|
||||
* managed via this API. `*objp` is set to NULL on return.
|
||||
*/
|
||||
void av_refstruct_unref(void *objp);
|
||||
|
||||
/**
|
||||
* Create a new reference to an object managed via this API,
|
||||
* i.e. increment the reference count of the underlying object
|
||||
* and return obj.
|
||||
* @return a pointer equal to obj.
|
||||
*/
|
||||
void *av_refstruct_ref(void *obj);
|
||||
|
||||
/**
|
||||
* Analog of av_refstruct_ref(), but for constant objects.
|
||||
* @see av_refstruct_ref()
|
||||
*/
|
||||
const void *av_refstruct_ref_c(const void *obj);
|
||||
|
||||
/**
|
||||
* Ensure `*dstp` refers to the same object as src.
|
||||
*
|
||||
* If `*dstp` is already equal to src, do nothing. Otherwise unreference `*dstp`
|
||||
* and replace it with a new reference to src in case `src != NULL` (this
|
||||
* involves incrementing the reference count of src's underlying object) or
|
||||
* with NULL otherwise.
|
||||
*
|
||||
* @param dstp Pointer to a pointer that is either NULL or points to an object
|
||||
* managed via this API.
|
||||
* @param src A pointer to an object managed via this API or NULL.
|
||||
*/
|
||||
void av_refstruct_replace(void *dstp, const void *src);
|
||||
|
||||
/**
|
||||
* Check whether the reference count of an object managed
|
||||
* via this API is 1.
|
||||
*
|
||||
* @param obj A pointer to an object managed via this API.
|
||||
* @return 1 if the reference count of obj is 1; 0 otherwise.
|
||||
*/
|
||||
int av_refstruct_exclusive(const void *obj);
|
||||
|
||||
/**
|
||||
* AVRefStructPool is an API for a thread-safe pool of objects managed
|
||||
* via the RefStruct API.
|
||||
*
|
||||
* Frequently allocating and freeing large or complicated objects may be slow
|
||||
* and wasteful. This API is meant to solve this in cases when the caller
|
||||
* needs a set of interchangeable objects.
|
||||
*
|
||||
* At the beginning, the user must call allocate the pool via
|
||||
* av_refstruct_pool_alloc() or its analogue av_refstruct_pool_alloc_ext().
|
||||
* Then whenever an object is needed, call av_refstruct_pool_get() to
|
||||
* get a new or reused object from the pool. This new object works in all
|
||||
* aspects the same way as the ones created by av_refstruct_alloc_ext().
|
||||
* However, when the last reference to this object is unreferenced, it is
|
||||
* (optionally) reset and returned to the pool instead of being freed and
|
||||
* will be reused for subsequent av_refstruct_pool_get() calls.
|
||||
*
|
||||
* When the caller is done with the pool and no longer needs to create any new
|
||||
* objects, av_refstruct_pool_uninit() must be called to mark the pool as
|
||||
* freeable. Then entries returned to the pool will then be freed.
|
||||
* Once all the entries are freed, the pool will automatically be freed.
|
||||
*
|
||||
* Allocating and releasing objects with this API is thread-safe as long as
|
||||
* the user-supplied callbacks (if provided) are thread-safe.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The buffer pool. This structure is opaque and not meant to be accessed
|
||||
* directly. It is allocated with the allocators below and freed with
|
||||
* av_refstruct_pool_uninit().
|
||||
*/
|
||||
typedef struct AVRefStructPool AVRefStructPool;
|
||||
|
||||
/**
|
||||
* If this flag is not set, every object in the pool will be zeroed before
|
||||
* the init callback is called or before it is turned over to the user
|
||||
* for the first time if no init callback has been provided.
|
||||
*/
|
||||
#define AV_REFSTRUCT_POOL_FLAG_NO_ZEROING AV_REFSTRUCT_FLAG_NO_ZEROING
|
||||
/**
|
||||
* If this flag is set and both init_cb and reset_cb callbacks are provided,
|
||||
* then reset_cb will be called if init_cb fails.
|
||||
* The object passed to reset_cb will be in the state left by init_cb.
|
||||
*/
|
||||
#define AV_REFSTRUCT_POOL_FLAG_RESET_ON_INIT_ERROR (1 << 16)
|
||||
/**
|
||||
* If this flag is set and both init_cb and free_entry_cb callbacks are
|
||||
* provided, then free_cb will be called if init_cb fails.
|
||||
*
|
||||
* It will be called after reset_cb in case reset_cb and the
|
||||
* AV_REFSTRUCT_POOL_FLAG_RESET_ON_INIT_ERROR flag are also set.
|
||||
*
|
||||
* The object passed to free_cb will be in the state left by
|
||||
* the callbacks applied earlier (init_cb potentially followed by reset_cb).
|
||||
*/
|
||||
#define AV_REFSTRUCT_POOL_FLAG_FREE_ON_INIT_ERROR (1 << 17)
|
||||
/**
|
||||
* If this flag is set, the entries will be zeroed before
|
||||
* being returned to the user (after the init or reset callbacks
|
||||
* have been called (if provided)). Furthermore, to avoid zeroing twice
|
||||
* it also makes the pool behave as if the AV_REFSTRUCT_POOL_FLAG_NO_ZEROING
|
||||
* flag had been provided.
|
||||
*/
|
||||
#define AV_REFSTRUCT_POOL_FLAG_ZERO_EVERY_TIME (1 << 18)
|
||||
|
||||
/**
|
||||
* Equivalent to av_refstruct_pool_alloc(size, flags, NULL, NULL, NULL, NULL, NULL)
|
||||
*/
|
||||
AVRefStructPool *av_refstruct_pool_alloc(size_t size, unsigned flags);
|
||||
|
||||
/**
|
||||
* Allocate an AVRefStructPool, potentially using complex callbacks.
|
||||
*
|
||||
* @param size size of the entries of the pool
|
||||
* @param flags a bitwise combination of AV_REFSTRUCT_POOL_FLAG_* flags
|
||||
* @param opaque A pointer that will be passed to the callbacks below.
|
||||
* @param init A callback that will be called directly after a new entry
|
||||
* has been allocated. obj has already been zeroed unless
|
||||
* the AV_REFSTRUCT_POOL_FLAG_NO_ZEROING flag is in use.
|
||||
* @param reset A callback that will be called after an entry has been
|
||||
* returned to the pool and before it is reused.
|
||||
* @param free_entry A callback that will be called when an entry is freed
|
||||
* after the pool has been marked as to be uninitialized.
|
||||
* @param free A callback that will be called when the pool itself is
|
||||
* freed (after the last entry has been returned and freed).
|
||||
*/
|
||||
AVRefStructPool *av_refstruct_pool_alloc_ext_c(size_t size, unsigned flags,
|
||||
AVRefStructOpaque opaque,
|
||||
int (*init_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*reset_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*free_entry_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*free_cb)(AVRefStructOpaque opaque));
|
||||
|
||||
/**
|
||||
* A wrapper around av_refstruct_pool_alloc_ext_c() for the common case
|
||||
* of a non-const qualified opaque.
|
||||
*
|
||||
* @see av_refstruct_pool_alloc_ext_c()
|
||||
*/
|
||||
static inline
|
||||
AVRefStructPool *av_refstruct_pool_alloc_ext(size_t size, unsigned flags,
|
||||
void *opaque,
|
||||
int (*init_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*reset_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*free_entry_cb)(AVRefStructOpaque opaque, void *obj),
|
||||
void (*free_cb)(AVRefStructOpaque opaque))
|
||||
{
|
||||
return av_refstruct_pool_alloc_ext_c(size, flags, (AVRefStructOpaque){.nc = opaque},
|
||||
init_cb, reset_cb, free_entry_cb, free_cb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an object from the pool, reusing an old one from the pool when
|
||||
* available.
|
||||
*
|
||||
* Every call to this function must happen before av_refstruct_pool_uninit().
|
||||
* Otherwise undefined behaviour may occur.
|
||||
*
|
||||
* @param pool the pool from which to get the object
|
||||
* @return a reference to the object on success, NULL on error.
|
||||
*/
|
||||
void *av_refstruct_pool_get(AVRefStructPool *pool);
|
||||
|
||||
/**
|
||||
* Mark the pool as being available for freeing. It will actually be freed
|
||||
* only once all the allocated buffers associated with the pool are released.
|
||||
* Thus it is safe to call this function while some of the allocated buffers
|
||||
* are still in use.
|
||||
*
|
||||
* It is illegal to try to get a new entry after this function has been called.
|
||||
*
|
||||
* @param poolp pointer to a pointer to either NULL or a pool to be freed.
|
||||
* `*poolp` will be set to NULL.
|
||||
*/
|
||||
static inline void av_refstruct_pool_uninit(AVRefStructPool **poolp)
|
||||
{
|
||||
av_refstruct_unref(poolp);
|
||||
}
|
||||
|
||||
#endif /* AVUTIL_REFSTRUCT_H */
|
||||
254
dep/ffmpeg/include/libavcodec/smpte_436m.h
Normal file
254
dep/ffmpeg/include/libavcodec/smpte_436m.h
Normal file
@@ -0,0 +1,254 @@
|
||||
/*
|
||||
* MXF SMPTE-436M VBI/ANC parsing functions
|
||||
* Copyright (c) 2025 Jacob Lifshay
|
||||
*
|
||||
* 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 AVCODEC_SMPTE_436M_H
|
||||
#define AVCODEC_SMPTE_436M_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Iterator over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data
|
||||
*/
|
||||
typedef struct AVSmpte436mAncIterator {
|
||||
uint16_t anc_packets_left;
|
||||
int size_left;
|
||||
const uint8_t *data_left;
|
||||
} AVSmpte436mAncIterator;
|
||||
|
||||
/**
|
||||
* Wrapping Type from Table 7 (page 13) of:
|
||||
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
||||
*/
|
||||
typedef enum AVSmpte436mWrappingType
|
||||
{
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FRAME = 1,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_1 = 2,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_2 = 3,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_VANC_PROGRESSIVE_FRAME = 4,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FRAME = 0x11,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_1 = 0x12,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_2 = 0x13,
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_HANC_PROGRESSIVE_FRAME = 0x14,
|
||||
/** not a real wrapping type, just here to guarantee the enum is big enough */
|
||||
AV_SMPTE_436M_WRAPPING_TYPE_MAX = 0xFF,
|
||||
} AVSmpte436mWrappingType;
|
||||
|
||||
/**
|
||||
* Payload Sample Coding from Table 4 (page 10) and Table 7 (page 13) of:
|
||||
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
||||
*/
|
||||
typedef enum AVSmpte436mPayloadSampleCoding
|
||||
{
|
||||
/** only used for VBI */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA = 1,
|
||||
/** only used for VBI */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_COLOR_DIFF = 2,
|
||||
/** only used for VBI */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA_AND_COLOR_DIFF = 3,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA = 4,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF = 5,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF = 6,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA = 7,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_COLOR_DIFF = 8,
|
||||
/** used for VBI and ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA_AND_COLOR_DIFF = 9,
|
||||
/** only used for ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_WITH_PARITY_ERROR = 10,
|
||||
/** only used for ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF_WITH_PARITY_ERROR = 11,
|
||||
/** only used for ANC */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF_WITH_PARITY_ERROR = 12,
|
||||
/** not a real sample coding, just here to guarantee the enum is big enough */
|
||||
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_MAX = 0xFF,
|
||||
} AVSmpte436mPayloadSampleCoding;
|
||||
|
||||
/** the payload capacity of AVSmpte291mAnc8bit (and of AVSmpte291mAnc10bit when that gets added) */
|
||||
#define AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY 0xFF
|
||||
|
||||
/**
|
||||
* An ANC packet with an 8-bit payload.
|
||||
* This can be decoded from AVSmpte436mCodedAnc::payload.
|
||||
*
|
||||
* Note: Some ANC packets need a 10-bit payload, if stored in this struct,
|
||||
* the most-significant 2 bits of each sample are discarded.
|
||||
*/
|
||||
typedef struct AVSmpte291mAnc8bit {
|
||||
uint8_t did;
|
||||
uint8_t sdid_or_dbn;
|
||||
uint8_t data_count;
|
||||
uint8_t payload[AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY];
|
||||
uint8_t checksum;
|
||||
} AVSmpte291mAnc8bit;
|
||||
|
||||
/** max number of samples that can be stored in the payload of AVSmpte436mCodedAnc */
|
||||
#define AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY \
|
||||
(AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY + 4) /* 4 for did, sdid_or_dbn, data_count, and checksum */
|
||||
/** max number of bytes that can be stored in the payload of AVSmpte436mCodedAnc */
|
||||
#define AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY (((AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY + 2) / 3) * 4)
|
||||
|
||||
/**
|
||||
* An encoded ANC packet within a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
||||
* The repeated section of Table 7 (page 13) of:
|
||||
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
||||
*/
|
||||
typedef struct AVSmpte436mCodedAnc {
|
||||
uint16_t line_number;
|
||||
AVSmpte436mWrappingType wrapping_type;
|
||||
AVSmpte436mPayloadSampleCoding payload_sample_coding;
|
||||
uint16_t payload_sample_count;
|
||||
uint32_t payload_array_length;
|
||||
/** the payload, has size payload_array_length.
|
||||
* can be decoded into AVSmpte291mAnc8bit
|
||||
*/
|
||||
uint8_t payload[AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY];
|
||||
} AVSmpte436mCodedAnc;
|
||||
|
||||
/**
|
||||
* Validate a AVSmpte436mCodedAnc structure. Doesn't check if the payload is valid.
|
||||
* @param[in] anc ANC packet to validate
|
||||
* @return 0 on success, AVERROR codes otherwise.
|
||||
*/
|
||||
int av_smpte_436m_coded_anc_validate(const AVSmpte436mCodedAnc *anc);
|
||||
|
||||
/**
|
||||
* Encode ANC packets into a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
||||
* @param[in] anc_packet_count number of ANC packets to encode
|
||||
* @param[in] anc_packets the ANC packets to encode
|
||||
* @param[in] size the size of out. ignored if out is NULL.
|
||||
* @param[out] out Output bytes. Doesn't write anything if out is NULL.
|
||||
* @return the number of bytes written on success, AVERROR codes otherwise.
|
||||
* If out is NULL, returns the number of bytes it would have written.
|
||||
*/
|
||||
int av_smpte_436m_anc_encode(uint8_t *out, int size, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
|
||||
|
||||
struct AVPacket;
|
||||
|
||||
/**
|
||||
* Append more ANC packets to a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
||||
* @param[in] anc_packet_count number of ANC packets to encode
|
||||
* @param[in] anc_packets the ANC packets to encode
|
||||
* @param pkt the AVPacket to append to.
|
||||
* it must either be size 0 or contain valid SMPTE_436M_ANC data.
|
||||
* @return 0 on success, AVERROR codes otherwise.
|
||||
*/
|
||||
int av_smpte_436m_anc_append(struct AVPacket *pkt, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
|
||||
|
||||
/**
|
||||
* Set up iteration over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
||||
* @param[in] buf Pointer to the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
|
||||
* @param[in] buf_size Size of the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
|
||||
* @param[out] iter Pointer to the iterator.
|
||||
* @return 0 on success, AVERROR codes otherwise.
|
||||
*/
|
||||
int av_smpte_436m_anc_iter_init(AVSmpte436mAncIterator *iter, const uint8_t *buf, int buf_size);
|
||||
|
||||
/**
|
||||
* Get the next ANC packet from the iterator, advancing the iterator.
|
||||
* @param[in,out] iter Pointer to the iterator.
|
||||
* @param[out] anc The returned ANC packet.
|
||||
* @return 0 on success, AVERROR_EOF when the iterator has reached the end, AVERROR codes otherwise.
|
||||
*/
|
||||
int av_smpte_436m_anc_iter_next(AVSmpte436mAncIterator *iter, AVSmpte436mCodedAnc *anc);
|
||||
|
||||
/**
|
||||
* Get the minimum number of bytes needed to store a AVSmpte436mCodedAnc payload.
|
||||
* @param sample_coding the payload sample coding
|
||||
* @param sample_count the number of samples stored in the payload
|
||||
* @return returns the minimum number of bytes needed, on error returns < 0.
|
||||
* always <= SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY
|
||||
*/
|
||||
int av_smpte_436m_coded_anc_payload_size(AVSmpte436mPayloadSampleCoding sample_coding, uint16_t sample_count);
|
||||
|
||||
/**
|
||||
* Decode a AVSmpte436mCodedAnc payload into AVSmpte291mAnc8bit
|
||||
* @param[in] sample_coding the payload sample coding
|
||||
* @param[in] sample_count the number of samples stored in the payload
|
||||
* @param[in] payload the bytes storing the payload,
|
||||
* the needed size can be obtained from
|
||||
avpriv_smpte_436m_coded_anc_payload_size
|
||||
* @param[in] log_ctx context pointer for av_log
|
||||
* @param[out] out The decoded ANC packet.
|
||||
* @return returns 0 on success, otherwise < 0.
|
||||
*/
|
||||
int av_smpte_291m_anc_8bit_decode(AVSmpte291mAnc8bit *out,
|
||||
AVSmpte436mPayloadSampleCoding sample_coding,
|
||||
uint16_t sample_count,
|
||||
const uint8_t *payload,
|
||||
void *log_ctx);
|
||||
|
||||
/**
|
||||
* Fill in the correct checksum for a AVSmpte291mAnc8bit
|
||||
* @param[in,out] anc The ANC packet.
|
||||
*/
|
||||
void av_smpte_291m_anc_8bit_fill_checksum(AVSmpte291mAnc8bit *anc);
|
||||
|
||||
/**
|
||||
* Compute the sample count needed to encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc payload
|
||||
* @param[in] anc The ANC packet.
|
||||
* @param[in] sample_coding The sample coding.
|
||||
* @param[in] log_ctx context pointer for av_log
|
||||
* @return returns the sample count on success, otherwise < 0.
|
||||
*/
|
||||
int av_smpte_291m_anc_8bit_get_sample_count(const AVSmpte291mAnc8bit *anc,
|
||||
AVSmpte436mPayloadSampleCoding sample_coding,
|
||||
void *log_ctx);
|
||||
|
||||
/**
|
||||
* Encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc
|
||||
* @param[in] line_number the line number the ANC packet is on
|
||||
* @param[in] wrapping_type the wrapping type
|
||||
* @param[in] sample_coding the payload sample coding
|
||||
* @param[in] payload the ANC packet to encode.
|
||||
* @param[in] log_ctx context pointer for av_log
|
||||
* @param[out] out The encoded ANC packet.
|
||||
* @return returns 0 on success, otherwise < 0.
|
||||
*/
|
||||
int av_smpte_291m_anc_8bit_encode(AVSmpte436mCodedAnc *out,
|
||||
uint16_t line_number,
|
||||
AVSmpte436mWrappingType wrapping_type,
|
||||
AVSmpte436mPayloadSampleCoding sample_coding,
|
||||
const AVSmpte291mAnc8bit *payload,
|
||||
void *log_ctx);
|
||||
|
||||
/** AVSmpte291mAnc8bit::did when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
|
||||
#define AV_SMPTE_291M_ANC_DID_CTA_708 0x61
|
||||
|
||||
/** AVSmpte291mAnc8bit::sdid_or_dbn when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
|
||||
#define AV_SMPTE_291M_ANC_SDID_CTA_708 0x1
|
||||
|
||||
/**
|
||||
* Try to decode an ANC packet into EIA-608/CTA-708 data (AV_CODEC_ID_EIA_608). This
|
||||
* @param[in] anc The ANC packet.
|
||||
* @param[in] log_ctx Context pointer for av_log
|
||||
* @param[out] cc_data the buffer to store the extracted EIA-608/CTA-708 data,
|
||||
* you can pass NULL to not store the data.
|
||||
* the required size is 3 * cc_count bytes.
|
||||
* SMPTE_291M_ANC_PAYLOAD_CAPACITY is always enough size.
|
||||
* @return returns cc_count (>= 0) on success, AVERROR(EAGAIN) if it wasn't a CTA-708 ANC packet, < 0 on error.
|
||||
*/
|
||||
int av_smpte_291m_anc_8bit_extract_cta_708(const AVSmpte291mAnc8bit *anc, uint8_t *cc_data, void *log_ctx);
|
||||
|
||||
#endif /* AVCODEC_SMPTE_436M_H */
|
||||
164
dep/ffmpeg/include/libavcodec/tdrdi.h
Normal file
164
dep/ffmpeg/include/libavcodec/tdrdi.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavu_video_3d_reference_displays_info
|
||||
* Spherical video
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_TDRDI_H
|
||||
#define AVUTIL_TDRDI_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavu_video_3d_reference_displays_info 3D Reference Displays Information
|
||||
* @ingroup lavu_video
|
||||
*
|
||||
* The 3D Reference Displays Information describes information about the reference display
|
||||
* width(s) and reference viewing distance(s) as well as information about the corresponding
|
||||
* reference stereo pair(s).
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define AV_TDRDI_MAX_NUM_REF_DISPLAY 32
|
||||
|
||||
/**
|
||||
* This structure describes information about the reference display width(s) and reference
|
||||
* viewing distance(s) as well as information about the corresponding reference stereo pair(s).
|
||||
* See section G.14.3.2.3 of ITU-T H.265 for more information.
|
||||
*
|
||||
* @note The struct must be allocated with av_tdrdi_alloc() and
|
||||
* its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AV3DReferenceDisplaysInfo {
|
||||
/**
|
||||
* The exponent of the maximum allowable truncation error for
|
||||
* {exponent,mantissa}_ref_display_width as given by 2<sup>(-prec_ref_display_width)</sup>.
|
||||
*/
|
||||
uint8_t prec_ref_display_width;
|
||||
|
||||
/**
|
||||
* A flag to indicate the presence of reference viewing distance.
|
||||
* If false, the values of prec_ref_viewing_dist, exponent_ref_viewing_distance,
|
||||
* and mantissa_ref_viewing_distance are undefined.
|
||||
*/
|
||||
uint8_t ref_viewing_distance_flag;
|
||||
|
||||
/**
|
||||
* The exponent of the maximum allowable truncation error for
|
||||
* {exponent,mantissa}_ref_viewing_distance as given by 2<sup>^(-prec_ref_viewing_dist)</sup>.
|
||||
* The value of prec_ref_viewing_dist shall be in the range of 0 to 31, inclusive.
|
||||
*/
|
||||
uint8_t prec_ref_viewing_dist;
|
||||
|
||||
/**
|
||||
* The number of reference displays that are signalled in this struct.
|
||||
* Allowed range is 1 to 32, inclusive.
|
||||
*/
|
||||
uint8_t num_ref_displays;
|
||||
|
||||
/**
|
||||
* Offset in bytes from the beginning of this structure at which the array
|
||||
* of reference displays starts.
|
||||
*/
|
||||
size_t entries_offset;
|
||||
|
||||
/**
|
||||
* Size of each entry in bytes. May not match sizeof(AV3DReferenceDisplay).
|
||||
*/
|
||||
size_t entry_size;
|
||||
} AV3DReferenceDisplaysInfo;
|
||||
|
||||
/**
|
||||
* Data structure for single deference display information.
|
||||
* It is allocated as a part of AV3DReferenceDisplaysInfo and should be retrieved with
|
||||
* av_tdrdi_get_display().
|
||||
*
|
||||
* sizeof(AV3DReferenceDisplay) is not a part of the ABI and new fields may be
|
||||
* added to it.
|
||||
*/
|
||||
typedef struct AV3DReferenceDisplay {
|
||||
/**
|
||||
* The ViewId of the left view of a stereo pair corresponding to the n-th reference display.
|
||||
*/
|
||||
uint16_t left_view_id;
|
||||
|
||||
/**
|
||||
* The ViewId of the left view of a stereo pair corresponding to the n-th reference display.
|
||||
*/
|
||||
uint16_t right_view_id;
|
||||
|
||||
/**
|
||||
* The exponent part of the reference display width of the n-th reference display.
|
||||
*/
|
||||
uint8_t exponent_ref_display_width;
|
||||
|
||||
/**
|
||||
* The mantissa part of the reference display width of the n-th reference display.
|
||||
*/
|
||||
uint8_t mantissa_ref_display_width;
|
||||
|
||||
/**
|
||||
* The exponent part of the reference viewing distance of the n-th reference display.
|
||||
*/
|
||||
uint8_t exponent_ref_viewing_distance;
|
||||
|
||||
/**
|
||||
* The mantissa part of the reference viewing distance of the n-th reference display.
|
||||
*/
|
||||
uint8_t mantissa_ref_viewing_distance;
|
||||
|
||||
/**
|
||||
* An array of flags to indicates that the information about additional horizontal shift of
|
||||
* the left and right views for the n-th reference display is present.
|
||||
*/
|
||||
uint8_t additional_shift_present_flag;
|
||||
|
||||
/**
|
||||
* The recommended additional horizontal shift for a stereo pair corresponding to the n-th
|
||||
* reference baseline and the n-th reference display.
|
||||
*/
|
||||
int16_t num_sample_shift;
|
||||
} AV3DReferenceDisplay;
|
||||
|
||||
static av_always_inline AV3DReferenceDisplay*
|
||||
av_tdrdi_get_display(AV3DReferenceDisplaysInfo *tdrdi, unsigned int idx)
|
||||
{
|
||||
av_assert0(idx < tdrdi->num_ref_displays);
|
||||
return (AV3DReferenceDisplay *)((uint8_t *)tdrdi + tdrdi->entries_offset +
|
||||
idx * tdrdi->entry_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate a AV3DReferenceDisplaysInfo structure and initialize its fields to default
|
||||
* values.
|
||||
*
|
||||
* @return the newly allocated struct or NULL on failure
|
||||
*/
|
||||
AV3DReferenceDisplaysInfo *av_tdrdi_alloc(unsigned int nb_displays, size_t *size);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_TDRDI_H */
|
||||
@@ -93,28 +93,6 @@ typedef struct AVVDPAUContext {
|
||||
AVVDPAU_Render2 render2;
|
||||
} AVVDPAUContext;
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* @brief allocation function for AVVDPAUContext
|
||||
*
|
||||
* Allows extending the struct without breaking API/ABI
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_alloc_vdpaucontext(void);
|
||||
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Associate a VDPAU device with a codec context for hardware acceleration.
|
||||
* This function is meant to be called from the get_format() codec callback,
|
||||
@@ -155,17 +133,6 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
|
||||
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
|
||||
uint32_t *width, uint32_t *height);
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* Allocate an AVVDPAUContext.
|
||||
*
|
||||
* @return Newly-allocated AVVDPAUContext or NULL on failure.
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_vdpau_alloc_context(void);
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* AVCODEC_VDPAU_H */
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 19
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
#define LIBAVCODEC_VERSION_MINOR 11
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* Libavcodec version macros.
|
||||
*/
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 61
|
||||
#define LIBAVCODEC_VERSION_MAJOR 62
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
@@ -37,16 +37,19 @@
|
||||
* at once through the bump. This improves the git bisect-ability of the change.
|
||||
*/
|
||||
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_QUALITY_FACTOR (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#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_NVDEC_OLD_PIX_FMTS (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)
|
||||
|
||||
#endif /* AVCODEC_VERSION_MAJOR_H */
|
||||
|
||||
@@ -1,397 +0,0 @@
|
||||
/*
|
||||
* 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 AVDEVICE_AVDEVICE_H
|
||||
#define AVDEVICE_AVDEVICE_H
|
||||
|
||||
#include "version_major.h"
|
||||
#ifndef HAVE_AV_CONFIG_H
|
||||
/* When included as part of the ffmpeg build, only include the major version
|
||||
* to avoid unnecessary rebuilds. When included externally, keep including
|
||||
* the full version information. */
|
||||
#include "version.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavd
|
||||
* Main libavdevice API header
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lavd libavdevice
|
||||
* Special devices muxing/demuxing library.
|
||||
*
|
||||
* Libavdevice is a complementary library to @ref libavf "libavformat". It
|
||||
* provides various "special" platform-specific muxers and demuxers, e.g. for
|
||||
* grabbing devices, audio capture and playback etc. As a consequence, the
|
||||
* (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
|
||||
* I/O functions). The filename passed to avformat_open_input() often does not
|
||||
* refer to an actually existing file, but has some special device-specific
|
||||
* meaning - e.g. for xcbgrab it is the display name.
|
||||
*
|
||||
* To use libavdevice, simply call avdevice_register_all() to register all
|
||||
* compiled muxers and demuxers. They all use standard libavformat API.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "libavutil/log.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavformat/avformat.h"
|
||||
|
||||
/**
|
||||
* Return the LIBAVDEVICE_VERSION_INT constant.
|
||||
*/
|
||||
unsigned avdevice_version(void);
|
||||
|
||||
/**
|
||||
* Return the libavdevice build-time configuration.
|
||||
*/
|
||||
const char *avdevice_configuration(void);
|
||||
|
||||
/**
|
||||
* Return the libavdevice license.
|
||||
*/
|
||||
const char *avdevice_license(void);
|
||||
|
||||
/**
|
||||
* Initialize libavdevice and register all the input and output devices.
|
||||
*/
|
||||
void avdevice_register_all(void);
|
||||
|
||||
/**
|
||||
* Audio input devices iterator.
|
||||
*
|
||||
* If d is NULL, returns the first registered input audio/video device,
|
||||
* if d is non-NULL, returns the next registered input audio/video device after d
|
||||
* or NULL if d is the last one.
|
||||
*/
|
||||
const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d);
|
||||
|
||||
/**
|
||||
* Video input devices iterator.
|
||||
*
|
||||
* If d is NULL, returns the first registered input audio/video device,
|
||||
* if d is non-NULL, returns the next registered input audio/video device after d
|
||||
* or NULL if d is the last one.
|
||||
*/
|
||||
const AVInputFormat *av_input_video_device_next(const AVInputFormat *d);
|
||||
|
||||
/**
|
||||
* Audio output devices iterator.
|
||||
*
|
||||
* If d is NULL, returns the first registered output audio/video device,
|
||||
* if d is non-NULL, returns the next registered output audio/video device after d
|
||||
* or NULL if d is the last one.
|
||||
*/
|
||||
const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d);
|
||||
|
||||
/**
|
||||
* Video output devices iterator.
|
||||
*
|
||||
* If d is NULL, returns the first registered output audio/video device,
|
||||
* if d is non-NULL, returns the next registered output audio/video device after d
|
||||
* or NULL if d is the last one.
|
||||
*/
|
||||
const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d);
|
||||
|
||||
typedef struct AVDeviceRect {
|
||||
int x; /**< x coordinate of top left corner */
|
||||
int y; /**< y coordinate of top left corner */
|
||||
int width; /**< width */
|
||||
int height; /**< height */
|
||||
} AVDeviceRect;
|
||||
|
||||
/**
|
||||
* Message types used by avdevice_app_to_dev_control_message().
|
||||
*/
|
||||
enum AVAppToDevMessageType {
|
||||
/**
|
||||
* Dummy message.
|
||||
*/
|
||||
AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
|
||||
|
||||
/**
|
||||
* Window size change message.
|
||||
*
|
||||
* Message is sent to the device every time the application changes the size
|
||||
* of the window device renders to.
|
||||
* Message should also be sent right after window is created.
|
||||
*
|
||||
* data: AVDeviceRect: new window size.
|
||||
*/
|
||||
AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
|
||||
|
||||
/**
|
||||
* Repaint request message.
|
||||
*
|
||||
* Message is sent to the device when window has to be repainted.
|
||||
*
|
||||
* data: AVDeviceRect: area required to be repainted.
|
||||
* NULL: whole area is required to be repainted.
|
||||
*/
|
||||
AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),
|
||||
|
||||
/**
|
||||
* Request pause/play.
|
||||
*
|
||||
* Application requests pause/unpause playback.
|
||||
* Mostly usable with devices that have internal buffer.
|
||||
* By default devices are not paused.
|
||||
*
|
||||
* data: NULL
|
||||
*/
|
||||
AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
|
||||
AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
|
||||
AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),
|
||||
|
||||
/**
|
||||
* Volume control message.
|
||||
*
|
||||
* Set volume level. It may be device-dependent if volume
|
||||
* is changed per stream or system wide. Per stream volume
|
||||
* change is expected when possible.
|
||||
*
|
||||
* data: double: new volume with range of 0.0 - 1.0.
|
||||
*/
|
||||
AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
|
||||
|
||||
/**
|
||||
* Mute control messages.
|
||||
*
|
||||
* Change mute state. It may be device-dependent if mute status
|
||||
* is changed per stream or system wide. Per stream mute status
|
||||
* change is expected when possible.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_APP_TO_DEV_MUTE = MKBETAG(' ', 'M', 'U', 'T'),
|
||||
AV_APP_TO_DEV_UNMUTE = MKBETAG('U', 'M', 'U', 'T'),
|
||||
AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),
|
||||
|
||||
/**
|
||||
* Get volume/mute messages.
|
||||
*
|
||||
* Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or
|
||||
* AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
|
||||
AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'),
|
||||
};
|
||||
|
||||
/**
|
||||
* Message types used by avdevice_dev_to_app_control_message().
|
||||
*/
|
||||
enum AVDevToAppMessageType {
|
||||
/**
|
||||
* Dummy message.
|
||||
*/
|
||||
AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
|
||||
|
||||
/**
|
||||
* Create window buffer message.
|
||||
*
|
||||
* Device requests to create a window buffer. Exact meaning is device-
|
||||
* and application-dependent. Message is sent before rendering first
|
||||
* frame and all one-shot initializations should be done here.
|
||||
* Application is allowed to ignore preferred window buffer size.
|
||||
*
|
||||
* @note: Application is obligated to inform about window buffer size
|
||||
* with AV_APP_TO_DEV_WINDOW_SIZE message.
|
||||
*
|
||||
* data: AVDeviceRect: preferred size of the window buffer.
|
||||
* NULL: no preferred size of the window buffer.
|
||||
*/
|
||||
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),
|
||||
|
||||
/**
|
||||
* Prepare window buffer message.
|
||||
*
|
||||
* Device requests to prepare a window buffer for rendering.
|
||||
* Exact meaning is device- and application-dependent.
|
||||
* Message is sent before rendering of each frame.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),
|
||||
|
||||
/**
|
||||
* Display window buffer message.
|
||||
*
|
||||
* Device requests to display a window buffer.
|
||||
* Message is sent when new frame is ready to be displayed.
|
||||
* Usually buffers need to be swapped in handler of this message.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),
|
||||
|
||||
/**
|
||||
* Destroy window buffer message.
|
||||
*
|
||||
* Device requests to destroy a window buffer.
|
||||
* Message is sent when device is about to be destroyed and window
|
||||
* buffer is not required anymore.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'),
|
||||
|
||||
/**
|
||||
* Buffer fullness status messages.
|
||||
*
|
||||
* Device signals buffer overflow/underflow.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'),
|
||||
AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'),
|
||||
|
||||
/**
|
||||
* Buffer readable/writable.
|
||||
*
|
||||
* Device informs that buffer is readable/writable.
|
||||
* When possible, device informs how many bytes can be read/write.
|
||||
*
|
||||
* @warning Device may not inform when number of bytes than can be read/write changes.
|
||||
*
|
||||
* data: int64_t: amount of bytes available to read/write.
|
||||
* NULL: amount of bytes available to read/write is not known.
|
||||
*/
|
||||
AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),
|
||||
AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '),
|
||||
|
||||
/**
|
||||
* Mute state change message.
|
||||
*
|
||||
* Device informs that mute state has changed.
|
||||
*
|
||||
* data: int: 0 for not muted state, non-zero for muted state.
|
||||
*/
|
||||
AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'),
|
||||
|
||||
/**
|
||||
* Volume level change message.
|
||||
*
|
||||
* Device informs that volume level has changed.
|
||||
*
|
||||
* data: double: new volume with range of 0.0 - 1.0.
|
||||
*/
|
||||
AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'),
|
||||
};
|
||||
|
||||
/**
|
||||
* Send control message from application to device.
|
||||
*
|
||||
* @param s device context.
|
||||
* @param type message type.
|
||||
* @param data message data. Exact type depends on message type.
|
||||
* @param data_size size of message data.
|
||||
* @return >= 0 on success, negative on error.
|
||||
* AVERROR(ENOSYS) when device doesn't implement handler of the message.
|
||||
*/
|
||||
int avdevice_app_to_dev_control_message(struct AVFormatContext *s,
|
||||
enum AVAppToDevMessageType type,
|
||||
void *data, size_t data_size);
|
||||
|
||||
/**
|
||||
* Send control message from device to application.
|
||||
*
|
||||
* @param s device context.
|
||||
* @param type message type.
|
||||
* @param data message data. Can be NULL.
|
||||
* @param data_size size of message data.
|
||||
* @return >= 0 on success, negative on error.
|
||||
* AVERROR(ENOSYS) when application doesn't implement handler of the message.
|
||||
*/
|
||||
int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
|
||||
enum AVDevToAppMessageType type,
|
||||
void *data, size_t data_size);
|
||||
|
||||
/**
|
||||
* Structure describes basic parameters of the device.
|
||||
*/
|
||||
typedef struct AVDeviceInfo {
|
||||
char *device_name; /**< device name, format depends on device */
|
||||
char *device_description; /**< human friendly name */
|
||||
enum AVMediaType *media_types; /**< array indicating what media types(s), if any, a device can provide. If null, cannot provide any */
|
||||
int nb_media_types; /**< length of media_types array, 0 if device cannot provide any media types */
|
||||
} AVDeviceInfo;
|
||||
|
||||
/**
|
||||
* List of devices.
|
||||
*/
|
||||
typedef struct AVDeviceInfoList {
|
||||
AVDeviceInfo **devices; /**< list of autodetected devices */
|
||||
int nb_devices; /**< number of autodetected devices */
|
||||
int default_device; /**< index of default device or -1 if no default */
|
||||
} AVDeviceInfoList;
|
||||
|
||||
/**
|
||||
* List devices.
|
||||
*
|
||||
* Returns available device names and their parameters.
|
||||
*
|
||||
* @note: Some devices may accept system-dependent device names that cannot be
|
||||
* autodetected. The list returned by this function cannot be assumed to
|
||||
* be always completed.
|
||||
*
|
||||
* @param s device context.
|
||||
* @param[out] device_list list of autodetected devices.
|
||||
* @return count of autodetected devices, negative on error.
|
||||
*/
|
||||
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
|
||||
|
||||
/**
|
||||
* Convenient function to free result of avdevice_list_devices().
|
||||
*
|
||||
* @param device_list device list to be freed.
|
||||
*/
|
||||
void avdevice_free_list_devices(AVDeviceInfoList **device_list);
|
||||
|
||||
/**
|
||||
* List devices.
|
||||
*
|
||||
* Returns available device names and their parameters.
|
||||
* These are convinient wrappers for avdevice_list_devices().
|
||||
* Device context is allocated and deallocated internally.
|
||||
*
|
||||
* @param device device format. May be NULL if device name is set.
|
||||
* @param device_name device name. May be NULL if device format is set.
|
||||
* @param device_options An AVDictionary filled with device-private options. May be NULL.
|
||||
* The same options must be passed later to avformat_write_header() for output
|
||||
* devices or avformat_open_input() for input devices, or at any other place
|
||||
* that affects device-private options.
|
||||
* @param[out] device_list list of autodetected devices
|
||||
* @return count of autodetected devices, negative on error.
|
||||
* @note device argument takes precedence over device_name when both are set.
|
||||
*/
|
||||
int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name,
|
||||
AVDictionary *device_options, AVDeviceInfoList **device_list);
|
||||
int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name,
|
||||
AVDictionary *device_options, AVDeviceInfoList **device_list);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVDEVICE_AVDEVICE_H */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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 AVDEVICE_VERSION_H
|
||||
#define AVDEVICE_VERSION_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavd
|
||||
* Libavdevice version macros
|
||||
*/
|
||||
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MINOR 3
|
||||
#define LIBAVDEVICE_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
LIBAVDEVICE_VERSION_MICRO)
|
||||
#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
LIBAVDEVICE_VERSION_MICRO)
|
||||
#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
|
||||
|
||||
#define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
|
||||
|
||||
#endif /* AVDEVICE_VERSION_H */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* 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 AVDEVICE_VERSION_MAJOR_H
|
||||
#define AVDEVICE_VERSION_MAJOR_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavd
|
||||
* Libavdevice version macros
|
||||
*/
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MAJOR 61
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
* dropped at a future version bump. The defines themselves are not part of
|
||||
* the public API and may change, break or disappear at any time.
|
||||
*/
|
||||
|
||||
// reminder to remove the bktr device on next major bump
|
||||
#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
|
||||
// reminder to remove the opengl device on next major bump
|
||||
#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
|
||||
// reminder to remove the sdl2 device on next major bump
|
||||
#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
|
||||
|
||||
#endif /* AVDEVICE_VERSION_MAJOR_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,173 +0,0 @@
|
||||
/*
|
||||
* 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 AVFILTER_BUFFERSINK_H
|
||||
#define AVFILTER_BUFFERSINK_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavfi_buffersink
|
||||
* memory buffer sink API for audio and video
|
||||
*/
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavfi_buffersink Buffer sink API
|
||||
* @ingroup lavfi
|
||||
* @{
|
||||
*
|
||||
* The buffersink and abuffersink filters are there to connect filter graphs
|
||||
* to applications. They have a single input, connected to the graph, and no
|
||||
* output. Frames must be extracted using av_buffersink_get_frame() or
|
||||
* av_buffersink_get_samples().
|
||||
*
|
||||
* The format negotiated by the graph during configuration can be obtained
|
||||
* using the accessor functions:
|
||||
* - av_buffersink_get_time_base(),
|
||||
* - av_buffersink_get_format(),
|
||||
* - av_buffersink_get_frame_rate(),
|
||||
* - av_buffersink_get_w(),
|
||||
* - av_buffersink_get_h(),
|
||||
* - av_buffersink_get_sample_aspect_ratio(),
|
||||
* - av_buffersink_get_channels(),
|
||||
* - av_buffersink_get_ch_layout(),
|
||||
* - av_buffersink_get_sample_rate().
|
||||
*
|
||||
* The layout returned by av_buffersink_get_ch_layout() must de uninitialized
|
||||
* by the caller.
|
||||
*
|
||||
* The format can be constrained by setting options, using av_opt_set() and
|
||||
* related functions with the AV_OPT_SEARCH_CHILDREN flag.
|
||||
* - pix_fmts (int list),
|
||||
* - color_spaces (int list),
|
||||
* - color_ranges (int list),
|
||||
* - sample_fmts (int list),
|
||||
* - sample_rates (int list),
|
||||
* - ch_layouts (string),
|
||||
* - channel_counts (int list),
|
||||
* - all_channel_counts (bool).
|
||||
* Most of these options are of type binary, and should be set using
|
||||
* av_opt_set_int_list() or av_opt_set_bin(). If they are not set, all
|
||||
* corresponding formats are accepted.
|
||||
*
|
||||
* As a special case, if ch_layouts is not set, all valid channel layouts are
|
||||
* accepted except for UNSPEC layouts, unless all_channel_counts is set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get a frame with filtered data from sink and put it in frame.
|
||||
*
|
||||
* @param ctx pointer to a buffersink or abuffersink filter context.
|
||||
* @param frame pointer to an allocated frame that will be filled with data.
|
||||
* The data must be freed using av_frame_unref() / av_frame_free()
|
||||
* @param flags a combination of AV_BUFFERSINK_FLAG_* flags
|
||||
*
|
||||
* @return >= 0 in for success, a negative AVERROR code for failure.
|
||||
*/
|
||||
int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags);
|
||||
|
||||
/**
|
||||
* Tell av_buffersink_get_buffer_ref() to read video/samples buffer
|
||||
* reference, but not remove it from the buffer. This is useful if you
|
||||
* need only to read a video/samples buffer, without to fetch it.
|
||||
*/
|
||||
#define AV_BUFFERSINK_FLAG_PEEK 1
|
||||
|
||||
/**
|
||||
* Tell av_buffersink_get_buffer_ref() not to request a frame from its input.
|
||||
* If a frame is already buffered, it is read (and removed from the buffer),
|
||||
* but if no frame is present, return AVERROR(EAGAIN).
|
||||
*/
|
||||
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
|
||||
|
||||
/**
|
||||
* Set the frame size for an audio buffer sink.
|
||||
*
|
||||
* All calls to av_buffersink_get_buffer_ref will return a buffer with
|
||||
* exactly the specified number of samples, or AVERROR(EAGAIN) if there is
|
||||
* not enough. The last buffer at EOF will be padded with 0.
|
||||
*/
|
||||
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);
|
||||
|
||||
/**
|
||||
* @defgroup lavfi_buffersink_accessors Buffer sink accessors
|
||||
* Get the properties of the stream
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum AVMediaType av_buffersink_get_type (const AVFilterContext *ctx);
|
||||
AVRational av_buffersink_get_time_base (const AVFilterContext *ctx);
|
||||
int av_buffersink_get_format (const AVFilterContext *ctx);
|
||||
|
||||
AVRational av_buffersink_get_frame_rate (const AVFilterContext *ctx);
|
||||
int av_buffersink_get_w (const AVFilterContext *ctx);
|
||||
int av_buffersink_get_h (const AVFilterContext *ctx);
|
||||
AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx);
|
||||
enum AVColorSpace av_buffersink_get_colorspace (const AVFilterContext *ctx);
|
||||
enum AVColorRange av_buffersink_get_color_range (const AVFilterContext *ctx);
|
||||
|
||||
int av_buffersink_get_channels (const AVFilterContext *ctx);
|
||||
int av_buffersink_get_ch_layout (const AVFilterContext *ctx,
|
||||
AVChannelLayout *ch_layout);
|
||||
int av_buffersink_get_sample_rate (const AVFilterContext *ctx);
|
||||
|
||||
AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* Get a frame with filtered data from sink and put it in frame.
|
||||
*
|
||||
* @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
|
||||
* @param frame pointer to an allocated frame that will be filled with data.
|
||||
* The data must be freed using av_frame_unref() / av_frame_free()
|
||||
*
|
||||
* @return
|
||||
* - >= 0 if a frame was successfully returned.
|
||||
* - AVERROR(EAGAIN) if no frames are available at this point; more
|
||||
* input frames must be added to the filtergraph to get more output.
|
||||
* - AVERROR_EOF if there will be no more output frames on this sink.
|
||||
* - A different negative AVERROR code in other failure cases.
|
||||
*/
|
||||
int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Same as av_buffersink_get_frame(), but with the ability to specify the number
|
||||
* of samples read. This function is less efficient than
|
||||
* av_buffersink_get_frame(), because it copies the data around.
|
||||
*
|
||||
* @param ctx pointer to a context of the abuffersink AVFilter.
|
||||
* @param frame pointer to an allocated frame that will be filled with data.
|
||||
* The data must be freed using av_frame_unref() / av_frame_free()
|
||||
* frame will contain exactly nb_samples audio samples, except at
|
||||
* the end of stream, when it can contain less than nb_samples.
|
||||
*
|
||||
* @return The return codes have the same meaning as for
|
||||
* av_buffersink_get_frame().
|
||||
*
|
||||
* @warning do not mix this function with av_buffersink_get_frame(). Use only one or
|
||||
* the other with a single sink, not both.
|
||||
*/
|
||||
int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVFILTER_BUFFERSINK_H */
|
||||
@@ -1,215 +0,0 @@
|
||||
/*
|
||||
* 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 AVFILTER_BUFFERSRC_H
|
||||
#define AVFILTER_BUFFERSRC_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavfi_buffersrc
|
||||
* Memory buffer source API.
|
||||
*/
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavfi_buffersrc Buffer source API
|
||||
* @ingroup lavfi
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum {
|
||||
|
||||
/**
|
||||
* Do not check for format changes.
|
||||
*/
|
||||
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,
|
||||
|
||||
/**
|
||||
* Immediately push the frame to the output.
|
||||
*/
|
||||
AV_BUFFERSRC_FLAG_PUSH = 4,
|
||||
|
||||
/**
|
||||
* Keep a reference to the frame.
|
||||
* If the frame if reference-counted, create a new reference; otherwise
|
||||
* copy the frame data.
|
||||
*/
|
||||
AV_BUFFERSRC_FLAG_KEEP_REF = 8,
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the number of failed requests.
|
||||
*
|
||||
* A failed request is when the request_frame method is called while no
|
||||
* frame is present in the buffer.
|
||||
* The number is reset when a frame is added.
|
||||
*/
|
||||
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);
|
||||
|
||||
/**
|
||||
* This structure contains the parameters describing the frames that will be
|
||||
* passed to this filter.
|
||||
*
|
||||
* It should be allocated with av_buffersrc_parameters_alloc() and freed with
|
||||
* av_free(). All the allocated fields in it remain owned by the caller.
|
||||
*/
|
||||
typedef struct AVBufferSrcParameters {
|
||||
/**
|
||||
* video: the pixel format, value corresponds to enum AVPixelFormat
|
||||
* audio: the sample format, value corresponds to enum AVSampleFormat
|
||||
*/
|
||||
int format;
|
||||
/**
|
||||
* The timebase to be used for the timestamps on the input frames.
|
||||
*/
|
||||
AVRational time_base;
|
||||
|
||||
/**
|
||||
* Video only, the display dimensions of the input frames.
|
||||
*/
|
||||
int width, height;
|
||||
|
||||
/**
|
||||
* Video only, the sample (pixel) aspect ratio.
|
||||
*/
|
||||
AVRational sample_aspect_ratio;
|
||||
|
||||
/**
|
||||
* Video only, the frame rate of the input video. This field must only be
|
||||
* set to a non-zero value if input stream has a known constant framerate
|
||||
* and should be left at its initial value if the framerate is variable or
|
||||
* unknown.
|
||||
*/
|
||||
AVRational frame_rate;
|
||||
|
||||
/**
|
||||
* Video with a hwaccel pixel format only. This should be a reference to an
|
||||
* AVHWFramesContext instance describing the input frames.
|
||||
*/
|
||||
AVBufferRef *hw_frames_ctx;
|
||||
|
||||
/**
|
||||
* Audio only, the audio sampling rate in samples per second.
|
||||
*/
|
||||
int sample_rate;
|
||||
|
||||
/**
|
||||
* Audio only, the audio channel layout
|
||||
*/
|
||||
AVChannelLayout ch_layout;
|
||||
|
||||
/**
|
||||
* Video only, the YUV colorspace and range.
|
||||
*/
|
||||
enum AVColorSpace color_space;
|
||||
enum AVColorRange color_range;
|
||||
} AVBufferSrcParameters;
|
||||
|
||||
/**
|
||||
* Allocate a new AVBufferSrcParameters instance. It should be freed by the
|
||||
* caller with av_free().
|
||||
*/
|
||||
AVBufferSrcParameters *av_buffersrc_parameters_alloc(void);
|
||||
|
||||
/**
|
||||
* Initialize the buffersrc or abuffersrc filter with the provided parameters.
|
||||
* This function may be called multiple times, the later calls override the
|
||||
* previous ones. Some of the parameters may also be set through AVOptions, then
|
||||
* whatever method is used last takes precedence.
|
||||
*
|
||||
* @param ctx an instance of the buffersrc or abuffersrc filter
|
||||
* @param param the stream parameters. The frames later passed to this filter
|
||||
* must conform to those parameters. All the allocated fields in
|
||||
* param remain owned by the caller, libavfilter will make internal
|
||||
* copies or references when necessary.
|
||||
* @return 0 on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param);
|
||||
|
||||
/**
|
||||
* Add a frame to the buffer source.
|
||||
*
|
||||
* @param ctx an instance of the buffersrc filter
|
||||
* @param frame frame to be added. If the frame is reference counted, this
|
||||
* function will make a new reference to it. Otherwise the frame data will be
|
||||
* copied.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error
|
||||
*
|
||||
* This function is equivalent to av_buffersrc_add_frame_flags() with the
|
||||
* AV_BUFFERSRC_FLAG_KEEP_REF flag.
|
||||
*/
|
||||
av_warn_unused_result
|
||||
int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Add a frame to the buffer source.
|
||||
*
|
||||
* @param ctx an instance of the buffersrc filter
|
||||
* @param frame frame to be added. If the frame is reference counted, this
|
||||
* function will take ownership of the reference(s) and reset the frame.
|
||||
* Otherwise the frame data will be copied. If this function returns an error,
|
||||
* the input frame is not touched.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error.
|
||||
*
|
||||
* @note the difference between this function and av_buffersrc_write_frame() is
|
||||
* that av_buffersrc_write_frame() creates a new reference to the input frame,
|
||||
* while this function takes ownership of the reference passed to it.
|
||||
*
|
||||
* This function is equivalent to av_buffersrc_add_frame_flags() without the
|
||||
* AV_BUFFERSRC_FLAG_KEEP_REF flag.
|
||||
*/
|
||||
av_warn_unused_result
|
||||
int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Add a frame to the buffer source.
|
||||
*
|
||||
* By default, if the frame is reference-counted, this function will take
|
||||
* ownership of the reference(s) and reset the frame. This can be controlled
|
||||
* using the flags.
|
||||
*
|
||||
* If this function returns an error, the input frame is not touched.
|
||||
*
|
||||
* @param buffer_src pointer to a buffer source context
|
||||
* @param frame a frame, or NULL to mark EOF
|
||||
* @param flags a combination of AV_BUFFERSRC_FLAG_*
|
||||
* @return >= 0 in case of success, a negative AVERROR code
|
||||
* in case of failure
|
||||
*/
|
||||
av_warn_unused_result
|
||||
int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,
|
||||
AVFrame *frame, int flags);
|
||||
|
||||
/**
|
||||
* Close the buffer source after EOF.
|
||||
*
|
||||
* This is similar to passing NULL to av_buffersrc_add_frame_flags()
|
||||
* except it takes the timestamp of the EOF, i.e. the timestamp of the end
|
||||
* of the last frame.
|
||||
*/
|
||||
int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVFILTER_BUFFERSRC_H */
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* 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 AVFILTER_VERSION_H
|
||||
#define AVFILTER_VERSION_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavfi
|
||||
* Libavfilter version macros
|
||||
*/
|
||||
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MINOR 4
|
||||
#define LIBAVFILTER_VERSION_MICRO 100
|
||||
|
||||
|
||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||
LIBAVFILTER_VERSION_MINOR, \
|
||||
LIBAVFILTER_VERSION_MICRO)
|
||||
#define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
|
||||
LIBAVFILTER_VERSION_MINOR, \
|
||||
LIBAVFILTER_VERSION_MICRO)
|
||||
#define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
|
||||
|
||||
#define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
|
||||
|
||||
#endif /* AVFILTER_VERSION_H */
|
||||
@@ -146,8 +146,8 @@
|
||||
* consumed). The calling program can handle such unrecognized options as it
|
||||
* wishes, e.g.
|
||||
* @code
|
||||
* AVDictionaryEntry *e;
|
||||
* if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
|
||||
* const AVDictionaryEntry *e;
|
||||
* if ((e = av_dict_iterate(options, NULL))) {
|
||||
* fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key);
|
||||
* abort();
|
||||
* }
|
||||
@@ -459,7 +459,7 @@ typedef struct AVProbeData {
|
||||
#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
|
||||
|
||||
#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension
|
||||
#define AVPROBE_SCORE_MIME 75 ///< score for file mime type
|
||||
#define AVPROBE_SCORE_MIME_BONUS 30 ///< score added for matching mime type
|
||||
#define AVPROBE_SCORE_MAX 100 ///< maximum score
|
||||
|
||||
#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
|
||||
@@ -470,8 +470,7 @@ typedef struct AVProbeData {
|
||||
/**
|
||||
* The muxer/demuxer is experimental and should be used with caution.
|
||||
*
|
||||
* - demuxers: will not be selected automatically by probing, must be specified
|
||||
* explicitly.
|
||||
* It will not be selected automatically, and must be specified explicitly.
|
||||
*/
|
||||
#define AVFMT_EXPERIMENTAL 0x0004
|
||||
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
|
||||
@@ -485,9 +484,6 @@ typedef struct AVProbeData {
|
||||
#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
|
||||
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */
|
||||
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */
|
||||
#if FF_API_ALLOW_FLUSH
|
||||
#define AVFMT_ALLOW_FLUSH 0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
|
||||
#endif
|
||||
#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
|
||||
increasing timestamps, but they must
|
||||
still be monotonic */
|
||||
@@ -847,38 +843,6 @@ typedef struct AVStream {
|
||||
*/
|
||||
AVPacket attached_pic;
|
||||
|
||||
#if FF_API_AVSTREAM_SIDE_DATA
|
||||
/**
|
||||
* An array of side data that applies to the whole stream (i.e. the
|
||||
* container does not allow it to change between packets).
|
||||
*
|
||||
* There may be no overlap between the side data in this array and side data
|
||||
* in the packets. I.e. a given side data is either exported by the muxer
|
||||
* (demuxing) / set by the caller (muxing) in this array, then it never
|
||||
* appears in the packets, or the side data is exported / sent through
|
||||
* the packets (always in the first packet where the value becomes known or
|
||||
* changes), then it does not appear in this array.
|
||||
*
|
||||
* - demuxing: Set by libavformat when the stream is created.
|
||||
* - muxing: May be set by the caller before avformat_write_header().
|
||||
*
|
||||
* Freed by libavformat in avformat_free_context().
|
||||
*
|
||||
* @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
|
||||
* "codecpar side data".
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVPacketSideData *side_data;
|
||||
/**
|
||||
* The number of elements in the AVStream.side_data array.
|
||||
*
|
||||
* @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
|
||||
* "codecpar side data".
|
||||
*/
|
||||
attribute_deprecated
|
||||
int nb_side_data;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Flags indicating events happening on the stream, a combination of
|
||||
* AVSTREAM_EVENT_FLAG_*.
|
||||
@@ -962,7 +926,7 @@ typedef struct AVStream {
|
||||
* the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512",
|
||||
* etc.
|
||||
*
|
||||
* The following is an example of a canvas with overlaping tiles:
|
||||
* The following is an example of a canvas with overlapping tiles:
|
||||
*
|
||||
* +-----------+
|
||||
* | %%%%% |
|
||||
@@ -1082,6 +1046,19 @@ typedef struct AVStreamGroupTileGrid {
|
||||
* final image before presentation.
|
||||
*/
|
||||
int height;
|
||||
|
||||
/**
|
||||
* Additional data associated with the grid.
|
||||
*
|
||||
* Should be allocated with av_packet_side_data_new() or
|
||||
* av_packet_side_data_add(), and will be freed by avformat_free_context().
|
||||
*/
|
||||
AVPacketSideData *coded_side_data;
|
||||
|
||||
/**
|
||||
* Amount of entries in @ref coded_side_data.
|
||||
*/
|
||||
int nb_coded_side_data;
|
||||
} AVStreamGroupTileGrid;
|
||||
|
||||
/**
|
||||
@@ -1443,7 +1420,7 @@ typedef struct AVFormatContext {
|
||||
#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
|
||||
#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
|
||||
#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
|
||||
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
|
||||
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
|
||||
#define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible
|
||||
#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
|
||||
#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted
|
||||
@@ -1457,9 +1434,6 @@ typedef struct AVFormatContext {
|
||||
#define AVFMT_FLAG_BITEXACT 0x0400
|
||||
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
|
||||
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
|
||||
#if FF_API_LAVF_SHORTEST
|
||||
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
|
||||
#endif
|
||||
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
|
||||
|
||||
/**
|
||||
@@ -1696,7 +1670,7 @@ typedef struct AVFormatContext {
|
||||
int use_wallclock_as_timestamps;
|
||||
|
||||
/**
|
||||
* Skip duration calcuation in estimate_timings_from_pts.
|
||||
* Skip duration calculation in estimate_timings_from_pts.
|
||||
* - encoding: unused
|
||||
* - decoding: set by user
|
||||
*
|
||||
@@ -1799,7 +1773,7 @@ typedef struct AVFormatContext {
|
||||
|
||||
/**
|
||||
* IO repositioned flag.
|
||||
* This is set by avformat when the underlaying IO context read pointer
|
||||
* This is set by avformat when the underlying IO context read pointer
|
||||
* is repositioned, for example when doing byte based seeking.
|
||||
* Demuxers can use the flag to detect such changes.
|
||||
*/
|
||||
@@ -1895,10 +1869,6 @@ typedef struct AVFormatContext {
|
||||
/**
|
||||
* A callback for closing the streams opened with AVFormatContext.io_open().
|
||||
*
|
||||
* Using this is preferred over io_close, because this can return an error.
|
||||
* Therefore this callback is used instead of io_close by the generic
|
||||
* libavformat code if io_close is NULL or the default.
|
||||
*
|
||||
* @param s the format context
|
||||
* @param pb IO context to be closed and freed
|
||||
* @return 0 on success, a negative AVERROR code on failure
|
||||
@@ -1916,29 +1886,6 @@ typedef struct AVFormatContext {
|
||||
int64_t duration_probesize;
|
||||
} AVFormatContext;
|
||||
|
||||
/**
|
||||
* This function will cause global side data to be injected in the next packet
|
||||
* of each stream as well as after any subsequent seek.
|
||||
*
|
||||
* @note global side data is always available in every AVStream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
|
||||
* in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
|
||||
* initialized with said stream's codecpar.
|
||||
* @see av_packet_side_data_get()
|
||||
*/
|
||||
void av_format_inject_global_side_data(AVFormatContext *s);
|
||||
|
||||
#if FF_API_GET_DUR_ESTIMATE_METHOD
|
||||
/**
|
||||
* Returns the method used to set ctx->duration.
|
||||
*
|
||||
* @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
|
||||
* @deprecated duration_estimation_method is public and can be read directly.
|
||||
*/
|
||||
attribute_deprecated
|
||||
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup lavf_core Core functions
|
||||
* @ingroup libavf
|
||||
@@ -2116,57 +2063,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
|
||||
*/
|
||||
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
|
||||
|
||||
#if FF_API_AVSTREAM_SIDE_DATA
|
||||
/**
|
||||
* Wrap an existing array as stream side data.
|
||||
*
|
||||
* @param st stream
|
||||
* @param type side information type
|
||||
* @param data the side data array. It must be allocated with the av_malloc()
|
||||
* family of functions. The ownership of the data is transferred to
|
||||
* st.
|
||||
* @param size side information size
|
||||
*
|
||||
* @return zero on success, a negative AVERROR code on failure. On failure,
|
||||
* the stream is unchanged and the data remains owned by the caller.
|
||||
* @deprecated use av_packet_side_data_add() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
|
||||
uint8_t *data, size_t size);
|
||||
|
||||
/**
|
||||
* Allocate new information from stream.
|
||||
*
|
||||
* @param stream stream
|
||||
* @param type desired side information type
|
||||
* @param size side information size
|
||||
*
|
||||
* @return pointer to fresh allocated data or NULL otherwise
|
||||
* @deprecated use av_packet_side_data_new() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint8_t *av_stream_new_side_data(AVStream *stream,
|
||||
enum AVPacketSideDataType type, size_t size);
|
||||
/**
|
||||
* Get side information from stream.
|
||||
*
|
||||
* @param stream stream
|
||||
* @param type desired side information type
|
||||
* @param size If supplied, *size will be set to the size of the side data
|
||||
* or to zero if the desired side data is not present.
|
||||
*
|
||||
* @return pointer to data if present or NULL otherwise
|
||||
* @deprecated use av_packet_side_data_get() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint8_t *av_stream_get_side_data(const AVStream *stream,
|
||||
enum AVPacketSideDataType type, size_t *size);
|
||||
#endif
|
||||
|
||||
AVProgram *av_new_program(AVFormatContext *s, int id);
|
||||
|
||||
/**
|
||||
@@ -2275,7 +2171,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
|
||||
* which case an AVFormatContext is allocated by this
|
||||
* function and written into ps.
|
||||
* Note that a user-supplied AVFormatContext will be freed
|
||||
* on failure.
|
||||
* on failure and its pointer set to NULL.
|
||||
* @param url URL of the stream to open.
|
||||
* @param fmt If non-NULL, this parameter forces a specific input format.
|
||||
* Otherwise the format is autodetected.
|
||||
@@ -2284,7 +2180,8 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
|
||||
* On return this parameter will be destroyed and replaced with
|
||||
* a dict containing options that were not found. May be NULL.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on failure.
|
||||
* @return 0 on success; on failure: frees ps, sets its pointer to NULL,
|
||||
* and returns a negative AVERROR.
|
||||
*
|
||||
* @note If you want to use custom IO, preallocate the format context and set its pb field.
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 7
|
||||
#define LIBAVFORMAT_VERSION_MINOR 3
|
||||
#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 61
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 62
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
@@ -41,13 +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 < 62)
|
||||
#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_GET_DUR_ESTIMATE_METHOD (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_NO_DEFAULT_TLS_VERIFY (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_R_FRAME_RATE 1
|
||||
|
||||
|
||||
@@ -159,9 +159,11 @@
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define av_builtin_constant_p __builtin_constant_p
|
||||
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
|
||||
# define av_scanf_format(fmtpos, attrpos) __attribute__((__format__(__scanf__, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_builtin_constant_p(x) 0
|
||||
# define av_printf_format(fmtpos, attrpos)
|
||||
# define av_scanf_format(fmtpos, attrpos)
|
||||
#endif
|
||||
|
||||
#if AV_GCC_VERSION_AT_LEAST(2,5) || defined(__clang__)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "attributes.h"
|
||||
#include "log.h"
|
||||
#include "macros.h"
|
||||
|
||||
@@ -75,4 +76,48 @@
|
||||
*/
|
||||
void av_assert0_fpu(void);
|
||||
|
||||
/**
|
||||
* Asserts that are used as compiler optimization hints depending
|
||||
* upon ASSERT_LEVEL and NBDEBUG.
|
||||
*
|
||||
* Undefined behaviour occurs if execution reaches a point marked
|
||||
* with av_unreachable() or if a condition used with av_assume()
|
||||
* is false.
|
||||
*
|
||||
* The condition used with av_assume() should not have side-effects
|
||||
* and should be visible to the compiler.
|
||||
*/
|
||||
#if defined(ASSERT_LEVEL) ? ASSERT_LEVEL > 0 : !defined(HAVE_AV_CONFIG_H) && !defined(NDEBUG)
|
||||
#define av_unreachable(msg) \
|
||||
do { \
|
||||
av_log(NULL, AV_LOG_PANIC, \
|
||||
"Reached supposedly unreachable code at %s:%d: %s\n", \
|
||||
__FILE__, __LINE__, msg); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
#define av_assume(cond) av_assert0(cond)
|
||||
#else
|
||||
#if AV_GCC_VERSION_AT_LEAST(4, 5) || AV_HAS_BUILTIN(__builtin_unreachable)
|
||||
#define av_unreachable(msg) __builtin_unreachable()
|
||||
#elif defined(_MSC_VER)
|
||||
#define av_unreachable(msg) __assume(0)
|
||||
#elif __STDC_VERSION__ >= 202311L
|
||||
#include <stddef.h>
|
||||
#define av_unreachable(msg) unreachable()
|
||||
#else
|
||||
#define av_unreachable(msg) ((void)0)
|
||||
#endif
|
||||
|
||||
#if AV_HAS_BUILTIN(__builtin_assume)
|
||||
#define av_assume(cond) __builtin_assume(cond)
|
||||
#elif defined(_MSC_VER)
|
||||
#define av_assume(cond) __assume(cond)
|
||||
#else
|
||||
#define av_assume(cond) do { \
|
||||
if (!(cond)) \
|
||||
av_unreachable(); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_AVASSERT_H */
|
||||
|
||||
@@ -419,7 +419,7 @@ int av_match_list(const char *name, const char *list, char separator);
|
||||
* See libc sscanf manual for more information.
|
||||
* Locale-independent sscanf implementation.
|
||||
*/
|
||||
int av_sscanf(const char *string, const char *format, ...);
|
||||
int av_sscanf(const char *string, const char *format, ...) av_scanf_format(2, 3);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
* @li @ref lavd "libavdevice" special devices muxing/demuxing library
|
||||
* @li @ref lavu "libavutil" common utility library
|
||||
* @li @ref lswr "libswresample" audio resampling, format conversion and mixing
|
||||
* @li @ref lpp "libpostproc" post processing library
|
||||
* @li @ref libsws "libswscale" color conversion and scaling library
|
||||
*
|
||||
* @section ffmpeg_versioning Versioning and compatibility
|
||||
@@ -314,6 +313,7 @@ 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.
|
||||
*
|
||||
@@ -322,6 +322,7 @@ static inline void *av_x_if_null(const void *p, const void *x)
|
||||
* @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;
|
||||
|
||||
@@ -334,6 +335,7 @@ unsigned av_int_list_length_for_size(unsigned elsize,
|
||||
*/
|
||||
#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.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
enum AVChannel {
|
||||
///< Invalid channel index
|
||||
/// Invalid channel index
|
||||
AV_CHAN_NONE = -1,
|
||||
AV_CHAN_FRONT_LEFT,
|
||||
AV_CHAN_FRONT_RIGHT,
|
||||
@@ -84,6 +84,9 @@ enum AVChannel {
|
||||
AV_CHAN_TOP_SURROUND_LEFT, ///< +110 degrees, Lvs, TpLS
|
||||
AV_CHAN_TOP_SURROUND_RIGHT, ///< -110 degrees, Rvs, TpRS
|
||||
|
||||
AV_CHAN_BINAURAL_LEFT = 61,
|
||||
AV_CHAN_BINAURAL_RIGHT,
|
||||
|
||||
/** Channel is empty can be safely skipped. */
|
||||
AV_CHAN_UNUSED = 0x200,
|
||||
|
||||
@@ -203,6 +206,8 @@ enum AVChannelOrder {
|
||||
#define AV_CH_SIDE_SURROUND_RIGHT (1ULL << AV_CHAN_SIDE_SURROUND_RIGHT )
|
||||
#define AV_CH_TOP_SURROUND_LEFT (1ULL << AV_CHAN_TOP_SURROUND_LEFT )
|
||||
#define AV_CH_TOP_SURROUND_RIGHT (1ULL << AV_CHAN_TOP_SURROUND_RIGHT )
|
||||
#define AV_CH_BINAURAL_LEFT (1ULL << AV_CHAN_BINAURAL_LEFT )
|
||||
#define AV_CH_BINAURAL_RIGHT (1ULL << AV_CHAN_BINAURAL_RIGHT )
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -235,17 +240,20 @@ enum AVChannelOrder {
|
||||
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT2 (AV_CH_LAYOUT_5POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
|
||||
#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_9POINT1POINT6 (AV_CH_LAYOUT_9POINT1POINT4_BACK|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT)
|
||||
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_BINAURAL (AV_CH_BINAURAL_LEFT|AV_CH_BINAURAL_RIGHT)
|
||||
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_9POINT1POINT6|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
|
||||
#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK
|
||||
|
||||
@@ -299,7 +307,7 @@ typedef struct AVChannelCustom {
|
||||
* - with a constructor function, such as av_channel_layout_default(),
|
||||
* av_channel_layout_from_mask() or av_channel_layout_from_string().
|
||||
*
|
||||
* The channel layout must be unitialized with av_channel_layout_uninit()
|
||||
* The channel layout must be uninitialized with av_channel_layout_uninit()
|
||||
*
|
||||
* Copying an AVChannelLayout via assigning is forbidden,
|
||||
* av_channel_layout_copy() must be used instead (and its return value should
|
||||
@@ -357,7 +365,7 @@ typedef struct AVChannelLayout {
|
||||
*
|
||||
* map[i].name may be filled with a 0-terminated string, in which case
|
||||
* it will be used for the purpose of identifying the channel with the
|
||||
* convenience functions below. Otherise it must be zeroed.
|
||||
* convenience functions below. Otherwise it must be zeroed.
|
||||
*/
|
||||
AVChannelCustom *map;
|
||||
} u;
|
||||
@@ -409,6 +417,7 @@ typedef struct AVChannelLayout {
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
|
||||
@@ -417,7 +426,9 @@ typedef struct AVChannelLayout {
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
|
||||
#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_9POINT1POINT6 AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_9POINT1POINT6)
|
||||
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_BINAURAL AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_BINAURAL)
|
||||
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
|
||||
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
|
||||
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations
|
||||
#define AV_CPU_FLAG_DOTPROD (1 << 8)
|
||||
#define AV_CPU_FLAG_I8MM (1 << 9)
|
||||
#define AV_CPU_FLAG_SVE (1 <<10)
|
||||
#define AV_CPU_FLAG_SVE2 (1 <<11)
|
||||
#define AV_CPU_FLAG_SETEND (1 <<16)
|
||||
|
||||
#define AV_CPU_FLAG_MMI (1 << 0)
|
||||
@@ -99,6 +101,9 @@
|
||||
#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
|
||||
#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)
|
||||
|
||||
// WASM extensions
|
||||
#define AV_CPU_FLAG_SIMD128 (1 << 0)
|
||||
|
||||
/**
|
||||
* Return the flags which specify extensions supported by the CPU.
|
||||
* The returned value is affected by av_force_cpu_flags() if that was used
|
||||
|
||||
@@ -81,8 +81,12 @@ typedef struct AVColorPrimariesDesc {
|
||||
} AVColorPrimariesDesc;
|
||||
|
||||
/**
|
||||
* Function pointer representing a double -> double transfer function that performs
|
||||
* an EOTF transfer inversion. This function outputs linear light.
|
||||
* Function pointer representing a double -> double transfer function that
|
||||
* performs either an OETF transfer function, or alternatively an inverse EOTF
|
||||
* function (in particular, for SMPTE ST 2084 / PQ). This function inputs
|
||||
* linear light, and outputs gamma encoded light.
|
||||
*
|
||||
* See ITU-T H.273 for more information.
|
||||
*/
|
||||
typedef double (*av_csp_trc_function)(double);
|
||||
|
||||
@@ -110,7 +114,7 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
|
||||
* @see enum AVColorPrimaries
|
||||
* @param prm A description of the colorspace gamut
|
||||
* @return The enum constant associated with this gamut, or
|
||||
* AVCOL_PRI_UNSPECIFIED if no clear match can be idenitified.
|
||||
* AVCOL_PRI_UNSPECIFIED if no clear match can be identified.
|
||||
*/
|
||||
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
|
||||
|
||||
@@ -143,6 +147,44 @@ double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
|
||||
*/
|
||||
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Returns the mathematical inverse of the corresponding TRC function.
|
||||
*/
|
||||
av_csp_trc_function av_csp_trc_func_inv_from_id(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Function pointer representing an ITU EOTF transfer for a given reference
|
||||
* display configuration.
|
||||
*
|
||||
* @param Lw The white point luminance of the display, in nits (cd/m^2).
|
||||
* @param Lb The black point luminance of the display, in nits (cd/m^2).
|
||||
*/
|
||||
typedef void (*av_csp_eotf_function)(double Lw, double Lb, double c[3]);
|
||||
|
||||
/**
|
||||
* Returns the ITU EOTF corresponding to a given TRC. This converts from the
|
||||
* signal level [0,1] to the raw output display luminance in nits (cd/m^2).
|
||||
* This is done per channel in RGB space, except for AVCOL_TRC_SMPTE428, which
|
||||
* assumes CIE XYZ in- and output.
|
||||
*
|
||||
* @return A pointer to the function implementing the given TRC, or NULL if no
|
||||
* such function is defined.
|
||||
*
|
||||
* @note In general, the resulting function is defined (wherever possible) for
|
||||
* out-of-range values, even though these values do not have a physical
|
||||
* meaning on the given display. Users should clamp inputs (or outputs)
|
||||
* if this behavior is not desired.
|
||||
*
|
||||
* This is also the case for functions like PQ, which are defined over an
|
||||
* absolute signal range independent of the target display capabilities.
|
||||
*/
|
||||
av_csp_eotf_function av_csp_itu_eotf(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Returns the mathematical inverse of the corresponding EOTF.
|
||||
*/
|
||||
av_csp_eotf_function av_csp_itu_eotf_inv(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
|
||||
delimiter is added, the strings are simply concatenated. */
|
||||
#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */
|
||||
#define AV_DICT_DEDUP 128 /**< If inserting a value that already exists for a key, do nothing. Only relevant with AV_DICT_MULTIKEY. */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -224,7 +225,7 @@ void av_dict_free(AVDictionary **m);
|
||||
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
|
||||
*
|
||||
* @param[in] m The dictionary
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containg entries.
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containing entries.
|
||||
* Buffer must be freed by the caller when is no longer needed.
|
||||
* @param[in] key_val_sep Character used to separate key from value
|
||||
* @param[in] pairs_sep Character used to separate two pairs from each other
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Automatically generated by version.sh, do not manually edit! */
|
||||
#ifndef AVUTIL_FFVERSION_H
|
||||
#define AVUTIL_FFVERSION_H
|
||||
#define FFMPEG_VERSION "7.1.1"
|
||||
#define FFMPEG_VERSION "8.0"
|
||||
#endif /* AVUTIL_FFVERSION_H */
|
||||
|
||||
@@ -124,7 +124,7 @@ typedef struct AVFilmGrainAOMParams {
|
||||
|
||||
/**
|
||||
* This structure describes how to handle film grain synthesis for codecs using
|
||||
* the ITU-T H.274 Versatile suplemental enhancement information message.
|
||||
* the ITU-T H.274 Versatile supplemental enhancement information message.
|
||||
*
|
||||
* @note The struct must be allocated as part of AVFilmGrainParams using
|
||||
* av_film_grain_params_alloc(). Its size is not a part of the public ABI.
|
||||
@@ -136,43 +136,6 @@ typedef struct AVFilmGrainH274Params {
|
||||
*/
|
||||
int model_id;
|
||||
|
||||
#if FF_API_H274_FILM_GRAIN_VCS
|
||||
/**
|
||||
* TODO: On this ABI bump, please also re-order the fields in
|
||||
* AVFilmGrainParams (see below)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the luma component.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_luma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_luma;
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the chroma components.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_chroma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Specifies the video signal characteristics.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
|
||||
*/
|
||||
attribute_deprecated
|
||||
enum AVColorRange color_range;
|
||||
attribute_deprecated
|
||||
enum AVColorPrimaries color_primaries;
|
||||
attribute_deprecated
|
||||
enum AVColorTransferCharacteristic color_trc;
|
||||
attribute_deprecated
|
||||
enum AVColorSpace color_space;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Specifies the blending mode used to blend the simulated film grain
|
||||
* with the decoded images.
|
||||
@@ -249,18 +212,6 @@ typedef struct AVFilmGrainParams {
|
||||
*/
|
||||
uint64_t seed;
|
||||
|
||||
/**
|
||||
* Additional fields may be added both here and in any structure included.
|
||||
* If a codec's film grain structure differs slightly over another
|
||||
* codec's, fields within may change meaning depending on the type.
|
||||
*
|
||||
* TODO: Move this to the end of the structure, at the next ABI bump.
|
||||
*/
|
||||
union {
|
||||
AVFilmGrainAOMParams aom;
|
||||
AVFilmGrainH274Params h274;
|
||||
} codec;
|
||||
|
||||
/**
|
||||
* Intended display resolution. May be 0 if the codec does not specify
|
||||
* any restrictions.
|
||||
@@ -287,6 +238,15 @@ typedef struct AVFilmGrainParams {
|
||||
int bit_depth_luma;
|
||||
int bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Additional fields may be added both here and in any structure included.
|
||||
* If a codec's film grain structure differs slightly over another
|
||||
* codec's, fields within may change meaning depending on the type.
|
||||
*/
|
||||
union {
|
||||
AVFilmGrainAOMParams aom;
|
||||
AVFilmGrainH274Params h274;
|
||||
} codec;
|
||||
} AVFilmGrainParams;
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,7 @@ enum AVFrameSideDataType {
|
||||
*/
|
||||
AV_FRAME_DATA_MOTION_VECTORS,
|
||||
/**
|
||||
* Recommmends skipping the specified number of samples. This is exported
|
||||
* Recommends skipping the specified number of samples. This is exported
|
||||
* only if the "skip_manual" AVOption is set in libavcodec.
|
||||
* This has the same format as AV_PKT_DATA_SKIP_SAMPLES.
|
||||
* @code
|
||||
@@ -243,6 +243,17 @@ enum AVFrameSideDataType {
|
||||
* The data is an int storing the view ID.
|
||||
*/
|
||||
AV_FRAME_DATA_VIEW_ID,
|
||||
|
||||
/**
|
||||
* This side data contains information about the reference display width(s)
|
||||
* and reference viewing distance(s) as well as information about the
|
||||
* corresponding reference stereo pair(s), i.e., the pair(s) of views to be
|
||||
* displayed for the viewer's left and right eyes on the reference display
|
||||
* at the reference viewing distance.
|
||||
* The payload is the AV3DReferenceDisplaysInfo struct defined in
|
||||
* libavutil/tdrdi.h.
|
||||
*/
|
||||
AV_FRAME_DATA_3D_REFERENCE_DISPLAYS,
|
||||
};
|
||||
|
||||
enum AVActiveFormatDescription {
|
||||
@@ -283,6 +294,27 @@ enum AVSideDataProps {
|
||||
* a single side data array.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_MULTI = (1 << 1),
|
||||
|
||||
/**
|
||||
* Side data depends on the video dimensions. Side data with this property
|
||||
* loses its meaning when rescaling or cropping the image, unless
|
||||
* either recomputed or adjusted to the new resolution.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_SIZE_DEPENDENT = (1 << 2),
|
||||
|
||||
/**
|
||||
* Side data depends on the video color space. Side data with this property
|
||||
* loses its meaning when changing the video color encoding, e.g. by
|
||||
* adapting to a different set of primaries or transfer characteristics.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_COLOR_DEPENDENT = (1 << 3),
|
||||
|
||||
/**
|
||||
* Side data depends on the channel layout. Side data with this property
|
||||
* loses its meaning when downmixing or upmixing, unless either recomputed
|
||||
* or adjusted to the new layout.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_CHANNEL_DEPENDENT = (1 << 4),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -475,16 +507,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int format;
|
||||
|
||||
#if FF_API_FRAME_KEY
|
||||
/**
|
||||
* 1 -> keyframe, 0-> not
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_KEY instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int key_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Picture type of the frame.
|
||||
*/
|
||||
@@ -556,32 +578,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int repeat_pict;
|
||||
|
||||
#if FF_API_INTERLACED_FRAME
|
||||
/**
|
||||
* The content of the picture is interlaced.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_INTERLACED instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int interlaced_frame;
|
||||
|
||||
/**
|
||||
* If the content is interlaced, is top field displayed first.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int top_field_first;
|
||||
#endif
|
||||
|
||||
#if FF_API_PALETTE_HAS_CHANGED
|
||||
/**
|
||||
* Tell user application that palette has changed from previous frame.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int palette_has_changed;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sample rate of the audio data.
|
||||
*/
|
||||
@@ -651,6 +647,14 @@ typedef struct AVFrame {
|
||||
* is interlaced.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
|
||||
/**
|
||||
* A decoder can use this flag to mark frames which were originally encoded losslessly.
|
||||
*
|
||||
* For coding bitstream formats which support both lossless and lossy
|
||||
* encoding, it is sometimes possible for a decoder to determine which method
|
||||
* was used when the bitsream was encoded.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_LOSSLESS (1 << 5)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -687,18 +691,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int64_t best_effort_timestamp;
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* reordered pos from the last AVPacket that has been input into the decoder
|
||||
* - encoding: unused
|
||||
* - decoding: Read by user.
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int64_t pkt_pos;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* metadata.
|
||||
* - encoding: Set by user.
|
||||
@@ -719,20 +711,6 @@ typedef struct AVFrame {
|
||||
#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
|
||||
#define FF_DECODE_ERROR_DECODE_SLICES 8
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* size of the corresponding packet containing the compressed
|
||||
* frame.
|
||||
* It is set to a negative value if unknown.
|
||||
* - encoding: unused
|
||||
* - decoding: set by libavcodec, read by user.
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int pkt_size;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* For hwaccel-format frames, this should be a reference to the
|
||||
* AVHWFramesContext describing the frame.
|
||||
@@ -772,17 +750,13 @@ typedef struct AVFrame {
|
||||
*/
|
||||
|
||||
/**
|
||||
* AVBufferRef for internal use by a single libav* library.
|
||||
* RefStruct reference for internal use by a single libav* library.
|
||||
* Must not be used to transfer data between libraries.
|
||||
* Has to be NULL when ownership of the frame leaves the respective library.
|
||||
*
|
||||
* Code outside the FFmpeg libs should never check or change the contents of the buffer ref.
|
||||
*
|
||||
* FFmpeg calls av_buffer_unref() on it when the frame is unreferenced.
|
||||
* av_frame_copy_props() calls create a new reference with av_buffer_ref()
|
||||
* for the target frame's private_ref field.
|
||||
* Code outside the FFmpeg libs must never check or change private_ref.
|
||||
*/
|
||||
AVBufferRef *private_ref;
|
||||
void *private_ref;
|
||||
|
||||
/**
|
||||
* Channel layout of the audio data.
|
||||
@@ -887,9 +861,10 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
|
||||
* cases.
|
||||
*
|
||||
* @param frame frame in which to store the new buffers.
|
||||
* @param align Required buffer size alignment. If equal to 0, alignment will be
|
||||
* chosen automatically for the current CPU. It is highly
|
||||
* recommended to pass 0 here unless you know what you are doing.
|
||||
* @param align Required buffer size and data pointer alignment. If equal to 0,
|
||||
* alignment will be chosen automatically for the current CPU.
|
||||
* It is highly recommended to pass 0 here unless you know what
|
||||
* you are doing.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error.
|
||||
*/
|
||||
@@ -1063,6 +1038,11 @@ void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
|
||||
* Applies only for side data types without the AV_SIDE_DATA_PROP_MULTI prop.
|
||||
*/
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_REPLACE (1 << 1)
|
||||
/**
|
||||
* Create a new reference to the passed in buffer instead of taking ownership
|
||||
* of it.
|
||||
*/
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_NEW_REF (1 << 2)
|
||||
|
||||
/**
|
||||
* Add new side data entry to an array.
|
||||
@@ -1168,6 +1148,14 @@ const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd,
|
||||
*/
|
||||
void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd,
|
||||
enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* Remove and free all side data instances that match any of the given
|
||||
* side data properties. (See enum AVSideDataProps)
|
||||
*/
|
||||
void av_frame_side_data_remove_by_props(AVFrameSideData ***sd, int *nb_sd,
|
||||
int props);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -83,7 +83,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
AVRational targeted_system_display_maximum_luminance;
|
||||
|
||||
/**
|
||||
* This flag indicates that transfer the base paramter(for value of 1)
|
||||
* This flag indicates that transfer the base parameter(for value of 1)
|
||||
*/
|
||||
int base_enable_flag;
|
||||
|
||||
@@ -145,7 +145,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
int base_param_k3;
|
||||
|
||||
/**
|
||||
* This flag indicates that delta mode of base paramter(for value of 1)
|
||||
* This flag indicates that delta mode of base parameter(for value of 1)
|
||||
*/
|
||||
int base_param_Delta_enable_mode;
|
||||
|
||||
@@ -158,7 +158,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
|
||||
/**
|
||||
* indicates 3Spline_enable_flag in the base parameter,
|
||||
* This flag indicates that transfer three Spline of base paramter(for value of 1)
|
||||
* This flag indicates that transfer three Spline of base parameter(for value of 1)
|
||||
*/
|
||||
int three_Spline_enable_flag;
|
||||
|
||||
@@ -168,60 +168,6 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
*/
|
||||
int three_Spline_num;
|
||||
|
||||
#if FF_API_HDR_VIVID_THREE_SPLINE
|
||||
/**
|
||||
* The mode of three Spline. the value shall be in the range
|
||||
* of 0 to 3, inclusive.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int three_Spline_TH_mode;
|
||||
|
||||
/**
|
||||
* three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
|
||||
* and in multiples of 1.0/255.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable_MB;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_enable of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive.
|
||||
* and in multiples of 1.0/4095.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta1 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta1;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta2 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta2;
|
||||
|
||||
/**
|
||||
* 3Spline_enable_Strength of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive,
|
||||
* and in multiples of 1.0/255.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_enable_Strength;
|
||||
#endif
|
||||
|
||||
AVHDRVivid3SplineParams three_spline[2];
|
||||
} AVHDRVividColorToneMappingParams;
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ enum AVHWDeviceType {
|
||||
AV_HWDEVICE_TYPE_MEDIACODEC,
|
||||
AV_HWDEVICE_TYPE_VULKAN,
|
||||
AV_HWDEVICE_TYPE_D3D12VA,
|
||||
AV_HWDEVICE_TYPE_AMF,
|
||||
/* OpenHarmony Codec device */
|
||||
AV_HWDEVICE_TYPE_OHCODEC,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -560,7 +563,7 @@ enum {
|
||||
* values indicate that it failed somehow.
|
||||
*
|
||||
* On failure, the destination frame will be left blank, except for the
|
||||
* hw_frames_ctx/format fields thay may have been set by the caller - those will
|
||||
* hw_frames_ctx/format fields they may have been set by the caller - those will
|
||||
* be preserved as they were.
|
||||
*
|
||||
* @param dst Destination frame, to contain the mapping.
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct AVOpenCLDeviceContext {
|
||||
/**
|
||||
* The default command queue for this device, which will be used by all
|
||||
* frames contexts which do not have their own command queue. If not
|
||||
* intialised by the user, a default queue will be created on the
|
||||
* initialised by the user, a default queue will be created on the
|
||||
* primary device.
|
||||
*/
|
||||
cl_command_queue command_queue;
|
||||
|
||||
@@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
|
||||
} AVQSVFramesContext;
|
||||
|
||||
#endif /* AVUTIL_HWCONTEXT_QSV_H */
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ typedef struct AVVulkanDeviceContext {
|
||||
#if FF_API_VULKAN_FIXED_QUEUES
|
||||
/**
|
||||
* Queue family index for graphics operations, and the number of queues
|
||||
* enabled for it. If unavaiable, will be set to -1. Not required.
|
||||
* 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.
|
||||
@@ -197,11 +197,6 @@ typedef enum AVVkFrameFlags {
|
||||
* device and tiling during av_hwframe_ctx_init(). */
|
||||
AV_VK_FRAME_FLAG_NONE = (1ULL << 0),
|
||||
|
||||
#if FF_API_VULKAN_CONTIGUOUS_MEMORY
|
||||
/* DEPRECATED: does nothing. Replaced by multiplane images. */
|
||||
AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY = (1ULL << 1),
|
||||
#endif
|
||||
|
||||
/* Disables multiplane images.
|
||||
* This is required to export/import images from CUDA. */
|
||||
AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
|
||||
|
||||
@@ -213,11 +213,11 @@ typedef struct AVIAMFParamDefinition {
|
||||
enum AVIAMFParamDefinitionType type;
|
||||
|
||||
/**
|
||||
* Identifier for the paremeter substream.
|
||||
* Identifier for the parameter substream.
|
||||
*/
|
||||
unsigned int parameter_id;
|
||||
/**
|
||||
* Sample rate for the paremeter substream. It must not be 0.
|
||||
* Sample rate for the parameter substream. It must not be 0.
|
||||
*/
|
||||
unsigned int parameter_rate;
|
||||
|
||||
@@ -493,10 +493,14 @@ typedef struct AVIAMFSubmixElement {
|
||||
enum AVIAMFSubmixLayoutType {
|
||||
/**
|
||||
* The layout follows the loudspeaker sound system convention of ITU-2051-3.
|
||||
* @ref AVIAMFSubmixLayout.sound_system must be set.
|
||||
*/
|
||||
AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS = 2,
|
||||
/**
|
||||
* The layout is binaural.
|
||||
*
|
||||
* @note @ref AVIAMFSubmixLayout.sound_system may be set to
|
||||
* AV_CHANNEL_LAYOUT_BINAURAL to simplify API usage, but it's not mandatory.
|
||||
*/
|
||||
AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL = 3,
|
||||
};
|
||||
@@ -514,9 +518,9 @@ typedef struct AVIAMFSubmixLayout {
|
||||
|
||||
/**
|
||||
* Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus
|
||||
* 7.1.2ch and 3.1.2ch
|
||||
* If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS, this field
|
||||
* is undefined.
|
||||
* 7.1.2ch, 3.1.2ch, and binaural.
|
||||
* If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS or
|
||||
* AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL, this field is undefined.
|
||||
*/
|
||||
AVChannelLayout sound_system;
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* Context structure for the Lagged Fibonacci PRNG.
|
||||
* The exact layout, types and content of this struct may change and should
|
||||
* not be accessed directly. Only its `sizeof()` is guaranteed to stay the same
|
||||
* to allow easy instanciation.
|
||||
* to allow easy instantiation.
|
||||
*/
|
||||
typedef struct AVLFG {
|
||||
unsigned int state[64];
|
||||
@@ -73,7 +73,7 @@ static inline unsigned int av_mlfg_get(AVLFG *c){
|
||||
* Get the next two numbers generated by a Box-Muller Gaussian
|
||||
* generator using the random numbers issued by lfg.
|
||||
*
|
||||
* @param lfg pointer to the contex structure
|
||||
* @param lfg pointer to the context structure
|
||||
* @param out array where the two generated numbers are placed
|
||||
*/
|
||||
void av_bmg_get(AVLFG *lfg, double out[2]);
|
||||
|
||||
@@ -37,6 +37,7 @@ typedef enum {
|
||||
AV_CLASS_CATEGORY_BITSTREAM_FILTER,
|
||||
AV_CLASS_CATEGORY_SWSCALER,
|
||||
AV_CLASS_CATEGORY_SWRESAMPLER,
|
||||
AV_CLASS_CATEGORY_HWDEVICE,
|
||||
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
|
||||
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
|
||||
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
@@ -46,6 +47,15 @@ typedef enum {
|
||||
AV_CLASS_CATEGORY_NB ///< not part of ABI/API
|
||||
}AVClassCategory;
|
||||
|
||||
enum AVClassStateFlags {
|
||||
/**
|
||||
* Object initialization has finished and it is now in the 'runtime' stage.
|
||||
* This affects e.g. what options can be set on the object (only
|
||||
* AV_OPT_FLAG_RUNTIME_PARAM options can be set on initialized objects).
|
||||
*/
|
||||
AV_CLASS_STATE_INITIALIZED = (1 << 0),
|
||||
};
|
||||
|
||||
#define AV_IS_INPUT_DEVICE(category) \
|
||||
(((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
|
||||
((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
|
||||
@@ -77,7 +87,9 @@ typedef struct AVClass {
|
||||
const char* (*item_name)(void* ctx);
|
||||
|
||||
/**
|
||||
* a pointer to the first option specified in the class if any or NULL
|
||||
* An array of options for the structure or NULL.
|
||||
* When non-NULL, the array must be terminated by an option with a NULL
|
||||
* name.
|
||||
*
|
||||
* @see av_set_default_options()
|
||||
*/
|
||||
@@ -85,43 +97,50 @@ typedef struct AVClass {
|
||||
|
||||
/**
|
||||
* LIBAVUTIL_VERSION with which this structure was created.
|
||||
* This is used to allow fields to be added without requiring major
|
||||
* version bumps everywhere.
|
||||
* This is used to allow fields to be added to AVClass without requiring
|
||||
* major version bumps everywhere.
|
||||
*/
|
||||
|
||||
int version;
|
||||
|
||||
/**
|
||||
* Offset in the structure where log_level_offset is stored.
|
||||
* 0 means there is no such variable
|
||||
* Offset in the structure where the log level offset is stored. The log
|
||||
* level offset is an int added to the log level for logging with this
|
||||
* object as the context.
|
||||
*
|
||||
* 0 means there is no such variable.
|
||||
*/
|
||||
int log_level_offset_offset;
|
||||
|
||||
/**
|
||||
* Offset in the structure where a pointer to the parent context for
|
||||
* logging is stored. For example a decoder could pass its AVCodecContext
|
||||
* to eval as such a parent context, which an av_log() implementation
|
||||
* to eval as such a parent context, which an ::av_log() implementation
|
||||
* could then leverage to display the parent context.
|
||||
* The offset can be NULL.
|
||||
*
|
||||
* When the pointer is NULL, or this offset is zero, the object is assumed
|
||||
* to have no parent.
|
||||
*/
|
||||
int parent_log_context_offset;
|
||||
|
||||
/**
|
||||
* Category used for visualization (like color)
|
||||
* This is only set if the category is equal for all objects using this class.
|
||||
* available since version (51 << 16 | 56 << 8 | 100)
|
||||
* Category used for visualization (like color).
|
||||
*
|
||||
* Only used when ::get_category() is NULL. Use this field when all
|
||||
* instances of this class have the same category, use ::get_category()
|
||||
* otherwise.
|
||||
*/
|
||||
AVClassCategory category;
|
||||
|
||||
/**
|
||||
* Callback to return the category.
|
||||
* available since version (51 << 16 | 59 << 8 | 100)
|
||||
* Callback to return the instance category. Use this callback when
|
||||
* different instances of this class may have different categories,
|
||||
* ::category otherwise.
|
||||
*/
|
||||
AVClassCategory (*get_category)(void* ctx);
|
||||
|
||||
/**
|
||||
* Callback to return the supported/allowed ranges.
|
||||
* available since version (52.12)
|
||||
*/
|
||||
int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
@@ -139,11 +158,22 @@ typedef struct AVClass {
|
||||
* @return AVClass for the next AVOptions-enabled child or NULL if there are
|
||||
* no more such children.
|
||||
*
|
||||
* @note The difference between child_next and this is that child_next
|
||||
* iterates over _already existing_ objects, while child_class_iterate
|
||||
* iterates over _all possible_ children.
|
||||
* @note The difference between ::child_next() and ::child_class_iterate()
|
||||
* is that ::child_next() iterates over _actual_ children of an
|
||||
* _existing_ object instance, while ::child_class_iterate() iterates
|
||||
* over the classes of all _potential_ children of any possible
|
||||
* instance of this class.
|
||||
*/
|
||||
const struct AVClass* (*child_class_iterate)(void **iter);
|
||||
|
||||
/**
|
||||
* When non-zero, offset in the object to an unsigned int holding object
|
||||
* state flags, a combination of AVClassStateFlags values. The flags are
|
||||
* updated by the object to signal its state to the generic code.
|
||||
*
|
||||
* Added in version 59.41.100.
|
||||
*/
|
||||
int state_flags_offset;
|
||||
} AVClass;
|
||||
|
||||
/**
|
||||
@@ -247,9 +277,9 @@ void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
|
||||
* @param avcl A pointer to an arbitrary struct of which the first field is a
|
||||
* pointer to an AVClass struct or NULL if general log.
|
||||
* @param initial_level importance level of the message expressed using a @ref
|
||||
* lavu_log_constants "Logging Constant" for the first occurance.
|
||||
* lavu_log_constants "Logging Constant" for the first occurrence.
|
||||
* @param subsequent_level importance level of the message expressed using a @ref
|
||||
* lavu_log_constants "Logging Constant" after the first occurance.
|
||||
* lavu_log_constants "Logging Constant" after the first occurrence.
|
||||
* @param fmt The format string (printf-compatible) that specifies how
|
||||
* subsequent arguments are converted to output.
|
||||
* @param state a variable to keep trak of if a message has already been printed
|
||||
@@ -377,6 +407,16 @@ int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
|
||||
*/
|
||||
#define AV_LOG_PRINT_LEVEL 2
|
||||
|
||||
/**
|
||||
* Include system time in log output.
|
||||
*/
|
||||
#define AV_LOG_PRINT_TIME 4
|
||||
|
||||
/**
|
||||
* Include system date and time in log output.
|
||||
*/
|
||||
#define AV_LOG_PRINT_DATETIME 8
|
||||
|
||||
void av_log_set_flags(int arg);
|
||||
int av_log_get_flags(void);
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int
|
||||
/**
|
||||
* Add a value to a timestamp.
|
||||
*
|
||||
* This function guarantees that when the same value is repeatly added that
|
||||
* This function guarantees that when the same value is repeatedly added that
|
||||
* no accumulation of rounding errors occurs.
|
||||
*
|
||||
* @param[in] ts Input timestamp
|
||||
|
||||
@@ -542,7 +542,7 @@ typedef struct AVOptionRanges {
|
||||
*/
|
||||
int nb_ranges;
|
||||
/**
|
||||
* Number of componentes.
|
||||
* Number of components.
|
||||
*/
|
||||
int nb_components;
|
||||
} AVOptionRanges;
|
||||
@@ -886,6 +886,7 @@ 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.
|
||||
*
|
||||
@@ -901,6 +902,7 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
|
||||
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
|
||||
@@ -1069,6 +1071,7 @@ 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
|
||||
@@ -1076,8 +1079,12 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
|
||||
*
|
||||
* @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.
|
||||
@@ -1130,7 +1137,7 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
|
||||
* @param[in] obj AVClass object to serialize
|
||||
* @param[in] opt_flags serialize options with all the specified flags set (AV_OPT_FLAG)
|
||||
* @param[in] flags combination of AV_OPT_SERIALIZE_* flags
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containg serialized options.
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containing serialized options.
|
||||
* Buffer must be freed by the caller when is no longer needed.
|
||||
* @param[in] key_val_sep character used to separate key from value
|
||||
* @param[in] pairs_sep character used to separate two pairs from each other
|
||||
@@ -1160,7 +1167,7 @@ void av_opt_freep_ranges(AVOptionRanges **ranges);
|
||||
*
|
||||
* The result must be freed with av_opt_freep_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
* @return number of components returned on success, a negative error code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
@@ -1176,7 +1183,7 @@ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags
|
||||
*
|
||||
* The result must be freed with av_opt_free_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
* @return number of components returned on success, a negative error code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
|
||||
@@ -398,12 +398,12 @@ enum AVPixelFormat {
|
||||
AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
|
||||
AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA...
|
||||
AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
|
||||
|
||||
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
|
||||
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
|
||||
|
||||
AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian
|
||||
AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian
|
||||
@@ -439,6 +439,66 @@ enum AVPixelFormat {
|
||||
*/
|
||||
AV_PIX_FMT_D3D12,
|
||||
|
||||
AV_PIX_FMT_AYUV, ///< packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
|
||||
|
||||
AV_PIX_FMT_UYVA, ///< packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
|
||||
|
||||
AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
|
||||
|
||||
AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
|
||||
AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
|
||||
|
||||
AV_PIX_FMT_RGBF16BE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., big-endian
|
||||
AV_PIX_FMT_RGBF16LE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., little-endian
|
||||
|
||||
AV_PIX_FMT_RGBA128BE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBA128LE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
|
||||
AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
|
||||
|
||||
AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
|
||||
AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
|
||||
AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
|
||||
|
||||
AV_PIX_FMT_GBRPF16BE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, big-endian
|
||||
AV_PIX_FMT_GBRPF16LE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, little-endian
|
||||
AV_PIX_FMT_GBRAPF16BE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, big-endian
|
||||
AV_PIX_FMT_GBRAPF16LE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_GRAYF16BE, ///< IEEE-754 half precision Y, 16bpp, big-endian
|
||||
AV_PIX_FMT_GRAYF16LE, ///< IEEE-754 half precision Y, 16bpp, little-endian
|
||||
|
||||
/**
|
||||
* HW acceleration through AMF. data[0] contain AMFSurface pointer
|
||||
*/
|
||||
AV_PIX_FMT_AMF_SURFACE,
|
||||
|
||||
AV_PIX_FMT_GRAY32BE, ///< Y , 32bpp, big-endian
|
||||
AV_PIX_FMT_GRAY32LE, ///< Y , 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YAF32BE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, big-endian
|
||||
AV_PIX_FMT_YAF32LE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YAF16BE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, big-endian
|
||||
AV_PIX_FMT_YAF16LE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_GBRAP32BE, ///< planar GBRA 4:4:4:4 128bpp, big-endian
|
||||
AV_PIX_FMT_GBRAP32LE, ///< planar GBRA 4:4:4:4 128bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YUV444P10MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
|
||||
AV_PIX_FMT_YUV444P10MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
|
||||
AV_PIX_FMT_YUV444P12MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
|
||||
AV_PIX_FMT_YUV444P12MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
|
||||
AV_PIX_FMT_GBRP10MSBBE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, big-endian
|
||||
AV_PIX_FMT_GBRP10MSBLE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, little-endian
|
||||
AV_PIX_FMT_GBRP12MSBBE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, big-endian
|
||||
AV_PIX_FMT_GBRP12MSBLE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, little-endian
|
||||
|
||||
AV_PIX_FMT_OHCODEC, /// hardware decoding through openharmony
|
||||
|
||||
AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
|
||||
};
|
||||
|
||||
@@ -460,6 +520,7 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
|
||||
#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
|
||||
#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
|
||||
#define AV_PIX_FMT_GRAY32 AV_PIX_FMT_NE(GRAY32BE, GRAY32LE)
|
||||
#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
|
||||
#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
|
||||
#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
|
||||
@@ -490,6 +551,9 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
|
||||
#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
|
||||
|
||||
#define AV_PIX_FMT_YUV444P10MSB AV_PIX_FMT_NE(YUV444P10MSBBE, YUV444P10MSBLE)
|
||||
#define AV_PIX_FMT_YUV444P12MSB AV_PIX_FMT_NE(YUV444P12MSBBE, YUV444P12MSBLE)
|
||||
|
||||
#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
|
||||
#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
|
||||
#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
|
||||
@@ -499,17 +563,27 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
|
||||
#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
|
||||
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
|
||||
#define AV_PIX_FMT_GBRAP32 AV_PIX_FMT_NE(GBRAP32BE, GBRAP32LE)
|
||||
|
||||
#define AV_PIX_FMT_GBRP10MSB AV_PIX_FMT_NE(GBRP10MSBBE, GBRP10MSBLE)
|
||||
#define AV_PIX_FMT_GBRP12MSB AV_PIX_FMT_NE(GBRP12MSBBE, GBRP12MSBLE)
|
||||
|
||||
#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
|
||||
#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
|
||||
#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
|
||||
#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
|
||||
|
||||
#define AV_PIX_FMT_GBRPF16 AV_PIX_FMT_NE(GBRPF16BE, GBRPF16LE)
|
||||
#define AV_PIX_FMT_GBRAPF16 AV_PIX_FMT_NE(GBRAPF16BE, GBRAPF16LE)
|
||||
#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
|
||||
#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
|
||||
|
||||
#define AV_PIX_FMT_GRAYF16 AV_PIX_FMT_NE(GRAYF16BE, GRAYF16LE)
|
||||
#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
|
||||
|
||||
#define AV_PIX_FMT_YAF16 AV_PIX_FMT_NE(YAF16BE, YAF16LE)
|
||||
#define AV_PIX_FMT_YAF32 AV_PIX_FMT_NE(YAF32BE, YAF32LE)
|
||||
|
||||
#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
|
||||
#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
|
||||
#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
|
||||
@@ -531,8 +605,11 @@ enum AVPixelFormat {
|
||||
|
||||
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
|
||||
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
|
||||
#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
|
||||
#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
|
||||
#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
|
||||
#define AV_PIX_FMT_XV48 AV_PIX_FMT_NE(XV48BE, XV48LE)
|
||||
#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
|
||||
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
|
||||
#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
|
||||
|
||||
@@ -543,11 +620,15 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
|
||||
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
|
||||
|
||||
#define AV_PIX_FMT_RGBF16 AV_PIX_FMT_NE(RGBF16BE, RGBF16LE)
|
||||
#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
|
||||
|
||||
#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
|
||||
#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
|
||||
|
||||
#define AV_PIX_FMT_RGB96 AV_PIX_FMT_NE(RGB96BE, RGB96LE)
|
||||
#define AV_PIX_FMT_RGBA128 AV_PIX_FMT_NE(RGBA128BE, RGBA128LE)
|
||||
|
||||
/**
|
||||
* Chromaticity coordinates of the source primaries.
|
||||
* These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavu_math_rational
|
||||
* Utilties for rational number calculation.
|
||||
* Utilities for rational number calculation.
|
||||
* @author Michael Niedermayer <michaelni@gmx.at>
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ AVRC4 *av_rc4_alloc(void);
|
||||
* @brief Initializes an AVRC4 context.
|
||||
*
|
||||
* @param d pointer to the AVRC4 context
|
||||
* @param key buffer containig the key
|
||||
* @param key buffer containing the key
|
||||
* @param key_bits must be a multiple of 8
|
||||
* @param decrypt 0 for encryption, 1 for decryption, currently has no effect
|
||||
* @return zero on success, negative value otherwise
|
||||
|
||||
@@ -82,6 +82,12 @@ enum AVSphericalProjection {
|
||||
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye
|
||||
*/
|
||||
AV_SPHERICAL_FISHEYE,
|
||||
|
||||
/**
|
||||
* Parametric Immersive projection (Apple).
|
||||
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/parametricimmersive
|
||||
*/
|
||||
AV_SPHERICAL_PARAMETRIC_IMMERSIVE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,7 @@ enum AVTXType {
|
||||
|
||||
/**
|
||||
* Standard MDCT with a sample data type of float, double or int32_t,
|
||||
* respecively. For the float and int32 variants, the scale type is
|
||||
* respectively. For the float and int32 variants, the scale type is
|
||||
* 'float', while for the double variant, it's 'double'.
|
||||
* If scale is NULL, 1.0 will be used as a default.
|
||||
*
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* Useful to check and match library version in order to maintain
|
||||
* backward compatibility.
|
||||
*
|
||||
* The FFmpeg libraries follow a versioning sheme very similar to
|
||||
* The FFmpeg libraries follow a versioning scheme very similar to
|
||||
* Semantic Versioning (http://semver.org/)
|
||||
* The difference is that the component called PATCH is called MICRO in FFmpeg
|
||||
* and its value is reset to 100 instead of 0 to keep it above or equal to 100.
|
||||
@@ -72,14 +72,14 @@
|
||||
/**
|
||||
* @defgroup lavu_ver Version and Build diagnostics
|
||||
*
|
||||
* Macros and function useful to check at compiletime and at runtime
|
||||
* Macros and function useful to check at compile time and at runtime
|
||||
* which version of libavutil is in use.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 59
|
||||
#define LIBAVUTIL_VERSION_MINOR 39
|
||||
#define LIBAVUTIL_VERSION_MAJOR 60
|
||||
#define LIBAVUTIL_VERSION_MINOR 8
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
@@ -105,16 +105,11 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#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)
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -80,7 +80,7 @@ av_video_hint_get_rect(const AVVideoHint *hints, size_t idx) {
|
||||
* The side data contains a list of rectangles for the portions of the frame
|
||||
* which changed from the last encoded one (and the remainder are assumed to be
|
||||
* changed), or, alternately (depending on the type parameter) the unchanged
|
||||
* ones (and the remanining ones are those which changed).
|
||||
* ones (and the remaining ones are those which changed).
|
||||
* Macroblocks will thus be hinted either to be P_SKIP-ped or go through the
|
||||
* regular encoding procedure.
|
||||
*
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at)
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 POSTPROC_POSTPROCESS_H
|
||||
#define POSTPROC_POSTPROCESS_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lpp
|
||||
* external API header
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lpp libpostproc
|
||||
* Video postprocessing library.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "libpostproc/version_major.h"
|
||||
#ifndef HAVE_AV_CONFIG_H
|
||||
/* When included as part of the ffmpeg build, only include the major version
|
||||
* to avoid unnecessary rebuilds. When included externally, keep including
|
||||
* the full version information. */
|
||||
#include "libpostproc/version.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the LIBPOSTPROC_VERSION_INT constant.
|
||||
*/
|
||||
unsigned postproc_version(void);
|
||||
|
||||
/**
|
||||
* Return the libpostproc build-time configuration.
|
||||
*/
|
||||
const char *postproc_configuration(void);
|
||||
|
||||
/**
|
||||
* Return the libpostproc license.
|
||||
*/
|
||||
const char *postproc_license(void);
|
||||
|
||||
#define PP_QUALITY_MAX 6
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef void pp_context;
|
||||
typedef void pp_mode;
|
||||
|
||||
extern const char pp_help[]; ///< a simple help text
|
||||
|
||||
void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
|
||||
uint8_t * dst[3], const int dstStride[3],
|
||||
int horizontalSize, int verticalSize,
|
||||
const int8_t *QP_store, int QP_stride,
|
||||
pp_mode *mode, pp_context *ppContext, int pict_type);
|
||||
|
||||
|
||||
/**
|
||||
* Return a pp_mode or NULL if an error occurred.
|
||||
*
|
||||
* @param name the string after "-pp" on the command line
|
||||
* @param quality a number from 0 to PP_QUALITY_MAX
|
||||
*/
|
||||
pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality);
|
||||
void pp_free_mode(pp_mode *mode);
|
||||
|
||||
pp_context *pp_get_context(int width, int height, int flags);
|
||||
void pp_free_context(pp_context *ppContext);
|
||||
|
||||
#define PP_CPU_CAPS_MMX 0x80000000
|
||||
#define PP_CPU_CAPS_MMX2 0x20000000
|
||||
#define PP_CPU_CAPS_3DNOW 0x40000000
|
||||
#define PP_CPU_CAPS_ALTIVEC 0x10000000
|
||||
#define PP_CPU_CAPS_AUTO 0x00080000
|
||||
|
||||
#define PP_FORMAT 0x00000008
|
||||
#define PP_FORMAT_420 (0x00000011|PP_FORMAT)
|
||||
#define PP_FORMAT_422 (0x00000001|PP_FORMAT)
|
||||
#define PP_FORMAT_411 (0x00000002|PP_FORMAT)
|
||||
#define PP_FORMAT_444 (0x00000000|PP_FORMAT)
|
||||
#define PP_FORMAT_440 (0x00000010|PP_FORMAT)
|
||||
|
||||
#define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* POSTPROC_POSTPROCESS_H */
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* 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 POSTPROC_VERSION_H
|
||||
#define POSTPROC_VERSION_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Libpostproc version macros
|
||||
*/
|
||||
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBPOSTPROC_VERSION_MINOR 3
|
||||
#define LIBPOSTPROC_VERSION_MICRO 100
|
||||
|
||||
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
|
||||
LIBPOSTPROC_VERSION_MINOR, \
|
||||
LIBPOSTPROC_VERSION_MICRO)
|
||||
#define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
|
||||
LIBPOSTPROC_VERSION_MINOR, \
|
||||
LIBPOSTPROC_VERSION_MICRO)
|
||||
#define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
|
||||
|
||||
#define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
|
||||
|
||||
#endif /* POSTPROC_VERSION_H */
|
||||
@@ -337,7 +337,7 @@ int64_t swr_next_pts(struct SwrContext *s, int64_t pts);
|
||||
* @}
|
||||
*
|
||||
* @name Low-level option setting functions
|
||||
* These functons provide a means to set low-level options that is not possible
|
||||
* These functions provide a means to set low-level options that is not possible
|
||||
* with the AVOption API.
|
||||
* @{
|
||||
*/
|
||||
|
||||
@@ -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 5
|
||||
#define LIBSWRESAMPLE_VERSION_MAJOR 6
|
||||
|
||||
#endif /* SWRESAMPLE_VERSION_MAJOR_H */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Niklas Haas
|
||||
* Copyright (C) 2001-2011 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
@@ -61,60 +62,308 @@ const char *swscale_configuration(void);
|
||||
*/
|
||||
const char *swscale_license(void);
|
||||
|
||||
/* values for the flags, the stuff on the command line is different */
|
||||
#define SWS_FAST_BILINEAR 1
|
||||
#define SWS_BILINEAR 2
|
||||
#define SWS_BICUBIC 4
|
||||
#define SWS_X 8
|
||||
#define SWS_POINT 0x10
|
||||
#define SWS_AREA 0x20
|
||||
#define SWS_BICUBLIN 0x40
|
||||
#define SWS_GAUSS 0x80
|
||||
#define SWS_SINC 0x100
|
||||
#define SWS_LANCZOS 0x200
|
||||
#define SWS_SPLINE 0x400
|
||||
/**
|
||||
* Get the AVClass for SwsContext. It can be used in combination with
|
||||
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
|
||||
*
|
||||
* @see av_opt_find().
|
||||
*/
|
||||
const AVClass *sws_get_class(void);
|
||||
|
||||
/******************************
|
||||
* Flags and quality settings *
|
||||
******************************/
|
||||
|
||||
typedef enum SwsDither {
|
||||
SWS_DITHER_NONE = 0, /* disable dithering */
|
||||
SWS_DITHER_AUTO, /* auto-select from preset */
|
||||
SWS_DITHER_BAYER, /* ordered dither matrix */
|
||||
SWS_DITHER_ED, /* error diffusion */
|
||||
SWS_DITHER_A_DITHER, /* arithmetic addition */
|
||||
SWS_DITHER_X_DITHER, /* arithmetic xor */
|
||||
SWS_DITHER_NB, /* not part of the ABI */
|
||||
} SwsDither;
|
||||
|
||||
typedef enum SwsAlphaBlend {
|
||||
SWS_ALPHA_BLEND_NONE = 0,
|
||||
SWS_ALPHA_BLEND_UNIFORM,
|
||||
SWS_ALPHA_BLEND_CHECKERBOARD,
|
||||
SWS_ALPHA_BLEND_NB, /* not part of the ABI */
|
||||
} 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
|
||||
|
||||
/**
|
||||
* Return an error on underspecified conversions. Without this flag,
|
||||
* unspecified fields are defaulted to sensible values.
|
||||
*/
|
||||
SWS_STRICT = 1 << 11,
|
||||
|
||||
/**
|
||||
* Emit verbose log of scaling parameters.
|
||||
*/
|
||||
SWS_PRINT_INFO = 1 << 12,
|
||||
|
||||
/**
|
||||
* Perform full chroma upsampling when upscaling to RGB.
|
||||
*
|
||||
* For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
|
||||
* will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
|
||||
* the 100x100 yuv444p image to rgba in the final output step.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
|
||||
* with a single chroma sample being reused for both of the horizontally
|
||||
* adjacent RGBA output pixels.
|
||||
*/
|
||||
SWS_FULL_CHR_H_INT = 1 << 13,
|
||||
|
||||
/**
|
||||
* Perform full chroma interpolation when downscaling RGB sources.
|
||||
*
|
||||
* For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
|
||||
* this flag will generate a 100x100 (4:4:4) chroma plane, which is then
|
||||
* downscaled to the required 50x50.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead generated at 50x100 (dropping
|
||||
* every other pixel), before then being downscaled to the required 50x50
|
||||
* resolution.
|
||||
*/
|
||||
SWS_FULL_CHR_H_INP = 1 << 14,
|
||||
|
||||
/**
|
||||
* Force bit-exact output. This will prevent the use of platform-specific
|
||||
* optimizations that may lead to slight difference in rounding, in favor
|
||||
* of always maintaining exact bit output compatibility with the reference
|
||||
* C code.
|
||||
*
|
||||
* Note: It is recommended to set both of these flags simultaneously.
|
||||
*/
|
||||
SWS_ACCURATE_RND = 1 << 18,
|
||||
SWS_BITEXACT = 1 << 19,
|
||||
|
||||
/**
|
||||
* Deprecated flags.
|
||||
*/
|
||||
SWS_DIRECT_BGR = 1 << 15, ///< This flag has no effect
|
||||
SWS_ERROR_DIFFUSION = 1 << 23, ///< Set `SwsContext.dither` instead
|
||||
} SwsFlags;
|
||||
|
||||
typedef enum SwsIntent {
|
||||
SWS_INTENT_PERCEPTUAL = 0, ///< Perceptual tone mapping
|
||||
SWS_INTENT_RELATIVE_COLORIMETRIC = 1, ///< Relative colorimetric clipping
|
||||
SWS_INTENT_SATURATION = 2, ///< Saturation mapping
|
||||
SWS_INTENT_ABSOLUTE_COLORIMETRIC = 3, ///< Absolute colorimetric clipping
|
||||
SWS_INTENT_NB, ///< not part of the ABI
|
||||
} SwsIntent;
|
||||
|
||||
/***********************************
|
||||
* Context creation and management *
|
||||
***********************************/
|
||||
|
||||
/**
|
||||
* Main external API structure. New fields can be added to the end with
|
||||
* minor version bumps. Removal, reordering and changes to existing fields
|
||||
* require a major version bump. sizeof(SwsContext) is not part of the ABI.
|
||||
*/
|
||||
typedef struct SwsContext {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Private data of the user, can be used to carry app specific stuff.
|
||||
*/
|
||||
void *opaque;
|
||||
|
||||
/**
|
||||
* Bitmask of SWS_*. See `SwsFlags` for details.
|
||||
*/
|
||||
unsigned flags;
|
||||
|
||||
/**
|
||||
* Extra parameters for fine-tuning certain scalers.
|
||||
*/
|
||||
double scaler_params[2];
|
||||
|
||||
/**
|
||||
* How many threads to use for processing, or 0 for automatic selection.
|
||||
*/
|
||||
int threads;
|
||||
|
||||
/**
|
||||
* Dither mode.
|
||||
*/
|
||||
SwsDither dither;
|
||||
|
||||
/**
|
||||
* Alpha blending mode. See `SwsAlphaBlend` for details.
|
||||
*/
|
||||
SwsAlphaBlend alpha_blend;
|
||||
|
||||
/**
|
||||
* Use gamma correct scaling.
|
||||
*/
|
||||
int gamma_flag;
|
||||
|
||||
/**
|
||||
* Deprecated frame property overrides, for the legacy API only.
|
||||
*
|
||||
* Ignored by sws_scale_frame() when used in dynamic mode, in which
|
||||
* case all properties are instead taken from the frame directly.
|
||||
*/
|
||||
int src_w, src_h; ///< Width and height of the source frame
|
||||
int dst_w, dst_h; ///< Width and height of the destination frame
|
||||
int src_format; ///< Source pixel format
|
||||
int dst_format; ///< Destination pixel format
|
||||
int src_range; ///< Source is full range
|
||||
int dst_range; ///< Destination is full range
|
||||
int src_v_chr_pos; ///< Source vertical chroma position in luma grid / 256
|
||||
int src_h_chr_pos; ///< Source horizontal chroma position
|
||||
int dst_v_chr_pos; ///< Destination vertical chroma position
|
||||
int dst_h_chr_pos; ///< Destination horizontal chroma position
|
||||
|
||||
/**
|
||||
* Desired ICC intent for color space conversions.
|
||||
*/
|
||||
int intent;
|
||||
|
||||
/* Remember to add new fields to graph.c:opts_equal() */
|
||||
} SwsContext;
|
||||
|
||||
/**
|
||||
* Allocate an empty SwsContext and set its fields to default values.
|
||||
*/
|
||||
SwsContext *sws_alloc_context(void);
|
||||
|
||||
/**
|
||||
* Free the context and everything associated with it, and write NULL
|
||||
* to the provided pointer.
|
||||
*/
|
||||
void sws_free_context(SwsContext **ctx);
|
||||
|
||||
/***************************
|
||||
* Supported frame formats *
|
||||
***************************/
|
||||
|
||||
/**
|
||||
* Test if a given pixel format is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param format The format to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_format(enum AVPixelFormat format, int output);
|
||||
|
||||
/**
|
||||
* Test if a given color space is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param colorspace The colorspace to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_colorspace(enum AVColorSpace colorspace, int output);
|
||||
|
||||
/**
|
||||
* Test if a given set of color primaries is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param primaries The color primaries to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_primaries(enum AVColorPrimaries primaries, int output);
|
||||
|
||||
/**
|
||||
* Test if a given color transfer function is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param trc The color transfer function to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_transfer(enum AVColorTransferCharacteristic trc, int output);
|
||||
|
||||
/**
|
||||
* Helper function to run all sws_test_* against a frame, as well as testing
|
||||
* the basic frame properties for sanity. Ignores irrelevant properties - for
|
||||
* example, AVColorSpace is not checked for RGB frames.
|
||||
*/
|
||||
int sws_test_frame(const AVFrame *frame, int output);
|
||||
|
||||
/**
|
||||
* Like `sws_scale_frame`, but without actually scaling. It will instead
|
||||
* merely initialize internal state that *would* be required to perform the
|
||||
* operation, as well as returning the correct error code for unsupported
|
||||
* frame combinations.
|
||||
*
|
||||
* @param ctx The scaling context.
|
||||
* @param dst The destination frame to consider.
|
||||
* @param src The source frame to consider.
|
||||
* @return 0 on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/********************
|
||||
* Main scaling API *
|
||||
********************/
|
||||
|
||||
/**
|
||||
* Check if a given conversion is a noop. Returns a positive integer if
|
||||
* no operation needs to be performed, 0 otherwise.
|
||||
*/
|
||||
int sws_is_noop(const AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Scale source data from `src` and write the output to `dst`.
|
||||
*
|
||||
* This function can be used directly on an allocated context, without setting
|
||||
* up any frame properties or calling `sws_init_context()`. Such usage is fully
|
||||
* dynamic and does not require reallocation if the frame properties change.
|
||||
*
|
||||
* Alternatively, this function can be called on a context that has been
|
||||
* explicitly initialized. However, this is provided only for backwards
|
||||
* compatibility. In this usage mode, all frame properties must be correctly
|
||||
* set at init time, and may no longer change after initialization.
|
||||
*
|
||||
* @param ctx The scaling context.
|
||||
* @param dst The destination frame. The data buffers may either be already
|
||||
* allocated by the caller or left clear, in which case they will
|
||||
* be allocated by the scaler. The latter may have performance
|
||||
* advantages - e.g. in certain cases some (or all) output planes
|
||||
* may be references to input planes, rather than copies.
|
||||
* @param src The source frame. If the data buffers are set to NULL, then
|
||||
* this function behaves identically to `sws_frame_setup`.
|
||||
* @return >= 0 on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/*************************
|
||||
* Legacy (stateful) API *
|
||||
*************************/
|
||||
|
||||
#define SWS_SRC_V_CHR_DROP_MASK 0x30000
|
||||
#define SWS_SRC_V_CHR_DROP_SHIFT 16
|
||||
|
||||
#define SWS_PARAM_DEFAULT 123456
|
||||
|
||||
#define SWS_PRINT_INFO 0x1000
|
||||
|
||||
//the following 3 flags are not completely implemented
|
||||
|
||||
/**
|
||||
* Perform full chroma upsampling when upscaling to RGB.
|
||||
*
|
||||
* For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
|
||||
* will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
|
||||
* the 100x100 yuv444p image to rgba in the final output step.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
|
||||
* with a single chroma sample being re-used for both of the horizontally
|
||||
* adjacent RGBA output pixels.
|
||||
*/
|
||||
#define SWS_FULL_CHR_H_INT 0x2000
|
||||
|
||||
/**
|
||||
* Perform full chroma interpolation when downscaling RGB sources.
|
||||
*
|
||||
* For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
|
||||
* this flag will generate a 100x100 (4:4:4) chroma plane, which is then
|
||||
* downscaled to the required 50x50.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead generated at 50x100 (dropping
|
||||
* every other pixel), before then being downscaled to the required 50x50
|
||||
* resolution.
|
||||
*/
|
||||
#define SWS_FULL_CHR_H_INP 0x4000
|
||||
|
||||
#define SWS_DIRECT_BGR 0x8000
|
||||
|
||||
#define SWS_ACCURATE_RND 0x40000
|
||||
#define SWS_BITEXACT 0x80000
|
||||
#define SWS_ERROR_DIFFUSION 0x800000
|
||||
|
||||
#define SWS_MAX_REDUCE_CUTOFF 0.002
|
||||
|
||||
#define SWS_CS_ITU709 1
|
||||
@@ -150,8 +399,6 @@ typedef struct SwsFilter {
|
||||
SwsVector *chrV;
|
||||
} SwsFilter;
|
||||
|
||||
struct SwsContext;
|
||||
|
||||
/**
|
||||
* Return a positive value if pix_fmt is a supported input format, 0
|
||||
* otherwise.
|
||||
@@ -171,27 +418,25 @@ int sws_isSupportedOutput(enum AVPixelFormat pix_fmt);
|
||||
*/
|
||||
int sws_isSupportedEndiannessConversion(enum AVPixelFormat pix_fmt);
|
||||
|
||||
/**
|
||||
* Allocate an empty SwsContext. This must be filled and passed to
|
||||
* sws_init_context(). For filling see AVOptions, options.c and
|
||||
* sws_setColorspaceDetails().
|
||||
*/
|
||||
struct SwsContext *sws_alloc_context(void);
|
||||
|
||||
/**
|
||||
* Initialize the swscaler context sws_context.
|
||||
*
|
||||
* This function is considered deprecated, and provided only for backwards
|
||||
* compatibility with sws_scale() and sws_start_frame(). The preferred way to
|
||||
* use libswscale is to set all frame properties correctly and call
|
||||
* sws_scale_frame() directly, without explicitly initializing the context.
|
||||
*
|
||||
* @return zero or positive value on success, a negative value on
|
||||
* error
|
||||
*/
|
||||
av_warn_unused_result
|
||||
int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
|
||||
int sws_init_context(SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
|
||||
|
||||
/**
|
||||
* Free the swscaler context swsContext.
|
||||
* If swsContext is NULL, then does nothing.
|
||||
*/
|
||||
void sws_freeContext(struct SwsContext *swsContext);
|
||||
void sws_freeContext(SwsContext *swsContext);
|
||||
|
||||
/**
|
||||
* Allocate and return an SwsContext. You need it to perform
|
||||
@@ -214,15 +459,16 @@ void sws_freeContext(struct SwsContext *swsContext);
|
||||
* @note this function is to be removed after a saner alternative is
|
||||
* written
|
||||
*/
|
||||
struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
|
||||
/**
|
||||
* Scale the image slice in srcSlice and put the resulting scaled
|
||||
* slice in the image in dst. A slice is a sequence of consecutive
|
||||
* rows in an image.
|
||||
* rows in an image. Requires a context that has been previously
|
||||
* been initialized with sws_init_context().
|
||||
*
|
||||
* Slices have to be provided in sequential order, either in
|
||||
* top-bottom or bottom-top order. If slices are provided in
|
||||
@@ -245,31 +491,15 @@ struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcForm
|
||||
* the destination image
|
||||
* @return the height of the output slice
|
||||
*/
|
||||
int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],
|
||||
int sws_scale(SwsContext *c, const uint8_t *const srcSlice[],
|
||||
const int srcStride[], int srcSliceY, int srcSliceH,
|
||||
uint8_t *const dst[], const int dstStride[]);
|
||||
|
||||
/**
|
||||
* Scale source data from src and write the output to dst.
|
||||
*
|
||||
* This is merely a convenience wrapper around
|
||||
* - sws_frame_start()
|
||||
* - sws_send_slice(0, src->height)
|
||||
* - sws_receive_slice(0, dst->height)
|
||||
* - sws_frame_end()
|
||||
*
|
||||
* @param c The scaling context
|
||||
* @param dst The destination frame. See documentation for sws_frame_start() for
|
||||
* more details.
|
||||
* @param src The source frame.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR code on failure
|
||||
*/
|
||||
int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Initialize the scaling process for a given pair of source/destination frames.
|
||||
* Must be called before any calls to sws_send_slice() and sws_receive_slice().
|
||||
* Requires a context that has been previously been initialized with
|
||||
* sws_init_context().
|
||||
*
|
||||
* This function will retain references to src and dst, so they must both use
|
||||
* refcounted buffers (if allocated by the caller, in case of dst).
|
||||
@@ -292,7 +522,7 @@ int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
*
|
||||
* @see sws_frame_end()
|
||||
*/
|
||||
int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
int sws_frame_start(SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Finish the scaling process for a pair of source/destination frames previously
|
||||
@@ -302,7 +532,7 @@ int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
*
|
||||
* @param c The scaling context
|
||||
*/
|
||||
void sws_frame_end(struct SwsContext *c);
|
||||
void sws_frame_end(SwsContext *c);
|
||||
|
||||
/**
|
||||
* Indicate that a horizontal slice of input data is available in the source
|
||||
@@ -316,7 +546,7 @@ void sws_frame_end(struct SwsContext *c);
|
||||
*
|
||||
* @return a non-negative number on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
int sws_send_slice(SwsContext *c, unsigned int slice_start,
|
||||
unsigned int slice_height);
|
||||
|
||||
/**
|
||||
@@ -336,18 +566,19 @@ int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
* output can be produced
|
||||
* another negative AVERROR code on other kinds of scaling failure
|
||||
*/
|
||||
int sws_receive_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
int sws_receive_slice(SwsContext *c, unsigned int slice_start,
|
||||
unsigned int slice_height);
|
||||
|
||||
/**
|
||||
* Get the alignment required for slices
|
||||
* Get the alignment required for slices. Requires a context that has been
|
||||
* previously been initialized with sws_init_context().
|
||||
*
|
||||
* @param c The scaling context
|
||||
* @return alignment required for output slices requested with sws_receive_slice().
|
||||
* Slice offsets and sizes passed to sws_receive_slice() must be
|
||||
* multiples of the value returned from this function.
|
||||
*/
|
||||
unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
|
||||
unsigned int sws_receive_slice_alignment(const SwsContext *c);
|
||||
|
||||
/**
|
||||
* @param c the scaling context
|
||||
@@ -362,7 +593,7 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
|
||||
* @return A negative error code on error, non negative otherwise.
|
||||
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
|
||||
*/
|
||||
int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
|
||||
int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4],
|
||||
int srcRange, const int table[4], int dstRange,
|
||||
int brightness, int contrast, int saturation);
|
||||
|
||||
@@ -370,7 +601,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
|
||||
* @return A negative error code on error, non negative otherwise.
|
||||
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
|
||||
*/
|
||||
int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
|
||||
int sws_getColorspaceDetails(SwsContext *c, int **inv_table,
|
||||
int *srcRange, int **table, int *dstRange,
|
||||
int *brightness, int *contrast, int *saturation);
|
||||
|
||||
@@ -415,11 +646,11 @@ void sws_freeFilter(SwsFilter *filter);
|
||||
* Be warned that srcFilter and dstFilter are not checked, they
|
||||
* are assumed to remain the same.
|
||||
*/
|
||||
struct SwsContext *sws_getCachedContext(struct SwsContext *context,
|
||||
int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
SwsContext *sws_getCachedContext(SwsContext *context, int srcW, int srcH,
|
||||
enum AVPixelFormat srcFormat, int dstW, int dstH,
|
||||
enum AVPixelFormat dstFormat, int flags,
|
||||
SwsFilter *srcFilter, SwsFilter *dstFilter,
|
||||
const double *param);
|
||||
|
||||
/**
|
||||
* Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
|
||||
@@ -445,14 +676,6 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pix
|
||||
*/
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
|
||||
|
||||
/**
|
||||
* Get the AVClass for swsContext. It can be used in combination with
|
||||
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
|
||||
*
|
||||
* @see av_opt_find().
|
||||
*/
|
||||
const AVClass *sws_get_class(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWSCALE_VERSION_MINOR 3
|
||||
#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 8
|
||||
#define LIBSWSCALE_VERSION_MAJOR 9
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
|
||||
@@ -39,19 +39,19 @@ echo "FFmpeg dependencies directory is $DEPSINSTALLDIR"
|
||||
source "$SCRIPTDIR/versions"
|
||||
|
||||
LAME=3.100
|
||||
LIBVPX=1.15.0
|
||||
LIBVPX=1.15.2
|
||||
FDK_AAC=0fc0e0e0b89de3becd5f099eae725f13eeecc0d1
|
||||
LIBAOM=fc5cf6a132697487fbaa9965b249012e0238768f
|
||||
LIBAOM=d772e334cc724105040382a977ebb10dfd393293
|
||||
LIBOGG=1.3.5
|
||||
LIBVORBIS=1.3.7
|
||||
LIBTHEORA=1.1.1
|
||||
FLAC=1.5.0
|
||||
SPEEX=1.2.0
|
||||
AMF=1.4.34
|
||||
AMF=1.4.36
|
||||
OPUS=1.5.2
|
||||
SVT_AV1=2.3.0
|
||||
GLSLANG=15.3.0
|
||||
VULKAN_HEADERS=1.4.315
|
||||
SVT_AV1=3.1.2
|
||||
GLSLANG=15.4.0
|
||||
VULKAN_HEADERS=1.4.329
|
||||
|
||||
# Encoder list from freedesktop SDK, which apparently came from Fedora.
|
||||
# Disabled list: av1_qsv h264_qsv hevc_qsv mjpeg_qsv mpeg2_qsv vc1_qsv vp8_qsv vp9_qsv
|
||||
@@ -63,9 +63,9 @@ FFMPEG_ENCODER_LIST=""\
|
||||
"adpcm_ima_apm adpcm_ima_qt adpcm_ima_ssi adpcm_ima_wav adpcm_ima_ws adpcm_ms "\
|
||||
"adpcm_swf adpcm_yamaha alac alias_pix amv anull "\
|
||||
"apng ass asv1 asv2 av1_amf "\
|
||||
"av1_vaapi ayuv bitpacked bmp cinepak "\
|
||||
"av1_vaapi av1_vulkan ayuv bitpacked bmp cinepak "\
|
||||
"cljr dca dfpwm dnxhd dpx dvbsub "\
|
||||
"dvdsub dvvideo exr ffv1 ffvhuff flac "\
|
||||
"dvdsub dvvideo exr ffv1 ffv1_vulkan ffvhuff flac "\
|
||||
"flashsv flashsv2 flv g723_1 gif h261 "\
|
||||
"h263 h263_v4l2m2m h263p h264_amf "\
|
||||
"h264_v4l2m2m h264_vaapi h264_vulkan hdr hevc_amf "\
|
||||
@@ -135,8 +135,8 @@ if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||
if [ ! -f "speex-$SPEEX.tar.gz" ]; then
|
||||
curl -C - -L -O "https://downloads.xiph.org/releases/speex/speex-$SPEEX.tar.gz"
|
||||
fi
|
||||
if [ ! -f "AMF-headers.tar.gz" ]; then
|
||||
curl -C - -L -O "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v$AMF/AMF-headers.tar.gz"
|
||||
if [ ! -f "AMF-headers-v$AMF.tar.gz" ]; then
|
||||
curl -C - -L -O "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v$AMF/AMF-headers-v$AMF.tar.gz"
|
||||
fi
|
||||
if [ ! -f "opus-$OPUS.tar.gz" ]; then
|
||||
curl -C - -L -O "https://downloads.xiph.org/releases/opus/opus-$OPUS.tar.gz"
|
||||
@@ -154,7 +154,7 @@ fi
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
$FFMPEG_XZ_HASH ffmpeg-$FFMPEG_VERSION.tar.xz
|
||||
5393759308f6d7bc9eb1ed8013c954e03aadb85f0ed6e96f969a5df447b0f79c AMF-headers.tar.gz
|
||||
ec07ee21b820a73f5bae224e92fd3c492f52732d4885f0637f48189afdd87564 AMF-headers-v$AMF.tar.gz
|
||||
7322744f239a0d8460fde84e92cca77f2fe9d7e25a213789659df9e86b696b42 fdk-aac-stripped-$FDK_AAC.tar.gz
|
||||
f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920 flac-$FLAC.tar.xz
|
||||
ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e lame-$LAME.tar.gz
|
||||
@@ -162,12 +162,12 @@ ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e lame-$LAME.tar
|
||||
b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc libtheora-$LIBTHEORA.tar.bz2
|
||||
0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab libvorbis-$LIBVORBIS.tar.gz
|
||||
b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc libtheora-$LIBTHEORA.tar.bz2
|
||||
e935eded7d81631a538bfae703fd1e293aad1c7fd3407ba00440c95105d2011e libvpx-$LIBVPX.tar.gz
|
||||
26fcd3db88045dee380e581862a6ef106f49b74b6396ee95c2993a260b4636aa libvpx-$LIBVPX.tar.gz
|
||||
65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1 opus-$OPUS.tar.gz
|
||||
eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094 speex-$SPEEX.tar.gz
|
||||
d4a77bb13a0a2d75c9a17c60260fc7dd3cb48ee8e9ad3a60071f87a923275e93 SVT-AV1-$SVT_AV1.tar.gz
|
||||
c6c21fe1873c37e639a6a9ac72d857ab63a5be6893a589f34e09a6c757174201 glslang-$GLSLANG.tar.gz
|
||||
77e3a78db853f8b9c5bc3ddef04e637bef9744e01d6a8c90ebe0ddcd916c0c50 Vulkan-Headers-$VULKAN_HEADERS.tar.gz
|
||||
084720e7818cec7cb38d31ab478478b910d643fe5b13fc2cfcbd9da9c9d5c84b SVT-AV1-$SVT_AV1.tar.gz
|
||||
b16c78e7604b9be9f546ee35ad8b6db6f39bbbbfb19e8d038b6fe2ea5bba4ff4 glslang-$GLSLANG.tar.gz
|
||||
7ea67aabccdecc6ef616b4c243f563ac9bca945a63d4f4cca21f1bbcd828b18e Vulkan-Headers-$VULKAN_HEADERS.tar.gz
|
||||
EOF
|
||||
|
||||
shasum -a 256 --check SHASUMS
|
||||
@@ -273,11 +273,11 @@ cd ../..
|
||||
|
||||
echo "Installing AMF..."
|
||||
rm -fr "AMF"
|
||||
tar xf "AMF-headers.tar.gz"
|
||||
cd "AMF"
|
||||
tar xf "AMF-headers-v$AMF.tar.gz"
|
||||
cd "amf-headers-v$AMF/AMF"
|
||||
mkdir -p "$DEPSINSTALLDIR/include/AMF"
|
||||
cp -a core components "$DEPSINSTALLDIR/include/AMF"
|
||||
cd ..
|
||||
cd ../..
|
||||
|
||||
echo "Building libopus..."
|
||||
rm -fr "opus-$OPUS"
|
||||
|
||||
@@ -71,5 +71,5 @@ SPIRV_CROSS_SHA=d8e3e2b141b8c8a167b2e3984736a6baacff316c
|
||||
DXCOMPILER_VERSION=1.8.2407.12
|
||||
DXCOMPILER_ZIP_HASH=eb4f6a3bb6b08aaa62f435b3dbf26b180702ca52398d3650d0dd538f56742cdc
|
||||
|
||||
FFMPEG_VERSION=7.1.1
|
||||
FFMPEG_XZ_HASH=733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1
|
||||
FFMPEG_VERSION=8.0
|
||||
FFMPEG_XZ_HASH=b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e
|
||||
Reference in New Issue
Block a user