From 73a4d258a917f682dc926abcd782a4cdd115b6ac Mon Sep 17 00:00:00 2001 From: JordanTheToaster Date: Sun, 18 May 2025 08:59:32 +0100 Subject: [PATCH] 3rdparty: Update ffmpeg to 8.0 --- 3rdparty/ffmpeg/COPYING.LGPLv2.1 | 18 +- 3rdparty/ffmpeg/Changelog | 2235 +++++++++++++++++ 3rdparty/ffmpeg/LICENSE.md | 2 - 3rdparty/ffmpeg/headers-version.txt | 2 +- 3rdparty/ffmpeg/include/libavcodec/avcodec.h | 284 +-- 3rdparty/ffmpeg/include/libavcodec/codec.h | 34 +- 3rdparty/ffmpeg/include/libavcodec/codec_id.h | 16 + .../ffmpeg/include/libavcodec/codec_par.h | 2 +- 3rdparty/ffmpeg/include/libavcodec/defs.h | 27 + 3rdparty/ffmpeg/include/libavcodec/packet.h | 55 +- 3rdparty/ffmpeg/include/libavcodec/vdpau.h | 33 - 3rdparty/ffmpeg/include/libavcodec/version.h | 2 +- .../ffmpeg/include/libavcodec/version_major.h | 24 +- .../ffmpeg/include/libavformat/avformat.h | 217 +- 3rdparty/ffmpeg/include/libavformat/version.h | 2 +- .../include/libavformat/version_major.h | 11 +- .../ffmpeg/include/libavutil/attributes.h | 2 + 3rdparty/ffmpeg/include/libavutil/avassert.h | 45 + 3rdparty/ffmpeg/include/libavutil/avstring.h | 2 +- 3rdparty/ffmpeg/include/libavutil/avutil.h | 4 +- 3rdparty/ffmpeg/include/libavutil/bswap.h | 8 +- .../ffmpeg/include/libavutil/channel_layout.h | 39 +- 3rdparty/ffmpeg/include/libavutil/common.h | 38 +- 3rdparty/ffmpeg/include/libavutil/cpu.h | 13 + 3rdparty/ffmpeg/include/libavutil/csp.h | 48 +- 3rdparty/ffmpeg/include/libavutil/dict.h | 3 +- 3rdparty/ffmpeg/include/libavutil/dovi_meta.h | 160 ++ 3rdparty/ffmpeg/include/libavutil/error.h | 1 + 3rdparty/ffmpeg/include/libavutil/fifo.h | 4 - 3rdparty/ffmpeg/include/libavutil/file.h | 1 - .../include/libavutil/film_grain_params.h | 60 +- 3rdparty/ffmpeg/include/libavutil/frame.h | 248 +- .../libavutil/hdr_dynamic_vivid_metadata.h | 60 +- 3rdparty/ffmpeg/include/libavutil/hwcontext.h | 5 +- .../include/libavutil/hwcontext_opencl.h | 2 +- .../ffmpeg/include/libavutil/hwcontext_qsv.h | 28 +- .../libavutil/hwcontext_videotoolbox.h | 11 +- .../include/libavutil/hwcontext_vulkan.h | 50 +- .../ffmpeg/include/libavutil/intreadwrite.h | 45 +- 3rdparty/ffmpeg/include/libavutil/lfg.h | 4 +- 3rdparty/ffmpeg/include/libavutil/log.h | 76 +- .../libavutil/mastering_display_metadata.h | 9 + .../ffmpeg/include/libavutil/mathematics.h | 2 +- 3rdparty/ffmpeg/include/libavutil/opt.h | 210 +- 3rdparty/ffmpeg/include/libavutil/pixfmt.h | 88 +- 3rdparty/ffmpeg/include/libavutil/rational.h | 2 +- 3rdparty/ffmpeg/include/libavutil/rc4.h | 2 +- 3rdparty/ffmpeg/include/libavutil/spherical.h | 22 + 3rdparty/ffmpeg/include/libavutil/stereo3d.h | 96 + 3rdparty/ffmpeg/include/libavutil/tx.h | 2 +- 3rdparty/ffmpeg/include/libavutil/version.h | 18 +- .../ffmpeg/include/libswresample/swresample.h | 6 +- .../include/libswresample/version_major.h | 2 +- 3rdparty/ffmpeg/include/libswscale/swscale.h | 407 ++- .../ffmpeg/include/libswscale/version_major.h | 2 +- 55 files changed, 3973 insertions(+), 816 deletions(-) create mode 100644 3rdparty/ffmpeg/Changelog diff --git a/3rdparty/ffmpeg/COPYING.LGPLv2.1 b/3rdparty/ffmpeg/COPYING.LGPLv2.1 index 58af0d3787..40924c2a6d 100644 --- a/3rdparty/ffmpeg/COPYING.LGPLv2.1 +++ b/3rdparty/ffmpeg/COPYING.LGPLv2.1 @@ -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 diff --git a/3rdparty/ffmpeg/Changelog b/3rdparty/ffmpeg/Changelog new file mode 100644 index 0000000000..5411c268c5 --- /dev/null +++ b/3rdparty/ffmpeg/Changelog @@ -0,0 +1,2235 @@ +Entries are sorted chronologically from oldest to youngest within each release, +releases are sorted from youngest to oldest. + + +version 8.0: +- Whisper filter +- Drop support for OpenSSL < 1.1.0 +- Enable TLS peer certificate verification by default (on next major version bump) +- yasm support dropped, users need to use nasm +- VVC VAAPI decoder +- RealVideo 6.0 decoder +- OpenMAX encoders deprecated +- libx265 alpha layer encoding +- ADPCM IMA Xbox decoder +- Enhanced FLV v2: Multitrack audio/video, modern codec support +- Animated JPEG XL encoding (via libjxl) +- VVC in Matroska +- CENC AV1 support in MP4 muxer +- pngenc: set default prediction method to PAETH +- APV decoder and APV raw bitstream muxing and demuxing +- APV parser +- APV encoding support through a libopenapv wrapper +- VVC decoder supports all content of SCC (Screen Content Coding): + IBC (Inter Block Copy), Palette Mode and ACT (Adaptive Color Transform +- G.728 decoder +- pad_cuda filter +- Sanyo LD-ADPCM decoder +- APV in MP4/ISOBMFF muxing and demuxing +- OpenHarmony hardware decoder/encoder +- Colordetect filter +- Add vf_scale_d3d11 filter +- No longer disabling GCC autovectorization, on X86, ARM and AArch64 +- VP9 Vulkan hwaccel +- AV1 Vulkan encoder +- ProRes RAW decoder +- ProRes RAW Vulkan hwaccel + + +version 7.1: +- Raw Captions with Time (RCWT) closed caption demuxer +- LC3/LC3plus decoding/encoding using external library liblc3 +- ffmpeg CLI filtergraph chaining +- LC3/LC3plus demuxer and muxer +- pad_vaapi, drawbox_vaapi filters +- vf_scale supports secondary ref input and framesync options +- vf_scale2ref deprecated +- qsv_params option added for QSV encoders +- VVC decoder compatible with DVB test content +- xHE-AAC decoder +- removed DEC Alpha DSP and support code +- VVC encoding support via libvvenc +- perlin video source +- D3D12VA HEVC encoder +- Cropping metadata parsing and writing in Matroska and MP4/MOV de/muxers +- Intel QSV-accelerated VVC decoding +- MediaCodec AAC/AMR-NB/AMR-WB/MP3 decoding +- YUV colorspace negotiation for codecs and filters, obsoleting the + YUVJ pixel format +- Vulkan H.264 encoder +- Vulkan H.265 encoder +- stream specifiers in fftools can now match by stream disposition +- LCEVC enhancement data exporting in H.26x and MP4/ISOBMFF +- LCEVC filter +- MV-HEVC decoding +- minor stream specifier syntax changes: + - when matching by metadata (:m::), the colon character + in keys or values now has to be backslash-escaped + - in optional maps (-map ....?) with a metadata-matching stream specifier, + the value has to be separated from the question mark by a colon, i.e. + -map ....:m:::? (otherwise it would be ambiguous whether the + question mark is a part of or not) + - multiple stream types in a single specifier (e.g. :s:s:0) now cause an + error, as such a specifier makes no sense +- Mastering Display and Content Light Level metadata support in hevc_nvenc + and av1_nvenc encoders +- libswresample now accepts custom order channel layouts as input, with some + constrains +- FFV1 parser + + +version 7.0: +- DXV DXT1 encoder +- LEAD MCMP decoder +- EVC decoding using external library libxevd +- EVC encoding using external library libxeve +- QOA decoder and demuxer +- aap filter +- demuxing, decoding, filtering, encoding, and muxing in the + ffmpeg CLI now all run in parallel +- enable gdigrab device to grab a window using the hwnd=HANDLER syntax +- IAMF raw demuxer and muxer +- D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding +- tiltandshift filter +- qrencode filter and qrencodesrc source +- quirc filter +- lavu/eval: introduce randomi() function in expressions +- VVC decoder (experimental) +- fsync filter +- Raw Captions with Time (RCWT) closed caption muxer +- ffmpeg CLI -bsf option may now be used for input as well as output +- ffmpeg CLI options may now be used as -/opt , which is equivalent + to -opt > +- showinfo bitstream filter +- a C11-compliant compiler is now required; note that this requirement + will be bumped to C17 in the near future, so consider updating your + build environment if it lacks C17 support +- Change the default bitrate control method from VBR to CQP for QSV encoders. +- removed deprecated ffmpeg CLI options -psnr and -map_channel +- DVD-Video demuxer, powered by libdvdnav and libdvdread +- ffprobe -show_stream_groups option +- ffprobe (with -export_side_data film_grain) now prints film grain metadata +- AEA muxer +- ffmpeg CLI loopback decoders +- Support PacketTypeMetadata of PacketType in enhanced flv format +- ffplay with hwaccel decoding support (depends on vulkan renderer via libplacebo) +- dnn filter libtorch backend +- Android content URIs protocol +- AOMedia Film Grain Synthesis 1 (AFGS1) +- RISC-V optimizations for AAC, FLAC, JPEG-2000, LPC, RV4.0, SVQ, VC1, VP8, and more +- Loongarch optimizations for HEVC decoding +- Important AArch64 optimizations for HEVC +- IAMF support inside MP4/ISOBMFF +- Support for HEIF/AVIF still images and tiled still images +- Dolby Vision profile 10 support in AV1 +- Support for Ambient Viewing Environment metadata in MP4/ISOBMFF +- HDR10 metadata passthrough when encoding with libx264, libx265, and libsvtav1 + + +version 6.1: +- libaribcaption decoder +- Playdate video decoder and demuxer +- Extend VAAPI support for libva-win32 on Windows +- afireqsrc audio source filter +- arls filter +- ffmpeg CLI new option: -readrate_initial_burst +- zoneplate video source filter +- command support in the setpts and asetpts filters +- Vulkan decode hwaccel, supporting H264, HEVC and AV1 +- color_vulkan filter +- bwdif_vulkan filter +- nlmeans_vulkan filter +- RivaTuner video decoder +- xfade_vulkan filter +- vMix video decoder +- Essential Video Coding parser, muxer and demuxer +- Essential Video Coding frame merge bsf +- bwdif_cuda filter +- Microsoft RLE video encoder +- Raw AC-4 muxer and demuxer +- Raw VVC bitstream parser, muxer and demuxer +- Bitstream filter for editing metadata in VVC streams +- Bitstream filter for converting VVC from MP4 to Annex B +- scale_vt filter for videotoolbox +- transpose_vt filter for videotoolbox +- support for the P_SKIP hinting to speed up libx264 encoding +- Support HEVC,VP9,AV1 codec in enhanced flv format +- apsnr and asisdr audio filters +- OSQ demuxer and decoder +- Support HEVC,VP9,AV1 codec fourcclist in enhanced rtmp protocol +- CRI USM demuxer +- ffmpeg CLI '-top' option deprecated in favor of the setfield filter +- VAAPI AV1 encoder +- ffprobe XML output schema changed to account for multiple + variable-fields elements within the same parent element +- ffprobe -output_format option added as an alias of -of + +# codespell:off + +version 6.0: +- Radiance HDR image support +- ddagrab (Desktop Duplication) video capture filter +- ffmpeg -shortest_buf_duration option +- ffmpeg now requires threading to be built +- ffmpeg now runs every muxer in a separate thread +- Add new mode to cropdetect filter to detect crop-area based on motion vectors and edges +- VAAPI decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9 +- WBMP (Wireless Application Protocol Bitmap) image format +- a3dscope filter +- bonk decoder and demuxer +- Micronas SC-4 audio decoder +- LAF demuxer +- APAC decoder and demuxer +- Media 100i decoders +- DTS to PTS reorder bsf +- ViewQuest VQC decoder +- backgroundkey filter +- nvenc AV1 encoding support +- MediaCodec decoder via NDKMediaCodec +- MediaCodec encoder +- oneVPL support for QSV +- QSV AV1 encoder +- QSV decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9 +- showcwt multimedia filter +- corr video filter +- adrc audio filter +- afdelaysrc audio filter +- WADY DPCM decoder and demuxer +- CBD2 DPCM decoder +- ssim360 video filter +- ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt], + -stats_mux_pre[_fmt] +- hstack_vaapi, vstack_vaapi and xstack_vaapi filters +- XMD ADPCM decoder and demuxer +- media100 to mjpegb bsf +- ffmpeg CLI new option: -fix_sub_duration_heartbeat +- WavArc decoder and demuxer +- CrystalHD decoders deprecated +- SDNS demuxer +- RKA decoder and demuxer +- filtergraph syntax in ffmpeg CLI now supports passing file contents + as option values, by prefixing option name with '/' +- hstack_qsv, vstack_qsv and xstack_qsv filters + + +version 5.1: +- add ipfs/ipns gateway support +- dialogue enhance audio filter +- dropped obsolete XvMC hwaccel +- pcm-bluray encoder +- DFPWM audio encoder/decoder and raw muxer/demuxer +- SITI filter +- Vizrt Binary Image encoder/decoder +- avsynctest source filter +- feedback video filter +- pixelize video filter +- colormap video filter +- colorchart video source filter +- multiply video filter +- PGS subtitle frame merge bitstream filter +- blurdetect filter +- tiltshelf audio filter +- QOI image format support +- ffprobe -o option +- virtualbass audio filter +- VDPAU AV1 hwaccel +- PHM image format support +- remap_opencl filter +- added chromakey_cuda filter +- added bilateral_cuda filter + + +version 5.0: +- ADPCM IMA Westwood encoder +- Westwood AUD muxer +- ADPCM IMA Acorn Replay decoder +- Argonaut Games CVG demuxer +- Argonaut Games CVG muxer +- Concatf protocol +- afwtdn audio filter +- audio and video segment filters +- Apple Graphics (SMC) encoder +- hsvkey and hsvhold video filters +- adecorrelate audio filter +- atilt audio filter +- grayworld video filter +- AV1 Low overhead bitstream format muxer +- swscale slice threading +- MSN Siren decoder +- scharr video filter +- apsyclip audio filter +- morpho video filter +- amr parser +- (a)latency filters +- GEM Raster image decoder +- asdr audio filter +- speex decoder +- limitdiff video filter +- xcorrelate video filter +- varblur video filter +- huesaturation video filter +- colorspectrum source video filter +- RTP packetizer for uncompressed video (RFC 4175) +- bitpacked encoder +- VideoToolbox VP9 hwaccel +- VideoToolbox ProRes hwaccel +- support loongarch. +- aspectralstats audio filter +- adynamicsmooth audio filter +- libplacebo filter +- vflip_vulkan, hflip_vulkan and flip_vulkan filters +- adynamicequalizer audio filter +- yadif_videotoolbox filter +- VideoToolbox ProRes encoder +- anlmf audio filter +- IMF demuxer (experimental) + + +version 4.4: +- AudioToolbox output device +- MacCaption demuxer +- PGX decoder +- chromanr video filter +- VDPAU accelerated HEVC 10/12bit decoding +- ADPCM IMA Ubisoft APM encoder +- Rayman 2 APM muxer +- AV1 encoding support SVT-AV1 +- Cineform HD encoder +- ADPCM Argonaut Games encoder +- Argonaut Games ASF muxer +- AV1 Low overhead bitstream format demuxer +- RPZA video encoder +- ADPCM IMA MOFLEX decoder +- MobiClip FastAudio decoder +- MobiClip video decoder +- MOFLEX demuxer +- MODS demuxer +- PhotoCD decoder +- MCA demuxer +- AV1 decoder (Hardware acceleration used only) +- SVS demuxer +- Argonaut Games BRP demuxer +- DAT demuxer +- aax demuxer +- IPU decoder, parser and demuxer +- Intel QSV-accelerated AV1 decoding +- Argonaut Games Video decoder +- libwavpack encoder removed +- ACE demuxer +- AVS3 demuxer +- AVS3 video decoder via libuavs3d +- Cintel RAW decoder +- VDPAU accelerated VP9 10/12bit decoding +- afreqshift and aphaseshift filters +- High Voltage Software ADPCM encoder +- LEGO Racers ALP (.tun & .pcm) muxer +- AV1 VAAPI decoder +- adenorm filter +- ADPCM IMA AMV encoder +- AMV muxer +- NVDEC AV1 hwaccel +- DXVA2/D3D11VA hardware accelerated AV1 decoding +- speechnorm filter +- SpeedHQ encoder +- asupercut filter +- asubcut filter +- Microsoft Paint (MSP) version 2 decoder +- Microsoft Paint (MSP) demuxer +- AV1 monochrome encoding support via libaom >= 2.0.1 +- asuperpass and asuperstop filter +- shufflepixels filter +- tmidequalizer filter +- estdif filter +- epx filter +- Dolby E parser +- shear filter +- kirsch filter +- colortemperature filter +- colorcontrast filter +- PFM encoder +- colorcorrect filter +- binka demuxer +- XBM parser +- xbm_pipe demuxer +- colorize filter +- CRI parser +- aexciter audio filter +- exposure video filter +- monochrome video filter +- setts bitstream filter +- vif video filter +- OpenEXR image encoder +- Simbiosis IMX decoder +- Simbiosis IMX demuxer +- Digital Pictures SGA demuxer and decoders +- TTML subtitle encoder and muxer +- identity video filter +- msad video filter +- gophers protocol +- RIST protocol via librist + + +version 4.3: +- v360 filter +- Intel QSV-accelerated MJPEG decoding +- Intel QSV-accelerated VP9 decoding +- Support for TrueHD in mp4 +- Support AMD AMF encoder on Linux (via Vulkan) +- IMM5 video decoder +- ZeroMQ protocol +- support Sipro ACELP.KELVIN decoding +- streamhash muxer +- sierpinski video source +- scroll video filter +- photosensitivity filter +- anlms filter +- arnndn filter +- bilateral filter +- maskedmin and maskedmax filters +- VDPAU VP9 hwaccel +- median filter +- QSV-accelerated VP9 encoding +- AV1 encoding support via librav1e +- AV1 frame merge bitstream filter +- AV1 Annex B demuxer +- axcorrelate filter +- mvdv decoder +- mvha decoder +- MPEG-H 3D Audio support in mp4 +- thistogram filter +- freezeframes filter +- Argonaut Games ADPCM decoder +- Argonaut Games ASF demuxer +- xfade video filter +- xfade_opencl filter +- afirsrc audio filter source +- pad_opencl filter +- Simon & Schuster Interactive ADPCM decoder +- Real War KVAG demuxer +- CDToons video decoder +- siren audio decoder +- Rayman 2 ADPCM decoder +- Rayman 2 APM demuxer +- cas video filter +- High Voltage Software ADPCM decoder +- LEGO Racers ALP (.tun & .pcm) demuxer +- AMQP 0-9-1 protocol (RabbitMQ) +- Vulkan support +- avgblur_vulkan, overlay_vulkan, scale_vulkan and chromaber_vulkan filters +- ADPCM IMA MTF decoder +- FWSE demuxer +- DERF DPCM decoder +- DERF demuxer +- CRI HCA decoder +- CRI HCA demuxer +- overlay_cuda filter +- switch from AvxSynth to AviSynth+ on Linux +- mv30 decoder +- Expanded styling support for 3GPP Timed Text Subtitles (movtext) +- WebP parser +- tmedian filter +- maskedthreshold filter +- Support for muxing pcm and pgs in m2ts +- Cunning Developments ADPCM decoder +- asubboost filter +- Pro Pinball Series Soundbank demuxer +- pcm_rechunk bitstream filter +- scdet filter +- NotchLC decoder +- gradients source video filter +- MediaFoundation encoder wrapper +- untile filter +- Simon & Schuster Interactive ADPCM encoder +- PFM decoder +- dblur video filter +- Real War KVAG muxer + + +version 4.2: +- tpad filter +- AV1 decoding support through libdav1d +- dedot filter +- chromashift and rgbashift filters +- freezedetect filter +- truehd_core bitstream filter +- dhav demuxer +- PCM-DVD encoder +- GIF parser +- vividas demuxer +- hymt decoder +- anlmdn filter +- maskfun filter +- hcom demuxer and decoder +- ARBC decoder +- libaribb24 based ARIB STD-B24 caption support (profiles A and C) +- Support decoding of HEVC 4:4:4 content in nvdec and cuviddec +- removed libndi-newtek +- agm decoder +- KUX demuxer +- AV1 frame split bitstream filter +- lscr decoder +- lagfun filter +- asoftclip filter +- Support decoding of HEVC 4:4:4 content in vdpau +- colorhold filter +- xmedian filter +- asr filter +- showspatial multimedia filter +- VP4 video decoder +- IFV demuxer +- derain filter +- deesser filter +- mov muxer writes tracks with unspecified language instead of English by default +- add support for using clang to compile CUDA kernels + + +version 4.1: +- deblock filter +- tmix filter +- amplify filter +- fftdnoiz filter +- aderivative and aintegral audio filters +- pal75bars and pal100bars video filter sources +- support mbedTLS based TLS +- adeclick filter +- adeclip filter +- libtensorflow backend for DNN based filters like srcnn +- vc1 decoder is now bit-exact +- ATRAC9 decoder +- lensfun wrapper filter +- colorconstancy filter +- AVS2 video decoder via libdavs2 +- IMM4 video decoder +- Brooktree ProSumer video decoder +- MatchWare Screen Capture Codec decoder +- WinCam Motion Video decoder +- 1D LUT filter (lut1d) +- RemotelyAnywhere Screen Capture decoder +- cue and acue filters +- support for AV1 in MP4 +- transpose_npp filter +- AVS2 video encoder via libxavs2 +- amultiply filter +- Block-Matching 3d (bm3d) denoising filter +- acrossover filter +- ilbc decoder +- audio denoiser as afftdn filter +- AV1 parser +- SER demuxer +- sinc audio filter source +- chromahold filter +- setparams filter +- vibrance filter +- decoding S12M timecode in h264 +- xstack filter +- pcm vidc decoder and encoder +- (a)graphmonitor filter +- yadif_cuda filter + + +version 4.0: +- Bitstream filters for editing metadata in H.264, HEVC and MPEG-2 streams +- Dropped support for OpenJPEG versions 2.0 and below. Using OpenJPEG now + requires 2.1 (or later) and pkg-config. +- VDA dropped (use VideoToolbox instead) +- MagicYUV encoder +- Raw AMR-NB and AMR-WB demuxers +- TiVo ty/ty+ demuxer +- Intel QSV-accelerated MJPEG encoding +- PCE support for extended channel layouts in the AAC encoder +- native aptX and aptX HD encoder and decoder +- Raw aptX and aptX HD muxer and demuxer +- NVIDIA NVDEC-accelerated H.264, HEVC, MJPEG, MPEG-1/2/4, VC1, VP8/9 hwaccel decoding +- Intel QSV-accelerated overlay filter +- mcompand audio filter +- acontrast audio filter +- OpenCL overlay filter +- video mix filter +- video normalize filter +- audio lv2 wrapper filter +- VAAPI MJPEG and VP8 decoding +- AMD AMF H.264 and HEVC encoders +- video fillborders filter +- video setrange filter +- nsp demuxer +- support LibreSSL (via libtls) +- AVX-512/ZMM support added +- Dropped support for building for Windows XP. The minimum supported Windows + version is Windows Vista. +- deconvolve video filter +- entropy video filter +- hilbert audio filter source +- aiir audio filter +- aiff: add support for CD-ROM XA ADPCM +- Removed the ffserver program +- Removed the ffmenc and ffmdec muxer and demuxer +- VideoToolbox HEVC encoder and hwaccel +- VAAPI-accelerated ProcAmp (color balance), denoise and sharpness filters +- Add android_camera indev +- codec2 en/decoding via libcodec2 +- muxer/demuxer for raw codec2 files and .c2 files +- Moved nvidia codec headers into an external repository. + They can be found at http://git.videolan.org/?p=ffmpeg/nv-codec-headers.git +- native SBC encoder and decoder +- drmeter audio filter +- hapqa_extract bitstream filter +- filter_units bitstream filter +- AV1 Support through libaom +- E-AC-3 dependent frames support +- bitstream filter for extracting E-AC-3 core +- Haivision SRT protocol via libsrt +- segafilm muxer +- vfrdet filter +- SRCNN filter + + +version 3.4: +- deflicker video filter +- doubleweave video filter +- lumakey video filter +- pixscope video filter +- oscilloscope video filter +- config.log and other configuration files moved into ffbuild/ directory +- update cuvid/nvenc headers to Video Codec SDK 8.0.14 +- afir audio filter +- scale_cuda CUDA based video scale filter +- librsvg support for svg rasterization +- crossfeed audio filter +- spec compliant VP9 muxing support in MP4 +- remove the libnut muxer/demuxer wrappers +- remove the libschroedinger encoder/decoder wrappers +- surround audio filter +- sofalizer filter switched to libmysofa +- Gremlin Digital Video demuxer and decoder +- headphone audio filter +- superequalizer audio filter +- roberts video filter +- The x86 assembler default switched from yasm to nasm, pass + --x86asmexe=yasm to configure to restore the old behavior. +- additional frame format support for Interplay MVE movies +- support for decoding through D3D11VA in ffmpeg +- limiter video filter +- libvmaf video filter +- Dolby E decoder and SMPTE 337M demuxer +- unpremultiply video filter +- tlut2 video filter +- floodfill video filter +- pseudocolor video filter +- raw G.726 muxer and demuxer, left- and right-justified +- NewTek NDI input/output device +- Some video filters with several inputs now use a common set of options: + blend, libvmaf, lut3d, overlay, psnr, ssim. + They must always be used by name. +- FITS demuxer and decoder +- FITS muxer and encoder +- add --disable-autodetect build switch +- drop deprecated qtkit input device (use avfoundation instead) +- despill video filter +- haas audio filter +- SUP/PGS subtitle muxer +- convolve video filter +- VP9 tile threading support +- KMS screen grabber +- CUDA thumbnail filter +- V4L2 mem2mem HW assisted codecs +- Rockchip MPP hardware decoding +- vmafmotion video filter +- use MIME type "G726" for little-endian G.726, "AAL2-G726" for big-endian G.726 + + +version 3.3: +- CrystalHD decoder moved to new decode API +- add internal ebur128 library, remove external libebur128 dependency +- Pro-MPEG CoP #3-R2 FEC protocol +- premultiply video filter +- Support for spherical videos +- configure now fails if autodetect-libraries are requested but not found +- PSD Decoder +- 16.8 floating point pcm decoder +- 24.0 floating point pcm decoder +- Apple Pixlet decoder +- QDMC audio decoder +- NewTek SpeedHQ decoder +- MIDI Sample Dump Standard demuxer +- readeia608 filter +- Sample Dump eXchange demuxer +- abitscope multimedia filter +- Scenarist Closed Captions demuxer and muxer +- threshold filter +- midequalizer filter +- Optimal Huffman tables for (M)JPEG encoding +- VAAPI-accelerated MPEG-2 and VP8 encoding +- FM Screen Capture Codec decoder +- native Opus encoder +- ScreenPressor decoder +- incomplete ClearVideo decoder +- Intel QSV video scaling and deinterlacing filters +- Support MOV with multiple sample description tables +- XPM decoder +- Removed the legacy X11 screen grabber, use XCB instead +- MPEG-7 Video Signature filter +- Removed asyncts filter (use af_aresample instead) +- Intel QSV-accelerated VP8 video decoding +- VAAPI-accelerated deinterlacing + + +version 3.2: +- libopenmpt demuxer +- tee protocol +- Changed metadata print option to accept general urls +- Alias muxer for Ogg Video (.ogv) +- VP8 in Ogg muxing +- curves filter doesn't automatically insert points at x=0 and x=1 anymore +- 16-bit support in curves filter and selectivecolor filter +- OpenH264 decoder wrapper +- MediaCodec H.264/HEVC/MPEG-4/VP8/VP9 hwaccel +- True Audio (TTA) muxer +- crystalizer audio filter +- acrusher audio filter +- bitplanenoise video filter +- floating point support in als decoder +- fifo muxer +- maskedclamp filter +- hysteresis filter +- lut2 filter +- yuvtestsrc filter +- CUDA CUVID H.263/VP8/VP9/10 bit HEVC (Dithered) Decoding +- vaguedenoiser filter +- added threads option per filter instance +- weave filter +- gblur filter +- avgblur filter +- sobel and prewitt filter +- MediaCodec HEVC/MPEG-4/VP8/VP9 decoding +- Meridian Lossless Packing (MLP) / TrueHD encoder +- Non-Local Means (nlmeans) denoising filter +- sdl2 output device and ffplay support +- sdl1 output device and sdl1 support removed +- extended mov edit list support +- libfaac encoder removed +- Matroska muxer now writes CRC32 elements by default in all Level 1 elements +- sidedata video and asidedata audio filter +- Changed mapping of rtp MIME type G726 to codec g726le. +- spec compliant VAAPI/DXVA2 VC-1 decoding of slices in frame-coded images + + +version 3.1: +- DXVA2-accelerated HEVC Main10 decoding +- fieldhint filter +- loop video filter and aloop audio filter +- Bob Weaver deinterlacing filter +- firequalizer filter +- datascope filter +- bench and abench filters +- ciescope filter +- protocol blacklisting API +- MediaCodec H264 decoding +- VC-2 HQ RTP payload format (draft v1) depacketizer and packetizer +- VP9 RTP payload format (draft v2) packetizer +- AudioToolbox audio decoders +- AudioToolbox audio encoders +- coreimage filter (GPU based image filtering on OSX) +- libdcadec removed +- bitstream filter for extracting DTS core +- ADPCM IMA DAT4 decoder +- musx demuxer +- aix demuxer +- remap filter +- hash and framehash muxers +- colorspace filter +- hdcd filter +- readvitc filter +- VAAPI-accelerated format conversion and scaling +- libnpp/CUDA-accelerated format conversion and scaling +- Duck TrueMotion 2.0 Real Time decoder +- Wideband Single-bit Data (WSD) demuxer +- VAAPI-accelerated H.264/HEVC/MJPEG encoding +- DTS Express (LBR) decoder +- Generic OpenMAX IL encoder with support for Raspberry Pi +- IFF ANIM demuxer & decoder +- Direct Stream Transfer (DST) decoder +- loudnorm filter +- MTAF demuxer and decoder +- MagicYUV decoder +- OpenExr improvements (tile data and B44/B44A support) +- BitJazz SheerVideo decoder +- CUDA CUVID H264/HEVC decoder +- 10-bit depth support in native utvideo decoder +- libutvideo wrapper removed +- YUY2 Lossless Codec decoder +- VideoToolbox H.264 encoder + + +version 3.0: +- Common Encryption (CENC) MP4 encoding and decoding support +- DXV decoding +- extrastereo filter +- ocr filter +- alimiter filter +- stereowiden filter +- stereotools filter +- rubberband filter +- tremolo filter +- agate filter +- chromakey filter +- maskedmerge filter +- Screenpresso SPV1 decoding +- chromaprint fingerprinting muxer +- ffplay dynamic volume control +- displace filter +- selectivecolor filter +- extensive native AAC encoder improvements and removal of experimental flag +- ADPCM PSX decoder +- 3dostr, dcstr, fsb, genh, vag, xvag, ads, msf, svag & vpk demuxer +- zscale filter +- wve demuxer +- zero-copy Intel QSV transcoding in ffmpeg +- shuffleframes filter +- SDX2 DPCM decoder +- vibrato filter +- innoHeim/Rsupport Screen Capture Codec decoder +- ADPCM AICA decoder +- Interplay ACM demuxer and audio decoder +- XMA1 & XMA2 decoder +- realtime filter +- anoisesrc audio filter source +- IVR demuxer +- compensationdelay filter +- acompressor filter +- support encoding 16-bit RLE SGI images +- apulsator filter +- sidechaingate audio filter +- mipsdspr1 option has been renamed to mipsdsp +- aemphasis filter +- mips32r5 option has been removed +- mips64r6 option has been removed +- DXVA2-accelerated VP9 decoding +- SOFAlizer: virtual binaural acoustics filter +- VAAPI VP9 hwaccel +- audio high-order multiband parametric equalizer +- automatic bitstream filtering +- showspectrumpic filter +- libstagefright support removed +- spectrumsynth filter +- ahistogram filter +- only seek with the right mouse button in ffplay +- toggle full screen when double-clicking with the left mouse button in ffplay +- afftfilt filter +- convolution filter +- libquvi support removed +- support for dvaudio in wav and avi +- libaacplus and libvo-aacenc support removed +- Cineform HD decoder +- new DCA decoder with full support for DTS-HD extensions +- significant performance improvements in Windows Television (WTV) demuxer +- nnedi deinterlacer +- streamselect video and astreamselect audio filter +- swaprect filter +- metadata video and ametadata audio filter +- SMPTE VC-2 HQ profile support for the Dirac decoder +- SMPTE VC-2 native encoder supporting the HQ profile + + +version 2.8: +- colorkey video filter +- BFSTM/BCSTM demuxer +- little-endian ADPCM_THP decoder +- Hap decoder and encoder +- DirectDraw Surface image/texture decoder +- ssim filter +- optional new ASF demuxer +- showvolume filter +- Many improvements to the JPEG 2000 decoder +- Go2Meeting decoding support +- adrawgraph audio and drawgraph video filter +- removegrain video filter +- Intel QSV-accelerated MPEG-2 video and HEVC encoding +- Intel QSV-accelerated MPEG-2 video and HEVC decoding +- Intel QSV-accelerated VC-1 video decoding +- libkvazaar HEVC encoder +- erosion, dilation, deflate and inflate video filters +- Dynamic Audio Normalizer as dynaudnorm filter +- Reverse video and areverse audio filter +- Random filter +- deband filter +- AAC fixed-point decoding +- sidechaincompress audio filter +- bitstream filter for converting HEVC from MP4 to Annex B +- acrossfade audio filter +- allyuv and allrgb video sources +- atadenoise video filter +- OS X VideoToolbox support +- aphasemeter filter +- showfreqs filter +- vectorscope filter +- waveform filter +- hstack and vstack filter +- Support DNx100 (1440x1080@8) +- VAAPI hevc hwaccel +- VDPAU hevc hwaccel +- framerate filter +- Switched default encoders for webm to VP9 and Opus +- Removed experimental flag from the JPEG 2000 encoder + + +version 2.7: +- FFT video filter +- TDSC decoder +- DTS lossless extension (XLL) decoding (not lossless, disabled by default) +- showwavespic filter +- DTS decoding through libdcadec +- Drop support for nvenc API before 5.0 +- nvenc HEVC encoder +- Detelecine filter +- Intel QSV-accelerated H.264 encoding +- MMAL-accelerated H.264 decoding +- basic APNG encoder and muxer with default extension "apng" +- unpack DivX-style packed B-frames in MPEG-4 bitstream filter +- WebM Live Chunk Muxer +- nvenc level and tier options +- chorus filter +- Canopus HQ/HQA decoder +- Automatically rotate videos based on metadata in ffmpeg +- improved Quickdraw compatibility +- VP9 high bit-depth and extended colorspaces decoding support +- WebPAnimEncoder API when available for encoding and muxing WebP +- Direct3D11-accelerated decoding +- Support Secure Transport +- Multipart JPEG demuxer + + +version 2.6: +- nvenc encoder +- 10bit spp filter +- colorlevels filter +- RIFX format for *.wav files +- RTP/mpegts muxer +- non continuous cache protocol support +- tblend filter +- cropdetect support for non 8bpp, absolute (if limit >= 1) and relative (if limit < 1.0) threshold +- Camellia symmetric block cipher +- OpenH264 encoder wrapper +- VOC seeking support +- Closed caption Decoder +- fspp, uspp, pp7 MPlayer postprocessing filters ported to native filters +- showpalette filter +- Twofish symmetric block cipher +- Support DNx100 (960x720@8) +- eq2 filter ported from libmpcodecs as eq filter +- removed libmpcodecs +- Changed default DNxHD colour range in QuickTime .mov derivatives to mpeg range +- ported softpulldown filter from libmpcodecs as repeatfields filter +- dcshift filter +- RTP depacketizer for loss tolerant payload format for MP3 audio (RFC 5219) +- RTP depacketizer for AC3 payload format (RFC 4184) +- palettegen and paletteuse filters +- VP9 RTP payload format (draft 0) experimental depacketizer +- RTP depacketizer for DV (RFC 6469) +- DXVA2-accelerated HEVC decoding +- AAC ELD 480 decoding +- Intel QSV-accelerated H.264 decoding +- DSS SP decoder and DSS demuxer +- Fix stsd atom corruption in DNxHD QuickTimes +- Canopus HQX decoder +- RTP depacketization of T.140 text (RFC 4103) +- Port MIPS optimizations to 64-bit + + +version 2.5: +- HEVC/H.265 RTP payload format (draft v6) packetizer +- SUP/PGS subtitle demuxer +- ffprobe -show_pixel_formats option +- CAST128 symmetric block cipher, ECB mode +- STL subtitle demuxer and decoder +- libutvideo YUV 4:2:2 10bit support +- XCB-based screen-grabber +- UDP-Lite support (RFC 3828) +- xBR scaling filter +- AVFoundation screen capturing support +- ffserver supports codec private options +- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer +- WebP muxer with animated WebP support +- zygoaudio decoding support +- APNG demuxer +- postproc visualization support + + +version 2.4: +- Icecast protocol +- ported lenscorrection filter from frei0r filter +- large optimizations in dctdnoiz to make it usable +- ICY metadata are now requested by default with the HTTP protocol +- support for using metadata in stream specifiers in fftools +- LZMA compression support in TIFF decoder +- H.261 RTP payload format (RFC 4587) depacketizer and experimental packetizer +- HEVC/H.265 RTP payload format (draft v6) depacketizer +- added codecview filter to visualize information exported by some codecs +- Matroska 3D support thorugh side data +- HTML generation using texi2html is deprecated in favor of makeinfo/texi2any +- silenceremove filter + + +version 2.3: +- AC3 fixed-point decoding +- shuffleplanes filter +- subfile protocol +- Phantom Cine demuxer +- replaygain data export +- VP7 video decoder +- Alias PIX image encoder and decoder +- Improvements to the BRender PIX image decoder +- Improvements to the XBM decoder +- QTKit input device +- improvements to OpenEXR image decoder +- support decoding 16-bit RLE SGI images +- GDI screen grabbing for Windows +- alternative rendition support for HTTP Live Streaming +- AVFoundation input device +- Direct Stream Digital (DSD) decoder +- Magic Lantern Video (MLV) demuxer +- On2 AVC (Audio for Video) decoder +- support for decoding through DXVA2 in ffmpeg +- libbs2b-based stereo-to-binaural audio filter +- libx264 reference frames count limiting depending on level +- native Opus decoder +- display matrix export and rotation API +- WebVTT encoder +- showcqt multimedia filter +- zoompan filter +- signalstats filter +- hqx filter (hq2x, hq3x, hq4x) +- flanger filter +- Image format auto-detection +- LRC demuxer and muxer +- Samba protocol (via libsmbclient) +- WebM DASH Manifest muxer +- libfribidi support in drawtext + + +version 2.2: + +- HNM version 4 demuxer and video decoder +- Live HDS muxer +- setsar/setdar filters now support variables in ratio expressions +- elbg filter +- string validation in ffprobe +- support for decoding through VDPAU in ffmpeg (the -hwaccel option) +- complete Voxware MetaSound decoder +- remove mp3_header_compress bitstream filter +- Windows resource files for shared libraries +- aeval filter +- stereoscopic 3d metadata handling +- WebP encoding via libwebp +- ATRAC3+ decoder +- VP8 in Ogg demuxing +- side & metadata support in NUT +- framepack filter +- XYZ12 rawvideo support in NUT +- Exif metadata support in WebP decoder +- OpenGL device +- Use metadata_header_padding to control padding in ID3 tags (currently used in + MP3, AIFF, and OMA files), FLAC header, and the AVI "junk" block. +- Mirillis FIC video decoder +- Support DNx444 +- libx265 encoder +- dejudder filter +- Autodetect VDA like all other hardware accelerations +- aliases and defaults for Ogg subtypes (opus, spx) + + +version 2.1: + +- aecho filter +- perspective filter ported from libmpcodecs +- ffprobe -show_programs option +- compand filter +- RTMP seek support +- when transcoding with ffmpeg (i.e. not streamcopying), -ss is now accurate + even when used as an input option. Previous behavior can be restored with + the -noaccurate_seek option. +- ffmpeg -t option can now be used for inputs, to limit the duration of + data read from an input file +- incomplete Voxware MetaSound decoder +- read EXIF metadata from JPEG +- DVB teletext decoder +- phase filter ported from libmpcodecs +- w3fdif filter +- Opus support in Matroska +- FFV1 version 1.3 is stable and no longer experimental +- FFV1: YUVA(444,422,420) 9, 10 and 16 bit support +- changed DTS stream id in lavf mpeg ps muxer from 0x8a to 0x88, to be + more consistent with other muxers. +- adelay filter +- pullup filter ported from libmpcodecs +- ffprobe -read_intervals option +- Lossless and alpha support for WebP decoder +- Error Resilient AAC syntax (ER AAC LC) decoding +- Low Delay AAC (ER AAC LD) decoding +- mux chapters in ASF files +- SFTP protocol (via libssh) +- libx264: add ability to encode in YUVJ422P and YUVJ444P +- Fraps: use BT.709 colorspace by default for yuv, as reference fraps decoder does +- make decoding alpha optional for prores, ffv1 and vp6 by setting + the skip_alpha flag. +- ladspa wrapper filter +- native VP9 decoder +- dpx parser +- max_error_rate parameter in ffmpeg +- PulseAudio output device +- ReplayGain scanner +- Enhanced Low Delay AAC (ER AAC ELD) decoding (no LD SBR support) +- Linux framebuffer output device +- HEVC decoder +- raw HEVC, HEVC in MOV/MP4, HEVC in Matroska, HEVC in MPEG-TS demuxing +- mergeplanes filter + + +version 2.0: + +- curves filter +- reference-counting for AVFrame and AVPacket data +- ffmpeg now fails when input options are used for output file + or vice versa +- support for Monkey's Audio versions from 3.93 +- perms and aperms filters +- audio filtering support in ffplay +- 10% faster aac encoding on x86 and MIPS +- sine audio filter source +- WebP demuxing and decoding support +- ffmpeg options -filter_script and -filter_complex_script, which allow a + filtergraph description to be read from a file +- OpenCL support +- audio phaser filter +- separatefields filter +- libquvi demuxer +- uniform options syntax across all filters +- telecine filter +- interlace filter +- smptehdbars source +- inverse telecine filters (fieldmatch and decimate) +- colorbalance filter +- colorchannelmixer filter +- The matroska demuxer can now output proper verbatim ASS packets. It will + become the default at the next libavformat major bump. +- decent native animated GIF encoding +- asetrate filter +- interleave filter +- timeline editing with filters +- vidstabdetect and vidstabtransform filters for video stabilization using + the vid.stab library +- astats filter +- trim and atrim filters +- ffmpeg -t and -ss (output-only) options are now sample-accurate when + transcoding audio +- Matroska muxer can now put the index at the beginning of the file. +- extractplanes filter +- avectorscope filter +- ADPCM DTK decoder +- ADP demuxer +- RSD demuxer +- RedSpark demuxer +- ADPCM IMA Radical decoder +- zmq filters +- DCT denoiser filter (dctdnoiz) +- Wavelet denoiser filter ported from libmpcodecs as owdenoise (formerly "ow") +- Apple Intermediate Codec decoder +- Escape 130 video decoder +- FTP protocol support +- V4L2 output device +- 3D LUT filter (lut3d) +- SMPTE 302M audio encoder +- support for slice multithreading in libavfilter +- Hald CLUT support (generation and filtering) +- VC-1 interlaced B-frame support +- support for WavPack muxing (raw and in Matroska) +- XVideo output device +- vignette filter +- True Audio (TTA) encoder +- Go2Webinar decoder +- mcdeint filter ported from libmpcodecs +- sab filter ported from libmpcodecs +- ffprobe -show_chapters option +- WavPack encoding through libwavpack +- rotate filter +- spp filter ported from libmpcodecs +- libgme support +- psnr filter + + +version 1.2: + +- VDPAU hardware acceleration through normal hwaccel +- SRTP support +- Error diffusion dither in Swscale +- Chained Ogg support +- Theora Midstream reconfiguration support +- EVRC decoder +- audio fade filter +- filtering audio with unknown channel layout +- allpass, bass, bandpass, bandreject, biquad, equalizer, highpass, lowpass + and treble audio filter +- improved showspectrum filter, with multichannel support and sox-like colors +- histogram filter +- tee muxer +- il filter ported from libmpcodecs +- support ID3v2 tags in ASF files +- encrypted TTA stream decoding support +- RF64 support in WAV muxer +- noise filter ported from libmpcodecs +- Subtitles character encoding conversion +- blend filter +- stereo3d filter ported from libmpcodecs + + +version 1.1: + +- stream disposition information printing in ffprobe +- filter for loudness analysis following EBU R128 +- Opus encoder using libopus +- ffprobe -select_streams option +- Pinnacle TARGA CineWave YUV16 decoder +- TAK demuxer, decoder and parser +- DTS-HD demuxer +- remove -same_quant, it hasn't worked for years +- FFM2 support +- X-Face image encoder and decoder +- 24-bit FLAC encoding +- multi-channel ALAC encoding up to 7.1 +- metadata (INFO tag) support in WAV muxer +- subtitles raw text decoder +- support for building DLLs using MSVC +- LVF demuxer +- ffescape tool +- metadata (info chunk) support in CAF muxer +- field filter ported from libmpcodecs +- AVR demuxer +- geq filter ported from libmpcodecs +- remove ffserver daemon mode +- AST muxer/demuxer +- new expansion syntax for drawtext +- BRender PIX image decoder +- ffprobe -show_entries option +- ffprobe -sections option +- ADPCM IMA Dialogic decoder +- BRSTM demuxer +- animated GIF decoder and demuxer +- PVF demuxer +- subtitles filter +- IRCAM muxer/demuxer +- Paris Audio File demuxer +- Virtual concatenation demuxer +- VobSub demuxer +- JSON captions for TED talks decoding support +- SOX Resampler support in libswresample +- aselect filter +- SGI RLE 8-bit / Silicon Graphics RLE 8-bit video decoder +- Silicon Graphics Motion Video Compressor 1 & 2 decoder +- Silicon Graphics Movie demuxer +- apad filter +- Resolution & pixel format change support with multithreading for H.264 +- documentation split into per-component manuals +- pp (postproc) filter ported from MPlayer +- NIST Sphere demuxer +- MPL2, VPlayer, MPlayer, AQTitle, PJS and SubViewer v1 subtitles demuxers and decoders +- Sony Wave64 muxer +- adobe and limelight publisher authentication in RTMP +- data: URI scheme +- support building on the Plan 9 operating system +- kerndeint filter ported from MPlayer +- histeq filter ported from VirtualDub +- Megalux Frame demuxer +- 012v decoder +- Improved AVC Intra decoding support + + +version 1.0: + +- INI and flat output in ffprobe +- Scene detection in libavfilter +- Indeo Audio decoder +- channelsplit audio filter +- setnsamples audio filter +- atempo filter +- ffprobe -show_data option +- RTMPT protocol support +- iLBC encoding/decoding via libilbc +- Microsoft Screen 1 decoder +- join audio filter +- audio channel mapping filter +- Microsoft ATC Screen decoder +- RTSP listen mode +- TechSmith Screen Codec 2 decoder +- AAC encoding via libfdk-aac +- Microsoft Expression Encoder Screen decoder +- RTMPS protocol support +- RTMPTS protocol support +- RTMPE protocol support +- RTMPTE protocol support +- showwaves and showspectrum filter +- LucasArts SMUSH SANM playback support +- LucasArts SMUSH VIMA audio decoder (ADPCM) +- LucasArts SMUSH demuxer +- SAMI, RealText and SubViewer demuxers and decoders +- Heart Of Darkness PAF playback support +- iec61883 device +- asettb filter +- new option: -progress +- 3GPP Timed Text encoder/decoder +- GeoTIFF decoder support +- ffmpeg -(no)stdin option +- Opus decoder using libopus +- caca output device using libcaca +- alphaextract and alphamerge filters +- concat filter +- flite filter +- Canopus Lossless Codec decoder +- bitmap subtitles in filters (experimental and temporary) +- MP2 encoding via TwoLAME +- bmp parser +- smptebars source +- asetpts filter +- hue filter +- ICO muxer +- SubRip encoder and decoder without embedded timing +- edge detection filter +- framestep filter +- ffmpeg -shortest option is now per-output file + -pass and -passlogfile are now per-output stream +- volume measurement filter +- Ut Video encoder +- Microsoft Screen 2 decoder +- smartblur filter ported from MPlayer +- CPiA decoder +- decimate filter ported from MPlayer +- RTP depacketization of JPEG +- Smooth Streaming live segmenter muxer +- F4V muxer +- sendcmd and asendcmd filters +- WebVTT demuxer and decoder (simple tags supported) +- RTP packetization of JPEG +- faststart option in the MOV/MP4 muxer +- support for building with MSVC + + +version 0.11: + +- Fixes: CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777, + CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785, + CVE-2012-2786, CVE-2012-2787, CVE-2012-2788, CVE-2012-2789, CVE-2012-2790, + CVE-2012-2791, CVE-2012-2792, CVE-2012-2793, CVE-2012-2794, CVE-2012-2795, + CVE-2012-2796, CVE-2012-2797, CVE-2012-2798, CVE-2012-2799, CVE-2012-2800, + CVE-2012-2801, CVE-2012-2802, CVE-2012-2803, CVE-2012-2804, +- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder +- setfield filter +- CDXL demuxer and decoder +- Apple ProRes encoder +- ffprobe -count_packets and -count_frames options +- Sun Rasterfile Encoder +- ID3v2 attached pictures reading and writing +- WMA Lossless decoder +- bluray protocol +- blackdetect filter +- libutvideo encoder wrapper (--enable-libutvideo) +- swapuv filter +- bbox filter +- XBM encoder and decoder +- RealAudio Lossless decoder +- ZeroCodec decoder +- tile video filter +- Metal Gear Solid: The Twin Snakes demuxer +- OpenEXR image decoder +- removelogo filter +- drop support for ffmpeg without libavfilter +- drawtext video filter: fontconfig support +- ffmpeg -benchmark_all option +- super2xsai filter ported from libmpcodecs +- add libavresample audio conversion library for compatibility +- MicroDVD decoder +- Avid Meridien (AVUI) encoder and decoder +- accept + prefix to -pix_fmt option to disable automatic conversions. +- complete audio filtering in libavfilter and ffmpeg +- add fps filter +- vorbis parser +- png parser +- audio mix filter +- ffv1: support (draft) version 1.3 + + +version 0.10: + +- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936, + CVE-2011-3937, CVE-2011-3940, CVE-2011-3941, CVE-2011-3944, + CVE-2011-3945, CVE-2011-3946, CVE-2011-3947, CVE-2011-3949, + CVE-2011-3950, CVE-2011-3951, CVE-2011-3952 +- v410 Quicktime Uncompressed 4:4:4 10-bit encoder and decoder +- SBaGen (SBG) binaural beats script demuxer +- OpenMG Audio muxer +- Timecode extraction in DV and MOV +- thumbnail video filter +- XML output in ffprobe +- asplit audio filter +- tinterlace video filter +- astreamsync audio filter +- amerge audio filter +- ISMV (Smooth Streaming) muxer +- GSM audio parser +- SMJPEG muxer +- XWD encoder and decoder +- Automatic thread count based on detection number of (available) CPU cores +- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder +- ffprobe -show_error option +- Avid 1:1 10-bit RGB Packer codec +- v308 Quicktime Uncompressed 4:4:4 encoder and decoder +- yuv4 libquicktime packed 4:2:0 encoder and decoder +- ffprobe -show_frames option +- silencedetect audio filter +- ffprobe -show_program_version, -show_library_versions, -show_versions options +- rv34: frame-level multi-threading +- optimized iMDCT transform on x86 using SSE for for mpegaudiodec +- Improved PGS subtitle decoder +- dumpgraph option to lavfi device +- r210 and r10k encoders +- ffwavesynth decoder +- aviocat tool +- ffeval tool +- support encoding and decoding 4-channel SGI images + + +version 0.9: + +- openal input device added +- boxblur filter added +- BWF muxer +- Flash Screen Video 2 decoder +- lavfi input device added +- added avconv, which is almost the same for now, except +for a few incompatible changes in the options, which will hopefully make them +easier to use. The changes are: + * The options placement is now strictly enforced! While in theory the + options for ffmpeg should be given in [input options] -i INPUT [output + options] OUTPUT order, in practice it was possible to give output options + before the -i and it mostly worked. Except when it didn't - the behavior was + a bit inconsistent. In avconv, it is not possible to mix input and output + options. All non-global options are reset after an input or output filename. + * All per-file options are now truly per-file - they apply only to the next + input or output file and specifying different values for different files + will now work properly (notably -ss and -t options). + * All per-stream options are now truly per-stream - it is possible to + specify which stream(s) should a given option apply to. See the Stream + specifiers section in the avconv manual for details. + * In ffmpeg some options (like -newvideo/-newaudio/...) are irregular in the + sense that they're specified after the output filename instead of before, + like all other options. In avconv this irregularity is removed, all options + apply to the next input or output file. + * -newvideo/-newaudio/-newsubtitle options were removed. Not only were they + irregular and highly confusing, they were also redundant. In avconv the -map + option will create new streams in the output file and map input streams to + them. E.g. avconv -i INPUT -map 0 OUTPUT will create an output stream for + each stream in the first input file. + * The -map option now has slightly different and more powerful syntax: + + Colons (':') are used to separate file index/stream type/stream index + instead of dots. Comma (',') is used to separate the sync stream instead + of colon.. This is done for consistency with other options. + + It's possible to specify stream type. E.g. -map 0:a:2 creates an + output stream from the third input audio stream. + + Omitting the stream index now maps all the streams of the given type, + not just the first. E.g. -map 0:s creates output streams for all the + subtitle streams in the first input file. + + Since -map can now match multiple streams, negative mappings were + introduced. Negative mappings disable some streams from an already + defined map. E.g. '-map 0 -map -0:a:1' means 'create output streams for + all the stream in the first input file, except for the second audio + stream'. + * There is a new option -c (or -codec) for choosing the decoder/encoder to + use, which makes it possible to precisely specify target stream(s) consistently with + other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0 + libvorbis sets the codec for the first audio stream and -c copy copies all + the streams without reencoding. Old -vcodec/-acodec/-scodec options are now + aliases to -c:v/a/s + * It is now possible to precisely specify which stream should an AVOption + apply to. E.g. -b:v:0 2M sets the bitrate for the first video stream, while + -b:a 128k sets the bitrate for all audio streams. Note that the old -ab 128k + syntax is deprecated and will stop working soon. + * -map_chapters now takes only an input file index and applies to the next + output file. This is consistent with how all the other options work. + * -map_metadata now takes only an input metadata specifier and applies to + the next output file. Output metadata specifier is now part of the option + name, similarly to the AVOptions/map/codec feature above. + * -metadata can now be used to set metadata on streams and chapters, e.g. + -metadata:s:1 language=eng sets the language of the first stream to 'eng'. + This made -vlang/-alang/-slang options redundant, so they were removed. + * -qscale option now uses stream specifiers and applies to all streams, not + just video. I.e. plain -qscale number would now apply to all streams. To get + the old behavior, use -qscale:v. Also there is now a shortcut -q for -qscale + and -aq is now an alias for -q:a. + * -vbsf/-absf/-sbsf options were removed and replaced by a -bsf option which + uses stream specifiers. Use -bsf:v/a/s instead of the old options. + * -itsscale option now uses stream specifiers, so its argument is only the + scale parameter. + * -intra option was removed, use -g 0 for the same effect. + * -psnr option was removed, use -flags +psnr for the same effect. + * -vf option is now an alias to the new -filter option, which uses stream specifiers. + * -vframes/-aframes/-dframes options are now aliases to the new -frames option. + * -vtag/-atag/-stag options are now aliases to the new -tag option. +- XMV demuxer +- LOAS demuxer +- ashowinfo filter added +- Windows Media Image decoder +- amovie source added +- LATM muxer/demuxer +- Speex encoder via libspeex +- JSON output in ffprobe +- WTV muxer +- Optional C++ Support (needed for libstagefright) +- H.264 Decoding on Android via Stagefright +- Prores decoder +- BIN/XBIN/ADF/IDF text file decoder +- aconvert audio filter added +- audio support to lavfi input device added +- libcdio-paranoia input device for audio CD grabbing +- Apple ProRes decoder +- CELT in Ogg demuxing +- G.723.1 demuxer and decoder +- libmodplug support (--enable-libmodplug) +- VC-1 interlaced decoding +- libutvideo wrapper (--enable-libutvideo) +- aevalsrc audio source added +- Ut Video decoder +- Speex encoding via libspeex +- 4:2:2 H.264 decoding support +- 4:2:2 and 4:4:4 H.264 encoding with libx264 +- Pulseaudio input device +- Prores encoder +- Video Decoder Acceleration (VDA) HWAccel module. +- replacement Indeo 3 decoder +- new ffmpeg option: -map_channel +- volume audio filter added +- earwax audio filter added +- libv4l2 support (--enable-libv4l2) +- TLS/SSL and HTTPS protocol support +- AVOptions API rewritten and documented +- most of CODEC_FLAG2_*, some CODEC_FLAG_* and many codec-specific fields in + AVCodecContext deprecated. Codec private options should be used instead. +- Properly working defaults in libx264 wrapper, support for native presets. +- Encrypted OMA files support +- Discworld II BMV decoding support +- VBLE Decoder +- OS X Video Decoder Acceleration (VDA) support +- compact and csv output in ffprobe +- pan audio filter +- IFF Amiga Continuous Bitmap (ACBM) decoder +- ass filter +- CRI ADX audio format muxer and demuxer +- Playstation Portable PMP format demuxer +- Microsoft Windows ICO demuxer +- life source +- PCM format support in OMA demuxer +- CLJR encoder +- new option: -report +- Dxtory capture format decoder +- cellauto source +- Simple segmenting muxer +- Indeo 4 decoder +- SMJPEG demuxer + + +version 0.8: + +- many many things we forgot because we rather write code than changelogs +- WebM support in Matroska de/muxer +- low overhead Ogg muxing +- MMS-TCP support +- VP8 de/encoding via libvpx +- Demuxer for On2's IVF format +- Pictor/PC Paint decoder +- HE-AAC v2 decoder +- HE-AAC v2 encoding with libaacplus +- libfaad2 wrapper removed +- DTS-ES extension (XCh) decoding support +- native VP8 decoder +- RTSP tunneling over HTTP +- RTP depacketization of SVQ3 +- -strict inofficial replaced by -strict unofficial +- ffplay -exitonkeydown and -exitonmousedown options added +- native GSM / GSM MS decoder +- RTP depacketization of QDM2 +- ANSI/ASCII art playback system +- Lego Mindstorms RSO de/muxer +- libavcore added (and subsequently removed) +- SubRip subtitle file muxer and demuxer +- Chinese AVS encoding via libxavs +- ffprobe -show_packets option added +- RTP packetization of Theora and Vorbis +- RTP depacketization of MP4A-LATM +- RTP packetization and depacketization of VP8 +- hflip filter +- Apple HTTP Live Streaming demuxer +- a64 codec +- MMS-HTTP support +- G.722 ADPCM audio encoder/decoder +- R10k video decoder +- ocv_smooth filter +- frei0r wrapper filter +- change crop filter syntax to width:height:x:y +- make the crop filter accept parametric expressions +- make ffprobe accept AVFormatContext options +- yadif filter +- blackframe filter +- Demuxer for Leitch/Harris' VR native stream format (LXF) +- RTP depacketization of the X-QT QuickTime format +- SAP (Session Announcement Protocol, RFC 2974) muxer and demuxer +- cropdetect filter +- ffmpeg -crop* options removed +- transpose filter added +- ffmpeg -force_key_frames option added +- demuxer for receiving raw rtp:// URLs without an SDP description +- single stream LATM/LOAS decoder +- setpts filter added +- Win64 support for optimized x86 assembly functions +- MJPEG/AVI1 to JPEG/JFIF bitstream filter +- ASS subtitle encoder and decoder +- IEC 61937 encapsulation for E-AC-3, TrueHD, DTS-HD (for HDMI passthrough) +- overlay filter added +- rename aspect filter to setdar, and pixelaspect to setsar +- IEC 61937 demuxer +- Mobotix .mxg demuxer +- frei0r source added +- hqdn3d filter added +- RTP depacketization of QCELP +- FLAC parser added +- gradfun filter added +- AMR-WB decoder +- replace the ocv_smooth filter with a more generic ocv filter +- Windows Televison (WTV) demuxer +- FFmpeg metadata format muxer and demuxer +- SubRip (srt) subtitle encoder and decoder +- floating-point AC-3 encoder added +- Lagarith decoder +- ffmpeg -copytb option added +- IVF muxer added +- Wing Commander IV movies decoder added +- movie source added +- Bink version 'b' audio and video decoder +- Bitmap Brothers JV playback system +- Apple HTTP Live Streaming protocol handler +- sndio support for playback and record +- Linux framebuffer input device added +- Chronomaster DFA decoder +- DPX image encoder +- MicroDVD subtitle file muxer and demuxer +- Playstation Portable PMP format demuxer +- fieldorder video filter added +- AAC encoding via libvo-aacenc +- AMR-WB encoding via libvo-amrwbenc +- xWMA demuxer +- Mobotix MxPEG decoder +- VP8 frame-multithreading +- NEON optimizations for VP8 +- Lots of deprecated API cruft removed +- fft and imdct optimizations for AVX (Sandy Bridge) processors +- showinfo filter added +- SMPTE 302M AES3 audio decoder +- Apple Core Audio Format muxer +- 9 bits and 10 bits per sample support in the H.264 decoder +- 9 bits and 10 bits FFV1 encoding / decoding +- split filter added +- select filter added +- sdl output device added +- libmpcodecs video filter support (3 times as many filters than before) +- mpeg2 aspect ratio dection fixed +- libxvid aspect pickiness fixed +- Frame multithreaded decoding +- E-AC-3 audio encoder +- ac3enc: add channel coupling support +- floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders. +- H264/MPEG frame-level multi-threading +- All av_metadata_* functions renamed to av_dict_* and moved to libavutil +- 4:4:4 H.264 decoding support +- 10-bit H.264 optimizations for x86 +- lut, lutrgb, and lutyuv filters added +- buffersink libavfilter sink added +- Bump libswscale for recently reported ABI break +- New J2K encoder (via OpenJPEG) + + +version 0.7: + +- all the changes for 0.8, but keeping API/ABI compatibility with the 0.6 release + + +version 0.6: + +- PB-frame decoding for H.263 +- deprecated vhook subsystem removed +- deprecated old scaler removed +- VQF demuxer +- Alpha channel scaler +- PCX encoder +- RTP packetization of H.263 +- RTP packetization of AMR +- RTP depacketization of Vorbis +- CorePNG decoding support +- Cook multichannel decoding support +- introduced avlanguage helpers in libavformat +- 8088flex TMV demuxer and decoder +- per-stream language-tags extraction in asfdec +- V210 decoder and encoder +- remaining GPL parts in AC-3 decoder converted to LGPL +- QCP demuxer +- SoX native format muxer and demuxer +- AMR-NB decoding/encoding, AMR-WB decoding via OpenCORE libraries +- DPX image decoder +- Electronic Arts Madcow decoder +- DivX (XSUB) subtitle encoder +- nonfree libamr support for AMR-NB/WB decoding/encoding removed +- experimental AAC encoder +- RTP depacketization of ASF and RTSP from WMS servers +- RTMP support in libavformat +- noX handling for OPT_BOOL X options +- Wave64 demuxer +- IEC-61937 compatible Muxer +- TwinVQ decoder +- Bluray (PGS) subtitle decoder +- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks) +- WMA Pro decoder +- Core Audio Format demuxer +- ATRAC1 decoder +- MD STUDIO audio demuxer +- RF64 support in WAV demuxer +- MPEG-4 Audio Lossless Coding (ALS) decoder +- -formats option split into -formats, -codecs, -bsfs, and -protocols +- IV8 demuxer +- CDG demuxer and decoder +- R210 decoder +- Auravision Aura 1 and 2 decoders +- Deluxe Paint Animation playback system +- SIPR decoder +- Adobe Filmstrip muxer and demuxer +- RTP depacketization of H.263 +- Bink demuxer and audio/video decoders +- enable symbol versioning by default for linkers that support it +- IFF PBM/ILBM bitmap decoder +- concat protocol +- Indeo 5 decoder +- RTP depacketization of AMR +- WMA Voice decoder +- ffprobe tool +- AMR-NB decoder +- RTSP muxer +- HE-AAC v1 decoder +- Kega Game Video (KGV1) decoder +- VorbisComment writing for FLAC, Ogg FLAC and Ogg Speex files +- RTP depacketization of Theora +- HTTP Digest authentication +- RTMP/RTMPT/RTMPS/RTMPE/RTMPTE protocol support via librtmp +- Psygnosis YOP demuxer and video decoder +- spectral extension support in the E-AC-3 decoder +- unsharp video filter +- RTP hinting in the mov/3gp/mp4 muxer +- Dirac in Ogg demuxing +- seek to keyframes in Ogg +- 4:2:2 and 4:4:4 Theora decoding +- 35% faster VP3/Theora decoding +- faster AAC decoding +- faster H.264 decoding +- RealAudio 1.0 (14.4K) encoder + + +version 0.5: + +- DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer +- TechSmith Camtasia (TSCC) video decoder +- IBM Ultimotion (ULTI) video decoder +- Sierra Online audio file demuxer and decoder +- Apple QuickDraw (qdrw) video decoder +- Creative ADPCM audio decoder (16 bits as well as 8 bits schemes) +- Electronic Arts Multimedia (WVE/UV2/etc.) file demuxer +- Miro VideoXL (VIXL) video decoder +- H.261 video encoder +- QPEG video decoder +- Nullsoft Video (NSV) file demuxer +- Shorten audio decoder +- LOCO video decoder +- Apple Lossless Audio Codec (ALAC) decoder +- Winnov WNV1 video decoder +- Autodesk Animator Studio Codec (AASC) decoder +- Indeo 2 video decoder +- Fraps FPS1 video decoder +- Snow video encoder/decoder +- Sonic audio encoder/decoder +- Vorbis audio decoder +- Macromedia ADPCM decoder +- Duck TrueMotion 2 video decoder +- support for decoding FLX and DTA extensions in FLIC files +- H.264 custom quantization matrices support +- ffserver fixed, it should now be usable again +- QDM2 audio decoder +- Real Cooker audio decoder +- TrueSpeech audio decoder +- WMA2 audio decoder fixed, now all files should play correctly +- RealAudio 14.4 and 28.8 decoders fixed +- JPEG-LS decoder +- build system improvements +- tabs and trailing whitespace removed from the codebase +- CamStudio video decoder +- AIFF/AIFF-C audio format, encoding and decoding +- ADTS AAC file reading and writing +- Creative VOC file reading and writing +- American Laser Games multimedia (*.mm) playback system +- Zip Motion Blocks Video decoder +- improved Theora/VP3 decoder +- True Audio (TTA) decoder +- AVS demuxer and video decoder +- JPEG-LS encoder +- Smacker demuxer and decoder +- NuppelVideo/MythTV demuxer and RTjpeg decoder +- KMVC decoder +- MPEG-2 intra VLC support +- MPEG-2 4:2:2 encoder +- Flash Screen Video decoder +- GXF demuxer +- Chinese AVS decoder +- GXF muxer +- MXF demuxer +- VC-1/WMV3/WMV9 video decoder +- MacIntel support +- AviSynth support +- VMware video decoder +- VP5 video decoder +- VP6 video decoder +- WavPack lossless audio decoder +- Targa (.TGA) picture decoder +- Vorbis audio encoder +- Delphine Software .cin demuxer/audio and video decoder +- Tiertex .seq demuxer/video decoder +- MTV demuxer +- TIFF picture encoder and decoder +- GIF picture decoder +- Intel Music Coder decoder +- Zip Motion Blocks Video encoder +- Musepack decoder +- Flash Screen Video encoder +- Theora encoding via libtheora +- BMP encoder +- WMA encoder +- GSM-MS encoder and decoder +- DCA decoder +- DXA demuxer and decoder +- DNxHD decoder +- Gamecube movie (.THP) playback system +- Blackfin optimizations +- Interplay C93 demuxer and video decoder +- Bethsoft VID demuxer and video decoder +- CRYO APC demuxer +- ATRAC3 decoder +- V.Flash PTX decoder +- RoQ muxer, RoQ audio encoder +- Renderware TXD demuxer and decoder +- extern C declarations for C++ removed from headers +- sws_flags command line option +- codebook generator +- RoQ video encoder +- QTRLE encoder +- OS/2 support removed and restored again +- AC-3 decoder +- NUT muxer +- additional SPARC (VIS) optimizations +- Matroska muxer +- slice-based parallel H.264 decoding +- Monkey's Audio demuxer and decoder +- AMV audio and video decoder +- DNxHD encoder +- H.264 PAFF decoding +- Nellymoser ASAO decoder +- Beam Software SIFF demuxer and decoder +- libvorbis Vorbis decoding removed in favor of native decoder +- IntraX8 (J-Frame) subdecoder for WMV2 and VC-1 +- Ogg (Theora, Vorbis and FLAC) muxer +- The "device" muxers and demuxers are now in a new libavdevice library +- PC Paintbrush PCX decoder +- Sun Rasterfile decoder +- TechnoTrend PVA demuxer +- Linux Media Labs MPEG-4 (LMLM4) demuxer +- AVM2 (Flash 9) SWF muxer +- QT variant of IMA ADPCM encoder +- VFW grabber +- iPod/iPhone compatible mp4 muxer +- Mimic decoder +- MSN TCP Webcam stream demuxer +- RL2 demuxer / decoder +- IFF demuxer +- 8SVX audio decoder +- non-recursive Makefiles +- BFI demuxer +- MAXIS EA XA (.xa) demuxer / decoder +- BFI video decoder +- OMA demuxer +- MLP/TrueHD decoder +- Electronic Arts CMV decoder +- Motion Pixels Video decoder +- Motion Pixels MVI demuxer +- removed animated GIF decoder/demuxer +- D-Cinema audio muxer +- Electronic Arts TGV decoder +- Apple Lossless Audio Codec (ALAC) encoder +- AAC decoder +- floating point PCM encoder/decoder +- MXF muxer +- DV100 AKA DVCPRO HD decoder and demuxer +- E-AC-3 support added to AC-3 decoder +- Nellymoser ASAO encoder +- ASS and SSA demuxer and muxer +- liba52 wrapper removed +- SVQ3 watermark decoding support +- Speex decoding via libspeex +- Electronic Arts TGQ decoder +- RV40 decoder +- QCELP / PureVoice decoder +- RV30 decoder +- hybrid WavPack support +- R3D REDCODE demuxer +- ALSA support for playback and record +- Electronic Arts TQI decoder +- OpenJPEG based JPEG 2000 decoder +- NC (NC4600) camera file demuxer +- Gopher client support +- MXF D-10 muxer +- generic metadata API +- flash ScreenVideo2 encoder + + +version 0.4.9-pre1: + +- DV encoder, DV muxer +- Microsoft RLE video decoder +- Microsoft Video-1 decoder +- Apple Animation (RLE) decoder +- Apple Graphics (SMC) decoder +- Apple Video (RPZA) decoder +- Cinepak decoder +- Sega FILM (CPK) file demuxer +- Westwood multimedia support (VQA & AUD files) +- Id Quake II CIN playback support +- 8BPS video decoder +- FLIC playback support +- RealVideo 2.0 (RV20) decoder +- Duck TrueMotion v1 (DUCK) video decoder +- Sierra VMD demuxer and video decoder +- MSZH and ZLIB decoder support +- SVQ1 video encoder +- AMR-WB support +- PPC optimizations +- rate distortion optimal cbp support +- rate distorted optimal ac prediction for MPEG-4 +- rate distorted optimal lambda->qp support +- AAC encoding with libfaac +- Sunplus JPEG codec (SP5X) support +- use Lagrange multiplier instead of QP for ratecontrol +- Theora/VP3 decoding support +- XA and ADX ADPCM codecs +- export MPEG-2 active display area / pan scan +- Add support for configuring with IBM XLC +- floating point AAN DCT +- initial support for zygo video (not complete) +- RGB ffv1 support +- new audio/video parser API +- av_log() system +- av_read_frame() and av_seek_frame() support +- missing last frame fixes +- seek by mouse in ffplay +- noise reduction of DCT coefficients +- H.263 OBMC & 4MV support +- H.263 alternative inter vlc support +- H.263 loop filter +- H.263 slice structured mode +- interlaced DCT support for MPEG-2 encoding +- stuffing to stay above min_bitrate +- MB type & QP visualization +- frame stepping for ffplay +- interlaced motion estimation +- alternate scantable support +- SVCD scan offset support +- closed GOP support +- SSE2 FDCT +- quantizer noise shaping +- G.726 ADPCM audio codec +- MS ADPCM encoding +- multithreaded/SMP motion estimation +- multithreaded/SMP encoding for MPEG-1/MPEG-2/MPEG-4/H.263 +- multithreaded/SMP decoding for MPEG-2 +- FLAC decoder +- Metrowerks CodeWarrior suppport +- H.263+ custom pcf support +- nicer output for 'ffmpeg -formats' +- Matroska demuxer +- SGI image format, encoding and decoding +- H.264 loop filter support +- H.264 CABAC support +- nicer looking arrows for the motion vector visualization +- improved VCD support +- audio timestamp drift compensation +- MPEG-2 YUV 422/444 support +- polyphase kaiser windowed sinc and blackman nuttall windowed sinc audio resample +- better image scaling +- H.261 support +- correctly interleave packets during encoding +- VIS optimized motion compensation +- intra_dc_precision>0 encoding support +- support reuse of motion vectors/MB types/field select values of the source video +- more accurate deblock filter +- padding support +- many optimizations and bugfixes +- FunCom ISS audio file demuxer and according ADPCM decoding + + +version 0.4.8: + +- MPEG-2 video encoding (Michael) +- Id RoQ playback subsystem (Mike Melanson and Tim Ferguson) +- Wing Commander III Movie (.mve) file playback subsystem (Mike Melanson + and Mario Brito) +- Xan DPCM audio decoder (Mario Brito) +- Interplay MVE playback subsystem (Mike Melanson) +- Duck DK3 and DK4 ADPCM audio decoders (Mike Melanson) + + +version 0.4.7: + +- RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders. Author unknown, code from mplayerhq + (originally from public domain player for Amiga at http://www.honeypot.net/audio) +- current version now also compiles with older GCC (Fabrice) +- 4X multimedia playback system including 4xm file demuxer (Mike + Melanson), and 4X video and audio codecs (Michael) +- Creative YUV (CYUV) decoder (Mike Melanson) +- FFV1 codec (our very simple lossless intra only codec, compresses much better + than HuffYUV) (Michael) +- ASV1 (Asus), H.264, Intel indeo3 codecs have been added (various) +- tiny PNG encoder and decoder, tiny GIF decoder, PAM decoder (PPM with + alpha support), JPEG YUV colorspace support. (Fabrice Bellard) +- ffplay has been replaced with a newer version which uses SDL (optionally) + for multiplatform support (Fabrice) +- Sorenson Version 3 codec (SVQ3) support has been added (decoding only) - donated + by anonymous +- AMR format has been added (Johannes Carlsson) +- 3GP support has been added (Johannes Carlsson) +- VP3 codec has been added (Mike Melanson) +- more MPEG-1/2 fixes +- better multiplatform support, MS Visual Studio fixes (various) +- AltiVec optimizations (Magnus Damn and others) +- SH4 processor support has been added (BERO) +- new public interfaces (avcodec_get_pix_fmt) (Roman Shaposhnick) +- VOB streaming support (Brian Foley) +- better MP3 autodetection (Andriy Rysin) +- qpel encoding (Michael) +- 4mv+b frames encoding finally fixed (Michael) +- chroma ME (Michael) +- 5 comparison functions for ME (Michael) +- B-frame encoding speedup (Michael) +- WMV2 codec (unfinished - Michael) +- user specified diamond size for EPZS (Michael) +- Playstation STR playback subsystem, still experimental (Mike and Michael) +- ASV2 codec (Michael) +- CLJR decoder (Alex) + +.. And lots more new enhancements and fixes. + + +version 0.4.6: + +- completely new integer only MPEG audio layer 1/2/3 decoder rewritten + from scratch +- Recoded DCT and motion vector search with gcc (no longer depends on nasm) +- fix quantization bug in AC3 encoder +- added PCM codecs and format. Corrected WAV/AVI/ASF PCM issues +- added prototype ffplay program +- added GOB header parsing on H.263/H.263+ decoder (Juanjo) +- bug fix on MCBPC tables of H.263 (Juanjo) +- bug fix on DC coefficients of H.263 (Juanjo) +- added Advanced Prediction Mode on H.263/H.263+ decoder (Juanjo) +- now we can decode H.263 streams found in QuickTime files (Juanjo) +- now we can decode H.263 streams found in VIVO v1 files(Juanjo) +- preliminary RTP "friendly" mode for H.263/H.263+ coding. (Juanjo) +- added GOB header for H.263/H.263+ coding on RTP mode (Juanjo) +- now H.263 picture size is returned on the first decoded frame (Juanjo) +- added first regression tests +- added MPEG-2 TS demuxer +- new demux API for libav +- more accurate and faster IDCT (Michael) +- faster and entropy-controlled motion search (Michael) +- two pass video encoding (Michael) +- new video rate control (Michael) +- added MSMPEG4V1, MSMPEGV2 and WMV1 support (Michael) +- great performance improvement of video encoders and decoders (Michael) +- new and faster bit readers and vlc parsers (Michael) +- high quality encoding mode: tries all macroblock/VLC types (Michael) +- added DV video decoder +- preliminary RTP/RTSP support in ffserver and libavformat +- H.263+ AIC decoding/encoding support (Juanjo) +- VCD MPEG-PS mode (Juanjo) +- PSNR stuff (Juanjo) +- simple stats output (Juanjo) +- 16-bit and 15-bit RGB/BGR/GBR support (Bisqwit) + + +version 0.4.5: + +- some header fixes (Zdenek Kabelac ) +- many MMX optimizations (Nick Kurshev ) +- added configure system (actually a small shell script) +- added MPEG audio layer 1/2/3 decoding using LGPL'ed mpglib by + Michael Hipp (temporary solution - waiting for integer only + decoder) +- fixed VIDIOCSYNC interrupt +- added Intel H.263 decoding support ('I263' AVI fourCC) +- added Real Video 1.0 decoding (needs further testing) +- simplified image formats again. Added PGM format (=grey + pgm). Renamed old PGM to PGMYUV. +- fixed msmpeg4 slice issues (tell me if you still find problems) +- fixed OpenDivX bugs with newer versions (added VOL header decoding) +- added support for MPlayer interface +- added macroblock skip optimization +- added MJPEG decoder +- added mmx/mmxext IDCT from libmpeg2 +- added pgmyuvpipe, ppm, and ppm_pipe formats (original patch by Celer + ) +- added pixel format conversion layer (e.g. for MJPEG or PPM) +- added deinterlacing option +- MPEG-1/2 fixes +- MPEG-4 vol header fixes (Jonathan Marsden ) +- ARM optimizations (Lionel Ulmer ). +- Windows porting of file converter +- added MJPEG raw format (input/output) +- added JPEG image format support (input/output) + + +version 0.4.4: + +- fixed some std header definitions (Bjorn Lindgren + ). +- added MPEG demuxer (MPEG-1 and 2 compatible). +- added ASF demuxer +- added prototype RM demuxer +- added AC3 decoding (done with libac3 by Aaron Holtzman) +- added decoding codec parameter guessing (.e.g. for MPEG, because the + header does not include them) +- fixed header generation in MPEG-1, AVI and ASF muxer: wmplayer can now + play them (only tested video) +- fixed H.263 white bug +- fixed phase rounding in img resample filter +- add MMX code for polyphase img resample filter +- added CPU autodetection +- added generic title/author/copyright/comment string handling (ASF and RM + use them) +- added SWF demux to extract MP3 track (not usable yet because no MP3 + decoder) +- added fractional frame rate support +- codecs are no longer searched by read_header() (should fix ffserver + segfault) + + +version 0.4.3: + +- BGR24 patch (initial patch by Jeroen Vreeken ) +- fixed raw yuv output +- added motion rounding support in MPEG-4 +- fixed motion bug rounding in MSMPEG4 +- added B-frame handling in video core +- added full MPEG-1 decoding support +- added partial (frame only) MPEG-2 support +- changed the FOURCC code for H.263 to "U263" to be able to see the + +AVI/H.263 file with the UB Video H.263+ decoder. MPlayer works with + this +codec ;) (JuanJo). +- Halfpel motion estimation after MB type selection (JuanJo) +- added pgm and .Y.U.V output format +- suppressed 'img:' protocol. Simply use: /tmp/test%d.[pgm|Y] as input or + output. +- added pgmpipe I/O format (original patch from Martin Aumueller + , but changed completely since we use a format + instead of a protocol) + + +version 0.4.2: + +- added H.263/MPEG-4/MSMPEG4 decoding support. MPEG-4 decoding support + (for OpenDivX) is almost complete: 8x8 MVs and rounding are + missing. MSMPEG4 support is complete. +- added prototype MPEG-1 decoder. Only I- and P-frames handled yet (it + can decode ffmpeg MPEGs :-)). +- added libavcodec API documentation (see apiexample.c). +- fixed image polyphase bug (the bottom of some images could be + greenish) +- added support for non clipped motion vectors (decoding only) + and image sizes non-multiple of 16 +- added support for AC prediction (decoding only) +- added file overwrite confirmation (can be disabled with -y) +- added custom size picture to H.263 using H.263+ (Juanjo) + + +version 0.4.1: + +- added MSMPEG4 (aka DivX) compatible encoder. Changed default codec + of AVI and ASF to DIV3. +- added -me option to set motion estimation method + (default=log). suppressed redundant -hq option. +- added options -acodec and -vcodec to force a given codec (useful for + AVI for example) +- fixed -an option +- improved dct_quantize speed +- factorized some motion estimation code + + +version 0.4.0: + +- removing grab code from ffserver and moved it to ffmpeg. Added + multistream support to ffmpeg. +- added timeshifting support for live feeds (option ?date=xxx in the + URL) +- added high quality image resize code with polyphase filter (need + mmx/see optimization). Enable multiple image size support in ffserver. +- added multi live feed support in ffserver +- suppressed master feature from ffserver (it should be done with an + external program which opens the .ffm url and writes it to another + ffserver) +- added preliminary support for video stream parsing (WAV and AVI half + done). Added proper support for audio/video file conversion in + ffmpeg. +- added preliminary support for video file sending from ffserver +- redesigning I/O subsystem: now using URL based input and output + (see avio.h) +- added WAV format support +- added "tty user interface" to ffmpeg to stop grabbing gracefully +- added MMX/SSE optimizations to SAD (Sums of Absolutes Differences) + (Juan J. Sierralta P. a.k.a. "Juanjo" ) +- added MMX DCT from mpeg2_movie 1.5 (Juanjo) +- added new motion estimation algorithms, log and phods (Juanjo) +- changed directories: libav for format handling, libavcodec for + codecs + + +version 0.3.4: + +- added stereo in MPEG audio encoder + + +version 0.3.3: + +- added 'high quality' mode which use motion vectors. It can be used in + real time at low resolution. +- fixed rounding problems which caused quality problems at high + bitrates and large GOP size + + +version 0.3.2: small fixes + +- ASF fixes +- put_seek bug fix + + +version 0.3.1: added avi/divx support + +- added AVI support +- added MPEG-4 codec compatible with OpenDivX. It is based on the H.263 codec +- added sound for flash format (not tested) + + +version 0.3: initial public release diff --git a/3rdparty/ffmpeg/LICENSE.md b/3rdparty/ffmpeg/LICENSE.md index 613070e1b6..371b0913ce 100644 --- a/3rdparty/ffmpeg/LICENSE.md +++ b/3rdparty/ffmpeg/LICENSE.md @@ -12,7 +12,6 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+. Specifically, the GPL parts of FFmpeg are: -- libpostproc - optional x86 optimization in the files - `libavcodec/x86/flac_dsp_gpl.asm` - `libavcodec/x86/idct_mmx.c` @@ -45,7 +44,6 @@ Specifically, the GPL parts of FFmpeg are: - `vf_owdenoise.c` - `vf_perspective.c` - `vf_phase.c` - - `vf_pp.c` - `vf_pp7.c` - `vf_pullup.c` - `vf_repeatfields.c` diff --git a/3rdparty/ffmpeg/headers-version.txt b/3rdparty/ffmpeg/headers-version.txt index 128afd6815..07327f9f66 100644 --- a/3rdparty/ffmpeg/headers-version.txt +++ b/3rdparty/ffmpeg/headers-version.txt @@ -1 +1 @@ -ffmpeg-7.0.2 from https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz \ No newline at end of file +ffmpeg-8.0 from https://ffmpeg.org/releases/ffmpeg-8.0.tar.xz \ No newline at end of file diff --git a/3rdparty/ffmpeg/include/libavcodec/avcodec.h b/3rdparty/ffmpeg/include/libavcodec/avcodec.h index 83dc487251..108df5a24e 100644 --- a/3rdparty/ffmpeg/include/libavcodec/avcodec.h +++ b/3rdparty/ffmpeg/include/libavcodec/avcodec.h @@ -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(). * @@ -419,6 +399,12 @@ typedef struct RcOverride{ */ #define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3) +/** + * Decoding only. + * Do not apply picture enhancement layers, export them instead. + */ +#define AV_CODEC_EXPORT_DATA_ENHANCEMENTS (1 << 4) + /** * The decoder will keep a reference to the frame and may reuse it later. */ @@ -509,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; @@ -559,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. * @@ -1175,6 +1149,10 @@ typedef struct AVCodecContext { * this callback and filled with the extra buffers if there are more * buffers than buf[] can hold. extended_buf will be freed in * av_frame_unref(). + * Decoders will generally initialize the whole buffer before it is output + * but it can in rare error conditions happen that uninitialized data is passed + * through. \important The buffers returned by get_buffer* should thus not contain sensitive + * data. * * If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call * avcodec_default_get_buffer2() instead of providing buffers allocated by @@ -1538,6 +1516,7 @@ typedef struct AVCodecContext { #define FF_DCT_MMX 3 #define FF_DCT_ALTIVEC 5 #define FF_DCT_FAAN 6 +#define FF_DCT_NEON 7 /** * IDCT algorithm, see FF_IDCT_* below. @@ -1637,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. @@ -1884,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; @@ -2071,7 +1919,7 @@ typedef struct AVCodecContext { * - encoding: may be set by user before calling avcodec_open2() for * encoder configuration. Afterwards owned and freed by the * encoder. - * - decoding: unused + * - decoding: may be set by libavcodec in avcodec_open2(). */ AVFrameSideData **decoded_side_data; int nb_decoded_side_data; @@ -2369,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. * @@ -2690,6 +2520,36 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref); +enum AVCodecConfig { + AV_CODEC_CONFIG_PIX_FORMAT, ///< AVPixelFormat, terminated by AV_PIX_FMT_NONE + AV_CODEC_CONFIG_FRAME_RATE, ///< AVRational, terminated by {0, 0} + AV_CODEC_CONFIG_SAMPLE_RATE, ///< int, terminated by 0 + AV_CODEC_CONFIG_SAMPLE_FORMAT, ///< AVSampleFormat, terminated by AV_SAMPLE_FMT_NONE + AV_CODEC_CONFIG_CHANNEL_LAYOUT, ///< AVChannelLayout, terminated by {0} + AV_CODEC_CONFIG_COLOR_RANGE, ///< AVColorRange, terminated by AVCOL_RANGE_UNSPECIFIED + AV_CODEC_CONFIG_COLOR_SPACE, ///< AVColorSpace, terminated by AVCOL_SPC_UNSPECIFIED +}; + +/** + * Retrieve a list of all supported values for a given configuration type. + * + * @param avctx An optional context to use. Values such as + * `strict_std_compliance` may affect the result. If NULL, + * default values are used. + * @param codec The codec to query, or NULL to use avctx->codec. + * @param config The configuration to query. + * @param flags Currently unused; should be set to zero. + * @param out_configs On success, set to a list of configurations, terminated + * by a config-specific terminator, or NULL if all + * possible values are supported. + * @param out_num_configs On success, set to the number of elements in + *out_configs, excluding the terminator. Optional. + */ +int avcodec_get_supported_config(const AVCodecContext *avctx, + const AVCodec *codec, enum AVCodecConfig config, + unsigned flags, const void **out_configs, + int *out_num_configs); + /** @@ -3040,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. @@ -3075,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); diff --git a/3rdparty/ffmpeg/include/libavcodec/codec.h b/3rdparty/ffmpeg/include/libavcodec/codec.h index 6f9b42760d..f509e5d94e 100644 --- a/3rdparty/ffmpeg/include/libavcodec/codec.h +++ b/3rdparty/ffmpeg/include/libavcodec/codec.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 @@ -205,10 +190,19 @@ typedef struct AVCodec { */ int capabilities; uint8_t max_lowres; ///< maximum value for lowres supported by the decoder - const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0} - const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1 - const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 - const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 + + /** + * Deprecated codec capabilities. + */ + attribute_deprecated + const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config() + attribute_deprecated + const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config() + attribute_deprecated + const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config() + attribute_deprecated + const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config() + const AVClass *priv_class; ///< AVClass for the private context const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN} @@ -226,7 +220,9 @@ typedef struct AVCodec { /** * Array of supported channel layouts, terminated with a zeroed layout. + * @deprecated use avcodec_get_supported_config() */ + attribute_deprecated const AVChannelLayout *ch_layouts; } AVCodec; diff --git a/3rdparty/ffmpeg/include/libavcodec/codec_id.h b/3rdparty/ffmpeg/include/libavcodec/codec_id.h index c8dc21da74..c4842e61ff 100644 --- a/3rdparty/ffmpeg/include/libavcodec/codec_id.h +++ b/3rdparty/ffmpeg/include/libavcodec/codec_id.h @@ -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, @@ -543,6 +554,8 @@ enum AVCodecID { AV_CODEC_ID_AC4, 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. @@ -572,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. @@ -588,6 +602,8 @@ enum AVCodecID { AV_CODEC_ID_TIMED_ID3, 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 diff --git a/3rdparty/ffmpeg/include/libavcodec/codec_par.h b/3rdparty/ffmpeg/include/libavcodec/codec_par.h index f4b9bb5c06..64b01f7e02 100644 --- a/3rdparty/ffmpeg/include/libavcodec/codec_par.h +++ b/3rdparty/ffmpeg/include/libavcodec/codec_par.h @@ -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. diff --git a/3rdparty/ffmpeg/include/libavcodec/defs.h b/3rdparty/ffmpeg/include/libavcodec/defs.h index 00d840ec19..b13e983b13 100644 --- a/3rdparty/ffmpeg/include/libavcodec/defs.h +++ b/3rdparty/ffmpeg/include/libavcodec/defs.h @@ -73,6 +73,7 @@ #define AV_PROFILE_AAC_HE_V2 28 #define AV_PROFILE_AAC_LD 22 #define AV_PROFILE_AAC_ELD 38 +#define AV_PROFILE_AAC_USAC 41 #define AV_PROFILE_MPEG2_AAC_LOW 128 #define AV_PROFILE_MPEG2_AAC_HE 131 @@ -159,6 +160,7 @@ #define AV_PROFILE_HEVC_MAIN_10 2 #define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3 #define AV_PROFILE_HEVC_REXT 4 +#define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6 #define AV_PROFILE_HEVC_SCC 9 #define AV_PROFILE_VVC_MAIN_10 1 @@ -183,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 @@ -192,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 @@ -323,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. * diff --git a/3rdparty/ffmpeg/include/libavcodec/packet.h b/3rdparty/ffmpeg/include/libavcodec/packet.h index b0ba3baea2..55389a957d 100644 --- a/3rdparty/ffmpeg/include/libavcodec/packet.h +++ b/3rdparty/ffmpeg/include/libavcodec/packet.h @@ -59,10 +59,6 @@ enum AVPacketSideDataType { * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: * @code * u32le param_flags - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) - * s32le channel_count - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) - * u64le channel_layout * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) * s32le sample_rate * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) @@ -146,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 @@ -330,6 +326,42 @@ enum AVPacketSideDataType { */ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT, + /** + * The number of pixels to discard from the top/bottom/left/right border of the + * decoded frame to obtain the sub-rectangle intended for presentation. + * + * @code + * u32le crop_top + * u32le crop_bottom + * u32le crop_left + * u32le crop_right + * @endcode + */ + AV_PKT_DATA_FRAME_CROPPING, + + /** + * Raw LCEVC payload data, as a uint8_t array, with NAL emulation + * bytes intact. + */ + 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 @@ -341,8 +373,6 @@ enum AVPacketSideDataType { AV_PKT_DATA_NB }; -#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED - /** * This structure stores auxiliary information for decoding, presenting, or * otherwise processing the coded stream. It is typically exported by demuxers @@ -351,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. @@ -863,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); + /** * @} */ diff --git a/3rdparty/ffmpeg/include/libavcodec/vdpau.h b/3rdparty/ffmpeg/include/libavcodec/vdpau.h index 8021c25761..da77c5daed 100644 --- a/3rdparty/ffmpeg/include/libavcodec/vdpau.h +++ b/3rdparty/ffmpeg/include/libavcodec/vdpau.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 */ diff --git a/3rdparty/ffmpeg/include/libavcodec/version.h b/3rdparty/ffmpeg/include/libavcodec/version.h index 43794ea588..8b53586be1 100644 --- a/3rdparty/ffmpeg/include/libavcodec/version.h +++ b/3rdparty/ffmpeg/include/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 3 +#define LIBAVCODEC_VERSION_MINOR 11 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/3rdparty/ffmpeg/include/libavcodec/version_major.h b/3rdparty/ffmpeg/include/libavcodec/version_major.h index ab1f4511b4..97e4e12065 100644 --- a/3rdparty/ffmpeg/include/libavcodec/version_major.h +++ b/3rdparty/ffmpeg/include/libavcodec/version_major.h @@ -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,15 +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_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 */ diff --git a/3rdparty/ffmpeg/include/libavformat/avformat.h b/3rdparty/ffmpeg/include/libavformat/avformat.h index de40397676..be6e532387 100644 --- a/3rdparty/ffmpeg/include/libavformat/avformat.h +++ b/3rdparty/ffmpeg/include/libavformat/avformat.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 */ @@ -713,6 +709,11 @@ typedef struct AVIndexEntry { * The video stream contains still images. */ #define AV_DISPOSITION_STILL_IMAGE (1 << 20) +/** + * The video stream contains multiple layers, e.g. stereoscopic views (cf. H.264 + * Annex G/H, or HEVC Annex F). + */ +#define AV_DISPOSITION_MULTILAYER (1 << 21) /** * @return The AV_DISPOSITION_* flag corresponding to disp or a negative error @@ -842,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_*. @@ -957,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: * * +-----------+ * | %%%%% | @@ -1077,13 +1046,52 @@ 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; +/** + * AVStreamGroupLCEVC is meant to define the relation between video streams + * and a data stream containing LCEVC enhancement layer NALUs. + * + * No more than one stream of @ref AVCodecParameters.codec_type "codec_type" + * AVMEDIA_TYPE_DATA shall be present, and it must be of + * @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC. + */ +typedef struct AVStreamGroupLCEVC { + const AVClass *av_class; + + /** + * Index of the LCEVC data stream in AVStreamGroup. + */ + unsigned int lcevc_index; + /** + * Width of the final stream for presentation. + */ + int width; + /** + * Height of the final image for presentation. + */ + int height; +} AVStreamGroupLCEVC; + enum AVStreamGroupParamsType { AV_STREAM_GROUP_PARAMS_NONE, AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT, AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION, AV_STREAM_GROUP_PARAMS_TILE_GRID, + AV_STREAM_GROUP_PARAMS_LCEVC, }; struct AVIAMFAudioElement; @@ -1125,6 +1133,7 @@ typedef struct AVStreamGroup { struct AVIAMFAudioElement *iamf_audio_element; struct AVIAMFMixPresentation *iamf_mix_presentation; struct AVStreamGroupTileGrid *tile_grid; + struct AVStreamGroupLCEVC *lcevc; } params; /** @@ -1411,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 @@ -1425,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 /** @@ -1439,7 +1445,7 @@ typedef struct AVFormatContext { * * @note this is \e not used for determining the \ref AVInputFormat * "input format" - * @sa format_probesize + * @see format_probesize */ int64_t probesize; @@ -1664,9 +1670,11 @@ 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 + * + * @see duration_probesize */ int skip_estimate_duration_from_pts; @@ -1729,7 +1737,7 @@ typedef struct AVFormatContext { * * Demuxing only, set by the caller before avformat_open_input(). * - * @sa probesize + * @see probesize */ int format_probesize; @@ -1765,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. */ @@ -1861,40 +1869,23 @@ 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 */ int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb); + + /** + * Maximum number of bytes read from input in order to determine stream durations + * when using estimate_timings_from_pts in avformat_find_stream_info(). + * Demuxing only, set by the caller before avformat_find_stream_info(). + * Can be set to 0 to let avformat choose using a heuristic. + * + * @see skip_estimate_duration_from_pts + */ + 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 @@ -2072,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); /** @@ -2231,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. @@ -2240,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. */ @@ -3030,6 +2971,7 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int avformat_queue_attached_pictures(AVFormatContext *s); +#if FF_API_INTERNAL_TIMING enum AVTimebaseSource { AVFMT_TBCF_AUTO = -1, AVFMT_TBCF_DECODER, @@ -3040,25 +2982,20 @@ enum AVTimebaseSource { }; /** - * Transfer internal timing information from one stream to another. - * - * This function is useful when doing stream copy. - * - * @param ofmt target output format for ost - * @param ost output stream which needs timings copy and adjustments - * @param ist reference input stream to copy timings from - * @param copy_tb define from where the stream codec timebase needs to be imported + * @deprecated do not call this function */ +attribute_deprecated int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb); /** - * Get the internal codec timebase from a stream. - * - * @param st input stream to extract the timebase from + * @deprecated do not call this function */ +attribute_deprecated AVRational av_stream_get_codec_timebase(const AVStream *st); +#endif + /** * @} diff --git a/3rdparty/ffmpeg/include/libavformat/version.h b/3rdparty/ffmpeg/include/libavformat/version.h index a7c80dc564..7ff1483912 100644 --- a/3rdparty/ffmpeg/include/libavformat/version.h +++ b/3rdparty/ffmpeg/include/libavformat/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 1 +#define LIBAVFORMAT_VERSION_MINOR 3 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/3rdparty/ffmpeg/include/libavformat/version_major.h b/3rdparty/ffmpeg/include/libavformat/version_major.h index 44ad23c6b6..c2f6e1616b 100644 --- a/3rdparty/ffmpeg/include/libavformat/version_major.h +++ b/3rdparty/ffmpeg/include/libavformat/version_major.h @@ -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,12 +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 < 63) + +#define FF_API_NO_DEFAULT_TLS_VERIFY (LIBAVFORMAT_VERSION_MAJOR < 63) #define FF_API_R_FRAME_RATE 1 diff --git a/3rdparty/ffmpeg/include/libavutil/attributes.h b/3rdparty/ffmpeg/include/libavutil/attributes.h index 04c615c952..d15ede1286 100644 --- a/3rdparty/ffmpeg/include/libavutil/attributes.h +++ b/3rdparty/ffmpeg/include/libavutil/attributes.h @@ -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__) diff --git a/3rdparty/ffmpeg/include/libavutil/avassert.h b/3rdparty/ffmpeg/include/libavutil/avassert.h index 1895fb7551..f4f039dfb0 100644 --- a/3rdparty/ffmpeg/include/libavutil/avassert.h +++ b/3rdparty/ffmpeg/include/libavutil/avassert.h @@ -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 +#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 */ diff --git a/3rdparty/ffmpeg/include/libavutil/avstring.h b/3rdparty/ffmpeg/include/libavutil/avstring.h index fc095349d2..17f7b03db5 100644 --- a/3rdparty/ffmpeg/include/libavutil/avstring.h +++ b/3rdparty/ffmpeg/include/libavutil/avstring.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); /** * @} diff --git a/3rdparty/ffmpeg/include/libavutil/avutil.h b/3rdparty/ffmpeg/include/libavutil/avutil.h index d2900dcb48..c8ae114ab6 100644 --- a/3rdparty/ffmpeg/include/libavutil/avutil.h +++ b/3rdparty/ffmpeg/include/libavutil/avutil.h @@ -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. diff --git a/3rdparty/ffmpeg/include/libavutil/bswap.h b/3rdparty/ffmpeg/include/libavutil/bswap.h index 4840ab433f..f53e5768ad 100644 --- a/3rdparty/ffmpeg/include/libavutil/bswap.h +++ b/3rdparty/ffmpeg/include/libavutil/bswap.h @@ -34,16 +34,10 @@ #include "config.h" -#if ARCH_AARCH64 -# include "aarch64/bswap.h" -#elif ARCH_ARM +#if ARCH_ARM # include "arm/bswap.h" -#elif ARCH_AVR32 -# include "avr32/bswap.h" #elif ARCH_RISCV # include "riscv/bswap.h" -#elif ARCH_SH4 -# include "sh4/bswap.h" #elif ARCH_X86 # include "x86/bswap.h" #endif diff --git a/3rdparty/ffmpeg/include/libavutil/channel_layout.h b/3rdparty/ffmpeg/include/libavutil/channel_layout.h index 8a078d1601..5ad2d5ed98 100644 --- a/3rdparty/ffmpeg/include/libavutil/channel_layout.h +++ b/3rdparty/ffmpeg/include/libavutil/channel_layout.h @@ -45,7 +45,7 @@ */ enum AVChannel { - ///< Invalid channel index + /// Invalid channel index AV_CHAN_NONE = -1, AV_CHAN_FRONT_LEFT, AV_CHAN_FRONT_RIGHT, @@ -79,6 +79,13 @@ enum AVChannel { AV_CHAN_BOTTOM_FRONT_CENTER, AV_CHAN_BOTTOM_FRONT_LEFT, AV_CHAN_BOTTOM_FRONT_RIGHT, + AV_CHAN_SIDE_SURROUND_LEFT, ///< +90 degrees, Lss, SiL + AV_CHAN_SIDE_SURROUND_RIGHT, ///< -90 degrees, Rss, SiR + 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, @@ -195,6 +202,12 @@ enum AVChannelOrder { #define AV_CH_BOTTOM_FRONT_CENTER (1ULL << AV_CHAN_BOTTOM_FRONT_CENTER ) #define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT ) #define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT ) +#define AV_CH_SIDE_SURROUND_LEFT (1ULL << AV_CHAN_SIDE_SURROUND_LEFT ) +#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 ) /** * @} @@ -227,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 @@ -291,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 @@ -349,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; @@ -401,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) @@ -409,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) @@ -679,6 +698,16 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout); */ int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1); +/** + * Return the order if the layout is n-th order standard-order ambisonic. + * The presence of optional extra non-diegetic channels at the end is not taken + * into account. + * + * @param channel_layout input channel layout + * @return the order of the layout, a negative error code otherwise. + */ +int av_channel_layout_ambisonic_order(const AVChannelLayout *channel_layout); + /** * The conversion must be lossless. */ diff --git a/3rdparty/ffmpeg/include/libavutil/common.h b/3rdparty/ffmpeg/include/libavutil/common.h index 57c87f1919..3b830daf30 100644 --- a/3rdparty/ffmpeg/include/libavutil/common.h +++ b/3rdparty/ffmpeg/include/libavutil/common.h @@ -42,12 +42,14 @@ #include "attributes.h" #include "error.h" #include "macros.h" -#include "mem.h" +#include "version.h" #ifdef HAVE_AV_CONFIG_H # include "config.h" # include "intmath.h" # include "internal.h" +#else +# include "mem.h" #endif /* HAVE_AV_CONFIG_H */ //rounded division & shift @@ -121,9 +123,6 @@ #ifndef av_clip_uintp2 # define av_clip_uintp2 av_clip_uintp2_c #endif -#ifndef av_mod_uintp2 -# define av_mod_uintp2 av_mod_uintp2_c -#endif #ifndef av_sat_add32 # define av_sat_add32 av_sat_add32_c #endif @@ -148,6 +147,9 @@ #ifndef av_clipd # define av_clipd av_clipd_c #endif +#ifndef av_zero_extend +# define av_zero_extend av_zero_extend_c +#endif #ifndef av_popcount # define av_popcount av_popcount_c #endif @@ -251,8 +253,8 @@ static av_always_inline av_const int16_t av_clip_int16_c(int a) */ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a) { - if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF); - else return (int32_t)a; + if ((a+UINT64_C(0x80000000)) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF); + else return (int32_t)a; } /** @@ -263,7 +265,7 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a) */ static av_always_inline av_const int av_clip_intp2_c(int a, int p) { - if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) + if (((unsigned)a + (1U << p)) & ~((2U << p) - 1)) return (a >> 31) ^ ((1 << p) - 1); else return a; @@ -277,21 +279,35 @@ static av_always_inline av_const int av_clip_intp2_c(int a, int p) */ static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p) { - if (a & ~((1<> 31 & ((1<> 31 & ((1U<= 2 + if (p > 31) abort(); +#endif return a & ((1U << p) - 1); } +#if FF_API_MOD_UINTP2 +#ifndef av_mod_uintp2 +# define av_mod_uintp2 av_mod_uintp2_c +#endif +attribute_deprecated +static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p) +{ + return av_zero_extend_c(a, p); +} +#endif + /** * Add two signed 32-bit values with saturation. * diff --git a/3rdparty/ffmpeg/include/libavutil/cpu.h b/3rdparty/ffmpeg/include/libavutil/cpu.h index 8dff341886..5ef5da58eb 100644 --- a/3rdparty/ffmpeg/include/libavutil/cpu.h +++ b/3rdparty/ffmpeg/include/libavutil/cpu.h @@ -22,6 +22,7 @@ #define AVUTIL_CPU_H #include +#include "version.h" #define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ @@ -71,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) @@ -82,14 +85,24 @@ // RISC-V extensions #define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank) +#if FF_API_RISCV_FD_ZBA #define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP) #define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP) +#endif #define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */ #define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */ #define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */ #define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's #define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations +#if FF_API_RISCV_FD_ZBA #define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations +#endif +#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations +#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses +#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations) + +// WASM extensions +#define AV_CPU_FLAG_SIMD128 (1 << 0) /** * Return the flags which specify extensions supported by the CPU. diff --git a/3rdparty/ffmpeg/include/libavutil/csp.h b/3rdparty/ffmpeg/include/libavutil/csp.h index 73bce52bc0..9871b1c9b2 100644 --- a/3rdparty/ffmpeg/include/libavutil/csp.h +++ b/3rdparty/ffmpeg/include/libavutil/csp.h @@ -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); + /** * @} */ diff --git a/3rdparty/ffmpeg/include/libavutil/dict.h b/3rdparty/ffmpeg/include/libavutil/dict.h index 713c9e361a..93c7cbf128 100644 --- a/3rdparty/ffmpeg/include/libavutil/dict.h +++ b/3rdparty/ffmpeg/include/libavutil/dict.h @@ -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 diff --git a/3rdparty/ffmpeg/include/libavutil/dovi_meta.h b/3rdparty/ffmpeg/include/libavutil/dovi_meta.h index 3d11e02bff..5e8a1e43d7 100644 --- a/3rdparty/ffmpeg/include/libavutil/dovi_meta.h +++ b/3rdparty/ffmpeg/include/libavutil/dovi_meta.h @@ -29,7 +29,9 @@ #include #include + #include "rational.h" +#include "csp.h" /* * DOVI configuration @@ -44,6 +46,7 @@ * uint8_t el_present_flag * uint8_t bl_present_flag * uint8_t dv_bl_signal_compatibility_id + * uint8_t dv_md_compression, the compression method in use * @endcode * * @note The struct must be allocated with av_dovi_alloc() and @@ -58,8 +61,16 @@ typedef struct AVDOVIDecoderConfigurationRecord { uint8_t el_present_flag; uint8_t bl_present_flag; uint8_t dv_bl_signal_compatibility_id; + uint8_t dv_md_compression; } AVDOVIDecoderConfigurationRecord; +enum AVDOVICompression { + AV_DOVI_COMPRESSION_NONE = 0, + AV_DOVI_COMPRESSION_LIMITED = 1, + AV_DOVI_COMPRESSION_RESERVED = 2, + AV_DOVI_COMPRESSION_EXTENDED = 3, +}; + /** * Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its * fields to default values. @@ -89,6 +100,8 @@ typedef struct AVDOVIRpuDataHeader { uint8_t spatial_resampling_filter_flag; uint8_t el_spatial_resampling_filter_flag; uint8_t disable_residual_flag; + uint8_t ext_mapping_idc_0_4; /* extended base layer inverse mapping indicator */ + uint8_t ext_mapping_idc_5_7; /* reserved */ } AVDOVIRpuDataHeader; enum AVDOVIMappingMethod { @@ -147,6 +160,7 @@ typedef struct AVDOVIDataMapping { uint32_t num_x_partitions; uint32_t num_y_partitions; AVDOVINLQParams nlq[3]; /* per component */ + uint16_t nlq_pivots[2]; } AVDOVIDataMapping; /** @@ -186,6 +200,132 @@ typedef struct AVDOVIColorMetadata { uint16_t source_diagonal; } AVDOVIColorMetadata; +typedef struct AVDOVIDmLevel1 { + /* Per-frame brightness metadata */ + uint16_t min_pq; + uint16_t max_pq; + uint16_t avg_pq; +} AVDOVIDmLevel1; + +typedef struct AVDOVIDmLevel2 { + /* Usually derived from level 8 (at different levels) */ + uint16_t target_max_pq; + uint16_t trim_slope; + uint16_t trim_offset; + uint16_t trim_power; + uint16_t trim_chroma_weight; + uint16_t trim_saturation_gain; + int16_t ms_weight; +} AVDOVIDmLevel2; + +typedef struct AVDOVIDmLevel3 { + uint16_t min_pq_offset; + uint16_t max_pq_offset; + uint16_t avg_pq_offset; +} AVDOVIDmLevel3; + +typedef struct AVDOVIDmLevel4 { + uint16_t anchor_pq; + uint16_t anchor_power; +} AVDOVIDmLevel4; + +typedef struct AVDOVIDmLevel5 { + /* Active area definition */ + uint16_t left_offset; + uint16_t right_offset; + uint16_t top_offset; + uint16_t bottom_offset; +} AVDOVIDmLevel5; + +typedef struct AVDOVIDmLevel6 { + /* Static HDR10 metadata */ + uint16_t max_luminance; + uint16_t min_luminance; + uint16_t max_cll; + uint16_t max_fall; +} AVDOVIDmLevel6; + +typedef struct AVDOVIDmLevel8 { + /* Extended version of level 2 */ + uint8_t target_display_index; + uint16_t trim_slope; + uint16_t trim_offset; + uint16_t trim_power; + uint16_t trim_chroma_weight; + uint16_t trim_saturation_gain; + uint16_t ms_weight; + uint16_t target_mid_contrast; + uint16_t clip_trim; + uint8_t saturation_vector_field[6]; + uint8_t hue_vector_field[6]; +} AVDOVIDmLevel8; + +typedef struct AVDOVIDmLevel9 { + /* Source display characteristics */ + uint8_t source_primary_index; + AVColorPrimariesDesc source_display_primaries; +} AVDOVIDmLevel9; + +typedef struct AVDOVIDmLevel10 { + /* Target display characteristics */ + uint8_t target_display_index; + uint16_t target_max_pq; + uint16_t target_min_pq; + uint8_t target_primary_index; + AVColorPrimariesDesc target_display_primaries; +} AVDOVIDmLevel10; + +typedef struct AVDOVIDmLevel11 { + uint8_t content_type; + uint8_t whitepoint; + uint8_t reference_mode_flag; + uint8_t sharpness; + uint8_t noise_reduction; + uint8_t mpeg_noise_reduction; + uint8_t frame_rate_conversion; + uint8_t brightness; + uint8_t color; +} AVDOVIDmLevel11; + +typedef struct AVDOVIDmLevel254 { + /* DMv2 info block, always present in samples with DMv2 metadata */ + uint8_t dm_mode; + uint8_t dm_version_index; +} AVDOVIDmLevel254; + +typedef struct AVDOVIDmLevel255 { + /* Debug block, not really used in samples */ + uint8_t dm_run_mode; + uint8_t dm_run_version; + uint8_t dm_debug[4]; +} AVDOVIDmLevel255; + +/** + * Dolby Vision metadata extension block. Dynamic extension blocks may change + * from frame to frame, while static blocks are constant throughout the entire + * sequence. + * + * @note sizeof(AVDOVIDmData) is not part of the public API. + */ +typedef struct AVDOVIDmData { + uint8_t level; /* [1, 255] */ + union { + AVDOVIDmLevel1 l1; /* dynamic */ + AVDOVIDmLevel2 l2; /* dynamic, may appear multiple times */ + AVDOVIDmLevel3 l3; /* dynamic */ + AVDOVIDmLevel4 l4; /* dynamic */ + AVDOVIDmLevel5 l5; /* dynamic */ + AVDOVIDmLevel6 l6; /* static */ + /* level 7 is currently unused */ + AVDOVIDmLevel8 l8; /* dynamic, may appear multiple times */ + AVDOVIDmLevel9 l9; /* dynamic */ + AVDOVIDmLevel10 l10; /* static, may appear multiple times */ + AVDOVIDmLevel11 l11; /* dynamic */ + AVDOVIDmLevel254 l254; /* static */ + AVDOVIDmLevel255 l255; /* static */ + }; +} AVDOVIDmData; + /** * Combined struct representing a combination of header, mapping and color * metadata, for attaching to frames as side data. @@ -202,6 +342,13 @@ typedef struct AVDOVIMetadata { size_t header_offset; /* AVDOVIRpuDataHeader */ size_t mapping_offset; /* AVDOVIDataMapping */ size_t color_offset; /* AVDOVIColorMetadata */ + + size_t ext_block_offset; /* offset to start of ext blocks array */ + size_t ext_block_size; /* size per element */ + int num_ext_blocks; /* number of extension blocks */ + + /* static limit on num_ext_blocks, derived from bitstream limitations */ +#define AV_DOVI_MAX_EXT_BLOCKS 32 } AVDOVIMetadata; static av_always_inline AVDOVIRpuDataHeader * @@ -222,6 +369,19 @@ av_dovi_get_color(const AVDOVIMetadata *data) return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset); } +static av_always_inline AVDOVIDmData * +av_dovi_get_ext(const AVDOVIMetadata *data, int index) +{ + return (AVDOVIDmData *)((uint8_t *) data + data->ext_block_offset + + data->ext_block_size * index); +} + +/** + * Find an extension block with a given level, or NULL. In the case of + * multiple extension blocks, only the first is returned. + */ +AVDOVIDmData *av_dovi_find_level(const AVDOVIMetadata *data, uint8_t level); + /** * Allocate an AVDOVIMetadata structure and initialize its * fields to default values. diff --git a/3rdparty/ffmpeg/include/libavutil/error.h b/3rdparty/ffmpeg/include/libavutil/error.h index 0d3269aa6d..1efa86c4c1 100644 --- a/3rdparty/ffmpeg/include/libavutil/error.h +++ b/3rdparty/ffmpeg/include/libavutil/error.h @@ -79,6 +79,7 @@ #define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1') #define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3') #define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4') +#define AVERROR_HTTP_TOO_MANY_REQUESTS FFERRTAG(0xF8,'4','2','9') #define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X') #define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X') diff --git a/3rdparty/ffmpeg/include/libavutil/fifo.h b/3rdparty/ffmpeg/include/libavutil/fifo.h index 048298214a..f2206c35f5 100644 --- a/3rdparty/ffmpeg/include/libavutil/fifo.h +++ b/3rdparty/ffmpeg/include/libavutil/fifo.h @@ -26,10 +26,6 @@ #define AVUTIL_FIFO_H #include -#include - -#include "attributes.h" -#include "version.h" /** * @defgroup lavu_fifo AVFifo diff --git a/3rdparty/ffmpeg/include/libavutil/file.h b/3rdparty/ffmpeg/include/libavutil/file.h index b5a762c28f..fced170108 100644 --- a/3rdparty/ffmpeg/include/libavutil/file.h +++ b/3rdparty/ffmpeg/include/libavutil/file.h @@ -22,7 +22,6 @@ #include #include -#include "version.h" #include "attributes.h" /** diff --git a/3rdparty/ffmpeg/include/libavutil/film_grain_params.h b/3rdparty/ffmpeg/include/libavutil/film_grain_params.h index ccacab88fe..2915611c9c 100644 --- a/3rdparty/ffmpeg/include/libavutil/film_grain_params.h +++ b/3rdparty/ffmpeg/include/libavutil/film_grain_params.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; /** diff --git a/3rdparty/ffmpeg/include/libavutil/frame.h b/3rdparty/ffmpeg/include/libavutil/frame.h index 8aa05ec127..d440cfba2e 100644 --- a/3rdparty/ffmpeg/include/libavutil/frame.h +++ b/3rdparty/ffmpeg/include/libavutil/frame.h @@ -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 @@ -228,6 +228,32 @@ enum AVFrameSideDataType { * encoding. */ AV_FRAME_DATA_VIDEO_HINT, + + /** + * Raw LCEVC payload data, as a uint8_t array, with NAL emulation + * bytes intact. + */ + AV_FRAME_DATA_LCEVC, + + /** + * This side data must be associated with a video frame. + * The presence of this side data indicates that the video stream is + * composed of multiple views (e.g. stereoscopic 3D content, + * cf. H.264 Annex H or H.265 Annex G). + * 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 { @@ -255,6 +281,58 @@ typedef struct AVFrameSideData { AVBufferRef *buf; } AVFrameSideData; +enum AVSideDataProps { + /** + * The side data type can be used in stream-global structures. + * Side data types without this property are only meaningful on per-frame + * basis. + */ + AV_SIDE_DATA_PROP_GLOBAL = (1 << 0), + + /** + * Multiple instances of this side data type can be meaningfully present in + * 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), +}; + +/** + * This struct describes the properties of a side data type. Its instance + * corresponding to a given type can be obtained from av_frame_side_data_desc(). + */ +typedef struct AVSideDataDescriptor { + /** + * Human-readable side data description. + */ + const char *name; + + /** + * Side data property flags, a combination of AVSideDataProps values. + */ + unsigned props; +} AVSideDataDescriptor; + /** * Structure describing a single Region Of Interest. * @@ -338,8 +416,7 @@ typedef struct AVRegionOfInterest { * to the end with a minor bump. * * Fields can be accessed through AVOptions, the name string used, matches the - * C structure field name for fields accessible through AVOptions. The AVClass - * for AVFrame can be obtained from avcodec_get_frame_class() + * C structure field name for fields accessible through AVOptions. */ typedef struct AVFrame { #define AV_NUM_DATA_POINTERS 8 @@ -430,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. */ @@ -511,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. */ @@ -606,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) /** * @} */ @@ -642,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. @@ -674,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. @@ -727,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. @@ -842,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. */ @@ -992,6 +1012,12 @@ int av_frame_apply_cropping(AVFrame *frame, int flags); */ const char *av_frame_side_data_name(enum AVFrameSideDataType type); +/** + * @return side data descriptor corresponding to a given side data type, NULL + * when not available. + */ +const AVSideDataDescriptor *av_frame_side_data_desc(enum AVFrameSideDataType type); + /** * Free all side data entries and their contents, then zeroes out the * values which the pointers are pointing to. @@ -1003,7 +1029,20 @@ const char *av_frame_side_data_name(enum AVFrameSideDataType type); */ void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd); +/** + * Remove existing entries before adding new ones. + */ #define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0) +/** + * Don't add a new entry if another of the same type exists. + * 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. @@ -1016,15 +1055,43 @@ void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd); * @param size size of the side data * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. * - * @return newly added side data on success, NULL on error. In case of - * AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching - * AVFrameSideDataType will be removed before the addition is - * attempted. + * @return newly added side data on success, NULL on error. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of + * matching AVFrameSideDataType will be removed before the addition + * is attempted. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an + * entry of the same type already exists, it will be replaced instead. */ AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type, size_t size, unsigned int flags); +/** + * Add a new side data entry to an array from an existing AVBufferRef. + * + * @param sd pointer to array of side data to which to add another entry, + * or to NULL in order to start a new array. + * @param nb_sd pointer to an integer containing the number of entries in + * the array. + * @param type type of the added side data + * @param buf Pointer to AVBufferRef to add to the array. On success, + * the function takes ownership of the AVBufferRef and *buf is + * set to NULL, unless AV_FRAME_SIDE_DATA_FLAG_NEW_REF is set + * in which case the ownership will remain with the caller. + * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. + * + * @return newly added side data on success, NULL on error. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of + * matching AVFrameSideDataType will be removed before the addition + * is attempted. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an + * entry of the same type already exists, it will be replaced instead. + * + */ +AVFrameSideData *av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd, + enum AVFrameSideDataType type, + AVBufferRef **buf, unsigned int flags); + /** * Add a new side data entry to an array based on existing side data, taking * a reference towards the contained AVBufferRef. @@ -1037,10 +1104,12 @@ AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd, * for the buffer. * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. * - * @return negative error code on failure, >=0 on success. In case of - * AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching - * AVFrameSideDataType will be removed before the addition is - * attempted. + * @return negative error code on failure, >=0 on success. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of + * matching AVFrameSideDataType will be removed before the addition + * is attempted. + * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an + * entry of the same type already exists, it will be replaced instead. */ int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd, const AVFrameSideData *src, unsigned int flags); @@ -1074,6 +1143,19 @@ const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd, nb_sd, type); } +/** + * Remove and free all side data instances of the given type from an array. + */ +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); + /** * @} */ diff --git a/3rdparty/ffmpeg/include/libavutil/hdr_dynamic_vivid_metadata.h b/3rdparty/ffmpeg/include/libavutil/hdr_dynamic_vivid_metadata.h index 4524a81557..d45b4a0f65 100644 --- a/3rdparty/ffmpeg/include/libavutil/hdr_dynamic_vivid_metadata.h +++ b/3rdparty/ffmpeg/include/libavutil/hdr_dynamic_vivid_metadata.h @@ -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; diff --git a/3rdparty/ffmpeg/include/libavutil/hwcontext.h b/3rdparty/ffmpeg/include/libavutil/hwcontext.h index bac30debae..29374cf0a7 100644 --- a/3rdparty/ffmpeg/include/libavutil/hwcontext.h +++ b/3rdparty/ffmpeg/include/libavutil/hwcontext.h @@ -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. diff --git a/3rdparty/ffmpeg/include/libavutil/hwcontext_opencl.h b/3rdparty/ffmpeg/include/libavutil/hwcontext_opencl.h index ef54486c95..22702300ad 100644 --- a/3rdparty/ffmpeg/include/libavutil/hwcontext_opencl.h +++ b/3rdparty/ffmpeg/include/libavutil/hwcontext_opencl.h @@ -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; diff --git a/3rdparty/ffmpeg/include/libavutil/hwcontext_qsv.h b/3rdparty/ffmpeg/include/libavutil/hwcontext_qsv.h index e2dba8ad83..3c16a8ab98 100644 --- a/3rdparty/ffmpeg/include/libavutil/hwcontext_qsv.h +++ b/3rdparty/ffmpeg/include/libavutil/hwcontext_qsv.h @@ -25,8 +25,8 @@ * @file * An API-specific header for AV_HWDEVICE_TYPE_QSV. * - * This API does not support dynamic frame pools. AVHWFramesContext.pool must - * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct. + * AVHWFramesContext.pool must contain AVBufferRefs whose data pointer points + * to a mfxFrameSurface1 struct. */ /** @@ -51,14 +51,36 @@ typedef struct AVQSVDeviceContext { * This struct is allocated as AVHWFramesContext.hwctx */ typedef struct AVQSVFramesContext { + /** + * A pointer to a mfxFrameSurface1 struct + * + * It is available when nb_surfaces is non-zero. + */ mfxFrameSurface1 *surfaces; + + /** + * Number of frames in the pool + * + * It is 0 for dynamic frame pools or AVHWFramesContext.initial_pool_size + * for fixed frame pools. + * + * Note only oneVPL GPU runtime 2.9+ can support dynamic frame pools + * on d3d11va or vaapi + */ int nb_surfaces; /** * A combination of MFX_MEMTYPE_* describing the frame pool. */ int frame_type; + + /** + * A pointer to a mfxFrameInfo struct + * + * It is available when nb_surfaces is 0, all buffers allocated from the + * pool have the same mfxFrameInfo. + */ + mfxFrameInfo *info; } AVQSVFramesContext; #endif /* AVUTIL_HWCONTEXT_QSV_H */ - diff --git a/3rdparty/ffmpeg/include/libavutil/hwcontext_videotoolbox.h b/3rdparty/ffmpeg/include/libavutil/hwcontext_videotoolbox.h index 600e9f2c8d..d35cfbb6c1 100644 --- a/3rdparty/ffmpeg/include/libavutil/hwcontext_videotoolbox.h +++ b/3rdparty/ffmpeg/include/libavutil/hwcontext_videotoolbox.h @@ -90,8 +90,15 @@ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pr CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc); /** - * Update a CVPixelBufferRef's metadata to based on an AVFrame. - * Returns 0 if no known equivalent was found. + * Set CVPixelBufferRef's metadata based on an AVFrame. + * + * Sets/unsets the CVPixelBuffer attachments to match as closely as possible the + * AVFrame metadata. To prevent inconsistent attachments, the attachments for properties + * that could not be matched or are unspecified in the given AVFrame are unset. So if + * any attachments already covered by AVFrame metadata need to be set to a specific + * value, this should happen after calling this function. + * + * Returns < 0 in case of an error. */ int av_vt_pixbuf_set_attachments(void *log_ctx, CVPixelBufferRef pixbuf, const struct AVFrame *src); diff --git a/3rdparty/ffmpeg/include/libavutil/hwcontext_vulkan.h b/3rdparty/ffmpeg/include/libavutil/hwcontext_vulkan.h index 895794c867..15cf515668 100644 --- a/3rdparty/ffmpeg/include/libavutil/hwcontext_vulkan.h +++ b/3rdparty/ffmpeg/include/libavutil/hwcontext_vulkan.h @@ -26,9 +26,24 @@ #include "pixfmt.h" #include "frame.h" +#include "hwcontext.h" typedef struct AVVkFrame AVVkFrame; +typedef struct AVVulkanDeviceQueueFamily { + /* Queue family index */ + int idx; + /* Number of queues in the queue family in use */ + int num; + /* Queue family capabilities. Must be non-zero. + * Flags may be removed to indicate the queue family may not be used + * for a given purpose. */ + VkQueueFlagBits flags; + /* Vulkan implementations are allowed to list multiple video queues + * which differ in what they can encode or decode. */ + VkVideoCodecOperationFlagBitsKHR video_caps; +} AVVulkanDeviceQueueFamily; + /** * @file * API-specific header for AV_HWDEVICE_TYPE_VULKAN. @@ -48,9 +63,8 @@ typedef struct AVVulkanDeviceContext { const VkAllocationCallbacks *alloc; /** - * Pointer to the instance-provided vkGetInstanceProcAddr loading function. - * If NULL, will pick either libvulkan or libvolk, depending on libavutil's - * compilation settings, and set this field. + * Pointer to a vkGetInstanceProcAddr loading function. + * If unset, will dynamically load and use libvulkan. */ PFN_vkGetInstanceProcAddr get_proc_addr; @@ -98,28 +112,35 @@ typedef struct AVVulkanDeviceContext { const char * const *enabled_dev_extensions; int nb_enabled_dev_extensions; +#if FF_API_VULKAN_FIXED_QUEUES /** * Queue family index for graphics operations, and the number of queues - * enabled for it. If 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. */ + attribute_deprecated int queue_family_index; + attribute_deprecated int nb_graphics_queues; /** * Queue family index for transfer operations and the number of queues * enabled. Required. */ + attribute_deprecated int queue_family_tx_index; + attribute_deprecated int nb_tx_queues; /** * Queue family index for compute operations and the number of queues * enabled. Required. */ + attribute_deprecated int queue_family_comp_index; + attribute_deprecated int nb_comp_queues; /** @@ -127,7 +148,9 @@ typedef struct AVVulkanDeviceContext { * If the device doesn't support such, queue_family_encode_index will be -1. * Not required. */ + attribute_deprecated int queue_family_encode_index; + attribute_deprecated int nb_encode_queues; /** @@ -135,8 +158,11 @@ typedef struct AVVulkanDeviceContext { * If the device doesn't support such, queue_family_decode_index will be -1. * Not required. */ + attribute_deprecated int queue_family_decode_index; + attribute_deprecated int nb_decode_queues; +#endif /** * Locks a queue, preventing other threads from submitting any command @@ -150,6 +176,17 @@ typedef struct AVVulkanDeviceContext { * Similar to lock_queue(), unlocks a queue. Must only be called after locking. */ void (*unlock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index); + + /** + * Queue families used. Must be preferentially ordered. List may contain + * duplicates. + * + * For compatibility reasons, all the enabled queue families listed above + * (queue_family_(tx/comp/encode/decode)_index) must also be included in + * this list until they're removed after deprecation. + */ + AVVulkanDeviceQueueFamily qf[64]; + int nb_qf; } AVVulkanDeviceContext; /** @@ -160,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), diff --git a/3rdparty/ffmpeg/include/libavutil/intreadwrite.h b/3rdparty/ffmpeg/include/libavutil/intreadwrite.h index d0a5773b54..ffd15a1502 100644 --- a/3rdparty/ffmpeg/include/libavutil/intreadwrite.h +++ b/3rdparty/ffmpeg/include/libavutil/intreadwrite.h @@ -64,10 +64,8 @@ typedef union { #include "config.h" -#if ARCH_ARM -# include "arm/intreadwrite.h" -#elif ARCH_AVR32 -# include "avr32/intreadwrite.h" +#if ARCH_AARCH64 +# include "aarch64/intreadwrite.h" #elif ARCH_MIPS # include "mips/intreadwrite.h" #elif ARCH_PPC @@ -543,9 +541,41 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; #if AV_HAVE_BIGENDIAN # define AV_RLA(s, p) av_bswap##s(AV_RN##s##A(p)) # define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +# define AV_RBA(s, p) AV_RN##s##A(p) +# define AV_WBA(s, p, v) AV_WN##s##A(p, v) #else # define AV_RLA(s, p) AV_RN##s##A(p) # define AV_WLA(s, p, v) AV_WN##s##A(p, v) +# define AV_RBA(s, p) av_bswap##s(AV_RN##s##A(p)) +# define AV_WBA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +#endif + +#ifndef AV_RL16A +# define AV_RL16A(p) AV_RLA(16, p) +#endif +#ifndef AV_WL16A +# define AV_WL16A(p, v) AV_WLA(16, p, v) +#endif + +#ifndef AV_RB16A +# define AV_RB16A(p) AV_RBA(16, p) +#endif +#ifndef AV_WB16A +# define AV_WB16A(p, v) AV_WBA(16, p, v) +#endif + +#ifndef AV_RL32A +# define AV_RL32A(p) AV_RLA(32, p) +#endif +#ifndef AV_WL32A +# define AV_WL32A(p, v) AV_WLA(32, p, v) +#endif + +#ifndef AV_RB32A +# define AV_RB32A(p) AV_RBA(32, p) +#endif +#ifndef AV_WB32A +# define AV_WB32A(p, v) AV_WBA(32, p, v) #endif #ifndef AV_RL64A @@ -555,6 +585,13 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; # define AV_WL64A(p, v) AV_WLA(64, p, v) #endif +#ifndef AV_RB64A +# define AV_RB64A(p) AV_RBA(64, p) +#endif +#ifndef AV_WB64A +# define AV_WB64A(p, v) AV_WBA(64, p, v) +#endif + /* * The AV_COPYxxU macros are suitable for copying data to/from unaligned * memory locations. diff --git a/3rdparty/ffmpeg/include/libavutil/lfg.h b/3rdparty/ffmpeg/include/libavutil/lfg.h index e75a986f12..043d0ab343 100644 --- a/3rdparty/ffmpeg/include/libavutil/lfg.h +++ b/3rdparty/ffmpeg/include/libavutil/lfg.h @@ -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]); diff --git a/3rdparty/ffmpeg/include/libavutil/log.h b/3rdparty/ffmpeg/include/libavutil/log.h index ab7ceabe22..4a111ca9a5 100644 --- a/3rdparty/ffmpeg/include/libavutil/log.h +++ b/3rdparty/ffmpeg/include/libavutil/log.h @@ -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); diff --git a/3rdparty/ffmpeg/include/libavutil/mastering_display_metadata.h b/3rdparty/ffmpeg/include/libavutil/mastering_display_metadata.h index c23b07c3cd..52fcef9e37 100644 --- a/3rdparty/ffmpeg/include/libavutil/mastering_display_metadata.h +++ b/3rdparty/ffmpeg/include/libavutil/mastering_display_metadata.h @@ -77,6 +77,15 @@ typedef struct AVMasteringDisplayMetadata { */ AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc(void); +/** + * Allocate an AVMasteringDisplayMetadata structure and set its fields to + * default values. The resulting struct can be freed using av_freep(). + * + * @return An AVMasteringDisplayMetadata filled with default values or NULL + * on failure. + */ +AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc_size(size_t *size); + /** * Allocate a complete AVMasteringDisplayMetadata and add it to the frame. * diff --git a/3rdparty/ffmpeg/include/libavutil/mathematics.h b/3rdparty/ffmpeg/include/libavutil/mathematics.h index e213bab68c..486de530f2 100644 --- a/3rdparty/ffmpeg/include/libavutil/mathematics.h +++ b/3rdparty/ffmpeg/include/libavutil/mathematics.h @@ -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 diff --git a/3rdparty/ffmpeg/include/libavutil/opt.h b/3rdparty/ffmpeg/include/libavutil/opt.h index e6013662f6..ab24fae777 100644 --- a/3rdparty/ffmpeg/include/libavutil/opt.h +++ b/3rdparty/ffmpeg/include/libavutil/opt.h @@ -53,6 +53,16 @@ * question is allowed to access the field. This allows us to extend the * semantics of those fields without breaking API compatibility. * + * @section avoptions_scope Scope of AVOptions + * + * AVOptions is designed to support any set of multimedia configuration options + * that can be defined at compile-time. Although it is mainly used to expose + * FFmpeg options, you are welcome to adapt it to your own use case. + * + * No single approach can ever fully solve the problem of configuration, + * but please submit a patch if you believe you have found a problem + * that is best solved by extending AVOptions. + * * @section avoptions_implement Implementing AVOptions * This section describes how to add AVOptions capabilities to a struct. * @@ -230,26 +240,99 @@ * before the file is actually opened. */ +/** + * An option type determines: + * - for native access, the underlying C type of the field that an AVOption + * refers to; + * - for foreign access, the semantics of accessing the option through this API, + * e.g. which av_opt_get_*() and av_opt_set_*() functions can be called, or + * what format will av_opt_get()/av_opt_set() expect/produce. + */ enum AVOptionType{ + /** + * Underlying C type is unsigned int. + */ AV_OPT_TYPE_FLAGS = 1, + /** + * Underlying C type is int. + */ AV_OPT_TYPE_INT, + /** + * Underlying C type is int64_t. + */ AV_OPT_TYPE_INT64, + /** + * Underlying C type is double. + */ AV_OPT_TYPE_DOUBLE, + /** + * Underlying C type is float. + */ AV_OPT_TYPE_FLOAT, + /** + * Underlying C type is a uint8_t* that is either NULL or points to a C + * string allocated with the av_malloc() family of functions. + */ AV_OPT_TYPE_STRING, + /** + * Underlying C type is AVRational. + */ AV_OPT_TYPE_RATIONAL, - AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + /** + * Underlying C type is a uint8_t* that is either NULL or points to an array + * allocated with the av_malloc() family of functions. The pointer is + * immediately followed by an int containing the array length in bytes. + */ + AV_OPT_TYPE_BINARY, + /** + * Underlying C type is AVDictionary*. + */ AV_OPT_TYPE_DICT, + /** + * Underlying C type is uint64_t. + */ AV_OPT_TYPE_UINT64, + /** + * Special option type for declaring named constants. Does not correspond to + * an actual field in the object, offset must be 0. + */ AV_OPT_TYPE_CONST, - AV_OPT_TYPE_IMAGE_SIZE, ///< offset must point to two consecutive integers + /** + * Underlying C type is two consecutive integers. + */ + AV_OPT_TYPE_IMAGE_SIZE, + /** + * Underlying C type is enum AVPixelFormat. + */ AV_OPT_TYPE_PIXEL_FMT, + /** + * Underlying C type is enum AVSampleFormat. + */ AV_OPT_TYPE_SAMPLE_FMT, - AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational + /** + * Underlying C type is AVRational. + */ + AV_OPT_TYPE_VIDEO_RATE, + /** + * Underlying C type is int64_t. + */ AV_OPT_TYPE_DURATION, + /** + * Underlying C type is uint8_t[4]. + */ AV_OPT_TYPE_COLOR, + /** + * Underlying C type is int. + */ AV_OPT_TYPE_BOOL, + /** + * Underlying C type is AVChannelLayout. + */ AV_OPT_TYPE_CHLAYOUT, + /** + * Underlying C type is unsigned int. + */ + AV_OPT_TYPE_UINT, /** * May be combined with another regular option type to declare an array @@ -459,7 +542,7 @@ typedef struct AVOptionRanges { */ int nb_ranges; /** - * Number of componentes. + * Number of components. */ int nb_components; } AVOptionRanges; @@ -535,6 +618,12 @@ const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter); */ #define AV_OPT_ALLOW_NULL (1 << 2) +/** + * May be used with av_opt_set_array() to signal that new elements should + * replace the existing ones in the indicated range. + */ +#define AV_OPT_ARRAY_REPLACE (1 << 3) + /** * Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than * one component for certain option types. @@ -786,6 +875,10 @@ int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_ int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags); int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags); int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags); +/** + * @note Any old chlayout present is discarded and replaced with a copy of the new one. The + * caller still owns layout and is responsible for uninitializing it. + */ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags); /** * @note Any old dictionary present is discarded and replaced with a copy of the new one. The @@ -793,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. * @@ -808,6 +902,57 @@ 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 + * operations is performed depends on the values of val and search_flags. + * + * @param start_elem Index of the first array element to modify; must not be + * larger than array size as returned by + * av_opt_get_array_size(). + * @param nb_elems number of array elements to modify; when val is NULL, + * start_elem+nb_elems must not be larger than array size as + * returned by av_opt_get_array_size() + * + * @param val_type Option type corresponding to the type of val, ignored when val is + * NULL. + * + * The effect of this function will will be as if av_opt_setX() + * was called for each element, where X is specified by type. + * E.g. AV_OPT_TYPE_STRING corresponds to av_opt_set(). + * + * Typically this should be the same as the scalarized type of + * the AVOption being set, but certain conversions are also + * possible - the same as those done by the corresponding + * av_opt_set*() function. E.g. any option type can be set from + * a string, numeric types can be set from int64, double, or + * rational, etc. + * + * @param val Array with nb_elems elements or NULL. + * + * When NULL, nb_elems array elements starting at start_elem are + * removed from the array. Any array elements remaining at the end + * are shifted by nb_elems towards the first element in order to keep + * the array contiguous. + * + * Otherwise (val is non-NULL), the type of val must match the + * underlying C type as documented for val_type. + * + * When AV_OPT_ARRAY_REPLACE is not set in search_flags, the array is + * enlarged by nb_elems, and the contents of val are inserted at + * start_elem. Previously existing array elements from start_elem + * onwards (if present) are shifted by nb_elems away from the first + * element in order to make space for the new elements. + * + * When AV_OPT_ARRAY_REPLACE is set in search_flags, the contents + * of val replace existing array elements from start_elem to + * start_elem+nb_elems (if present). New array size is + * max(start_elem + nb_elems, old array size). + */ +int av_opt_set_array(void *obj, const char *name, int search_flags, + unsigned int start_elem, unsigned int nb_elems, + enum AVOptionType val_type, const void *val); /** * @} @@ -847,12 +992,56 @@ int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_ int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt); int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt); int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val); +/** + * @param[out] layout The returned layout is a copy of the actual value and must + * be freed with av_channel_layout_uninit() by the caller + */ int av_opt_get_chlayout(void *obj, const char *name, int search_flags, AVChannelLayout *layout); /** * @param[out] out_val The returned dictionary is a copy of the actual value and must * be freed with av_dict_free() by the caller */ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDictionary **out_val); + +/** + * For an array-type option, get the number of elements in the array. + */ +int av_opt_get_array_size(void *obj, const char *name, int search_flags, + unsigned int *out_val); + +/** + * For an array-type option, retrieve the values of one or more array elements. + * + * @param start_elem index of the first array element to retrieve + * @param nb_elems number of array elements to retrieve; start_elem+nb_elems + * must not be larger than array size as returned by + * av_opt_get_array_size() + * + * @param out_type Option type corresponding to the desired output. + * + * The array elements produced by this function will + * will be as if av_opt_getX() was called for each element, + * where X is specified by out_type. E.g. AV_OPT_TYPE_STRING + * corresponds to av_opt_get(). + * + * Typically this should be the same as the scalarized type of + * the AVOption being retrieved, but certain conversions are + * also possible - the same as those done by the corresponding + * av_opt_get*() function. E.g. any option type can be retrieved + * as a string, numeric types can be retrieved as int64, double, + * or rational, etc. + * + * @param out_val Array with nb_elems members into which the output will be + * written. The array type must match the underlying C type as + * documented for out_type, and be zeroed on entry to this + * function. + * + * For dynamically allocated types (strings, binary, dicts, + * etc.), the result is owned and freed by the caller. + */ +int av_opt_get_array(void *obj, const char *name, int search_flags, + unsigned int start_elem, unsigned int nb_elems, + enum AVOptionType out_type, void *out_val); /** * @} */ @@ -873,6 +1062,7 @@ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDiction */ int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out); int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out); +int av_opt_eval_uint (void *obj, const AVOption *o, const char *val, unsigned *uint_out); int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out); int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out); int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out); @@ -881,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 @@ -888,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. @@ -929,6 +1124,7 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name) #define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 ///< Serialize options that are not set to default values only. #define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 ///< Serialize options that exactly match opt_flags only. +#define AV_OPT_SERIALIZE_SEARCH_CHILDREN 0x00000004 ///< Serialize options in possible children of the given object. /** * Serialize object's options. @@ -941,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 @@ -971,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); @@ -987,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); diff --git a/3rdparty/ffmpeg/include/libavutil/pixfmt.h b/3rdparty/ffmpeg/include/libavutil/pixfmt.h index 4aa20e4e58..823ea8edab 100644 --- a/3rdparty/ffmpeg/include/libavutil/pixfmt.h +++ b/3rdparty/ffmpeg/include/libavutil/pixfmt.h @@ -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. @@ -623,6 +704,9 @@ enum AVColorSpace { AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant luminance system AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant luminance system AVCOL_SPC_ICTCP = 14, ///< ITU-R BT.2100-0, ICtCp + AVCOL_SPC_IPT_C2 = 15, ///< SMPTE ST 2128, IPT-C2 + AVCOL_SPC_YCGCO_RE = 16, ///< YCgCo-R, even addition of bits + AVCOL_SPC_YCGCO_RO = 17, ///< YCgCo-R, odd addition of bits AVCOL_SPC_NB ///< Not part of ABI }; diff --git a/3rdparty/ffmpeg/include/libavutil/rational.h b/3rdparty/ffmpeg/include/libavutil/rational.h index 849f47f38d..30ac2aced7 100644 --- a/3rdparty/ffmpeg/include/libavutil/rational.h +++ b/3rdparty/ffmpeg/include/libavutil/rational.h @@ -22,7 +22,7 @@ /** * @file * @ingroup lavu_math_rational - * Utilties for rational number calculation. + * Utilities for rational number calculation. * @author Michael Niedermayer */ diff --git a/3rdparty/ffmpeg/include/libavutil/rc4.h b/3rdparty/ffmpeg/include/libavutil/rc4.h index bf0ca6e942..0c72a88ecd 100644 --- a/3rdparty/ffmpeg/include/libavutil/rc4.h +++ b/3rdparty/ffmpeg/include/libavutil/rc4.h @@ -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 diff --git a/3rdparty/ffmpeg/include/libavutil/spherical.h b/3rdparty/ffmpeg/include/libavutil/spherical.h index 828ac836da..4b78978eb9 100644 --- a/3rdparty/ffmpeg/include/libavutil/spherical.h +++ b/3rdparty/ffmpeg/include/libavutil/spherical.h @@ -66,6 +66,28 @@ enum AVSphericalProjection { * the position of the current video in a larger surface. */ AV_SPHERICAL_EQUIRECTANGULAR_TILE, + + /** + * Video frame displays as a 180 degree equirectangular projection. + */ + AV_SPHERICAL_HALF_EQUIRECTANGULAR, + + /** + * Video frame displays on a flat, rectangular 2D surface. + */ + AV_SPHERICAL_RECTILINEAR, + + /** + * Fisheye projection (Apple). + * 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, }; /** diff --git a/3rdparty/ffmpeg/include/libavutil/stereo3d.h b/3rdparty/ffmpeg/include/libavutil/stereo3d.h index 3aab959b79..c0a4ab3f2d 100644 --- a/3rdparty/ffmpeg/include/libavutil/stereo3d.h +++ b/3rdparty/ffmpeg/include/libavutil/stereo3d.h @@ -136,6 +136,11 @@ enum AVStereo3DType { * @endcode */ AV_STEREO3D_COLUMNS, + + /** + * Video is stereoscopic but the packing is unspecified. + */ + AV_STEREO3D_UNSPEC, }; /** @@ -156,6 +161,31 @@ enum AVStereo3DView { * Frame contains only the right view. */ AV_STEREO3D_VIEW_RIGHT, + + /** + * Content is unspecified. + */ + AV_STEREO3D_VIEW_UNSPEC, +}; + +/** + * List of possible primary eyes. + */ +enum AVStereo3DPrimaryEye { + /** + * Neither eye. + */ + AV_PRIMARY_EYE_NONE, + + /** + * Left eye. + */ + AV_PRIMARY_EYE_LEFT, + + /** + * Right eye + */ + AV_PRIMARY_EYE_RIGHT, }; /** @@ -185,6 +215,28 @@ typedef struct AVStereo3D { * Determines which views are packed. */ enum AVStereo3DView view; + + /** + * Which eye is the primary eye when rendering in 2D. + */ + enum AVStereo3DPrimaryEye primary_eye; + + /** + * The distance between the centres of the lenses of the camera system, + * in micrometers. Zero if unset. + */ + uint32_t baseline; + + /** + * Relative shift of the left and right images, which changes the zero parallax plane. + * Range is -1.0 to 1.0. Zero if unset. + */ + AVRational horizontal_disparity_adjustment; + + /** + * Horizontal field of view, in degrees. Zero if unset. + */ + AVRational horizontal_field_of_view; } AVStereo3D; /** @@ -195,6 +247,14 @@ typedef struct AVStereo3D { */ AVStereo3D *av_stereo3d_alloc(void); +/** + * Allocate an AVStereo3D structure and set its fields to default values. + * The resulting struct can be freed using av_freep(). + * + * @return An AVStereo3D filled with default values or NULL on failure. + */ +AVStereo3D *av_stereo3d_alloc_size(size_t *size); + /** * Allocate a complete AVFrameSideData and add it to the frame. * @@ -222,6 +282,42 @@ const char *av_stereo3d_type_name(unsigned int type); */ int av_stereo3d_from_name(const char *name); +/** + * Provide a human-readable name of a given stereo3d view. + * + * @param type The input stereo3d view value. + * + * @return The name of the stereo3d view value, or "unknown". + */ +const char *av_stereo3d_view_name(unsigned int view); + +/** + * Get the AVStereo3DView form a human-readable name. + * + * @param name The input string. + * + * @return The AVStereo3DView value, or -1 if not found. + */ +int av_stereo3d_view_from_name(const char *name); + +/** + * Provide a human-readable name of a given stereo3d primary eye. + * + * @param type The input stereo3d primary eye value. + * + * @return The name of the stereo3d primary eye value, or "unknown". + */ +const char *av_stereo3d_primary_eye_name(unsigned int eye); + +/** + * Get the AVStereo3DPrimaryEye form a human-readable name. + * + * @param name The input string. + * + * @return The AVStereo3DPrimaryEye value, or -1 if not found. + */ +int av_stereo3d_primary_eye_from_name(const char *name); + /** * @} */ diff --git a/3rdparty/ffmpeg/include/libavutil/tx.h b/3rdparty/ffmpeg/include/libavutil/tx.h index 4696988cae..c950095735 100644 --- a/3rdparty/ffmpeg/include/libavutil/tx.h +++ b/3rdparty/ffmpeg/include/libavutil/tx.h @@ -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. * diff --git a/3rdparty/ffmpeg/include/libavutil/version.h b/3rdparty/ffmpeg/include/libavutil/version.h index 0a3f5dd0c9..6ce66075b4 100644 --- a/3rdparty/ffmpeg/include/libavutil/version.h +++ b/3rdparty/ffmpeg/include/libavutil/version.h @@ -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,13 +72,13 @@ /** * @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_MAJOR 60 #define LIBAVUTIL_VERSION_MINOR 8 #define LIBAVUTIL_VERSION_MICRO 100 @@ -105,13 +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 < 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) /** * @} diff --git a/3rdparty/ffmpeg/include/libswresample/swresample.h b/3rdparty/ffmpeg/include/libswresample/swresample.h index 217e5461bf..052089acca 100644 --- a/3rdparty/ffmpeg/include/libswresample/swresample.h +++ b/3rdparty/ffmpeg/include/libswresample/swresample.h @@ -49,8 +49,8 @@ * matrix). This is using the swr_alloc() function. * @code * SwrContext *swr = swr_alloc(); - * av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0); - * av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); + * av_opt_set_chlayout(swr, "in_chlayout", &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1, 0); + * av_opt_set_chlayout(swr, "out_chlayout", &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO, 0); * av_opt_set_int(swr, "in_sample_rate", 48000, 0); * av_opt_set_int(swr, "out_sample_rate", 44100, 0); * av_opt_set_sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); @@ -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. * @{ */ diff --git a/3rdparty/ffmpeg/include/libswresample/version_major.h b/3rdparty/ffmpeg/include/libswresample/version_major.h index dd13f2bbe3..4e0bc0ab19 100644 --- a/3rdparty/ffmpeg/include/libswresample/version_major.h +++ b/3rdparty/ffmpeg/include/libswresample/version_major.h @@ -26,6 +26,6 @@ * Libswresample version macros */ -#define LIBSWRESAMPLE_VERSION_MAJOR 5 +#define LIBSWRESAMPLE_VERSION_MAJOR 6 #endif /* SWRESAMPLE_VERSION_MAJOR_H */ diff --git a/3rdparty/ffmpeg/include/libswscale/swscale.h b/3rdparty/ffmpeg/include/libswscale/swscale.h index 9d4612aaf3..39e23075a4 100644 --- a/3rdparty/ffmpeg/include/libswscale/swscale.h +++ b/3rdparty/ffmpeg/include/libswscale/swscale.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2024 Niklas Haas * Copyright (C) 2001-2011 Michael Niedermayer * * This file is part of FFmpeg. @@ -61,36 +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 -//internal chrominance subsampling info -#define SWS_FULL_CHR_H_INT 0x2000 -//input subsampling info -#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 @@ -126,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. @@ -147,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 @@ -190,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 @@ -221,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). @@ -268,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 @@ -278,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 @@ -292,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); /** @@ -312,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 @@ -338,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); @@ -346,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); @@ -391,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. @@ -421,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); - /** * @} */ diff --git a/3rdparty/ffmpeg/include/libswscale/version_major.h b/3rdparty/ffmpeg/include/libswscale/version_major.h index fd259f959d..0dc507921e 100644 --- a/3rdparty/ffmpeg/include/libswscale/version_major.h +++ b/3rdparty/ffmpeg/include/libswscale/version_major.h @@ -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