Skip to content

Commit 80a29ef

Browse files
committed
Bump to ffmpeg 8.0.1
1 parent ce81114 commit 80a29ef

70 files changed

Lines changed: 1883 additions & 1190 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
run: |
9393
(cd ${{ matrix.vcpkg-root }} && git fetch origin)
9494
(cd ${{ matrix.vcpkg-root }} && git reset --hard)
95-
(cd ${{ matrix.vcpkg-root }} && git checkout tags/2025.12.12)
95+
(cd ${{ matrix.vcpkg-root }} && git checkout tags/2026.03.18)
9696
(cd ${{ matrix.vcpkg-root }} && git apply --ignore-space-change --ignore-whitespace --3way ${{ github.workspace }}/ffmpeg.patch)
9797
9898
- name: Build ffmpeg

ffmpeg.patch

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
2-
index 03397d7af2..18a8f20caa 100644
2+
index 22cea957a4..fe3deec58e 100644
33
--- a/ports/ffmpeg/portfile.cmake
44
+++ b/ports/ffmpeg/portfile.cmake
5-
@@ -30,7 +30,20 @@ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQU
6-
vcpkg_add_to_path("${NASM_EXE_PATH}")
7-
endif()
5+
@@ -34,6 +34,19 @@ endif()
6+
7+
set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect")
88

9-
-set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")
10-
+set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect")
11-
+
129
+# Only enable what is used by RPCS3
13-
+string(APPEND OPTIONS " --disable-everything")
10+
+string(APPEND OPTIONS " --disable-everything --disable-network")
1411
+string(APPEND OPTIONS " --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=atrac3 --enable-decoder=atrac3p --enable-decoder=atrac9 --enable-decoder=mp3 --enable-decoder=pcm_s16le --enable-decoder=pcm_s8")
1512
+string(APPEND OPTIONS " --enable-decoder=mov --enable-decoder=h264 --enable-decoder=mpeg4 --enable-decoder=mpeg2video --enable-decoder=mjpeg --enable-decoder=mjpegb")
1613
+string(APPEND OPTIONS " --enable-encoder=pcm_s16le --enable-encoder=mp3 --enable-encoder=ac3 --enable-encoder=aac")
@@ -21,19 +18,24 @@ index 03397d7af2..18a8f20caa 100644
2118
+string(APPEND OPTIONS " --enable-protocol=file")
2219
+string(APPEND OPTIONS " --enable-bsf=mjpeg2jpeg")
2320
+string(APPEND OPTIONS " --enable-indev=dshow")
24-
21+
+
2522
if(VCPKG_TARGET_IS_MINGW)
2623
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
27-
@@ -62,7 +75,7 @@ endif()
28-
vcpkg_cmake_get_vars(cmake_vars_file)
29-
include("${cmake_vars_file}")
30-
if(VCPKG_DETECTED_MSVC)
31-
- string(APPEND OPTIONS " --disable-inline-asm") # clang-cl has inline assembly but this leads to undefined symbols.
32-
+ # string(APPEND OPTIONS " --disable-inline-asm") # clang-cl has inline assembly but this leads to undefined symbols.
33-
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
34-
# This is required because ffmpeg depends upon optimizations to link correctly
35-
string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -O2")
36-
@@ -724,6 +737,11 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
24+
string(APPEND OPTIONS " --target-os=mingw32")
25+
@@ -427,11 +440,7 @@ if("openssl" IN_LIST FEATURES)
26+
set(OPTIONS "${OPTIONS} --enable-openssl")
27+
set(WITH_OPENSSL ON)
28+
else()
29+
- set(OPTIONS "${OPTIONS} --disable-openssl")
30+
- if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
31+
- string(APPEND OPTIONS " --enable-schannel")
32+
- set(WITH_SCHANNEL ON)
33+
- endif()
34+
+ set(OPTIONS "${OPTIONS} --disable-openssl --disable-schannel")
35+
endif()
36+
37+
if("opus" IN_LIST FEATURES)
38+
@@ -738,6 +747,11 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
3739
# We use response files here as the only known way to handle spaces in paths
3840
set(crsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cflags.rsp")
3941
string(REGEX REPLACE "-arch [A-Za-z0-9_]+" "" VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_C_FLAGS_RELEASE}")

include/libavcodec/avcodec.h

Lines changed: 30 additions & 211 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,6 @@ struct AVCodecParameters;
187187
* @{
188188
*/
189189

190-
#if FF_API_BUFFER_MIN_SIZE
191-
/**
192-
* @ingroup lavc_encoding
193-
* minimum encoding buffer size
194-
* Used to avoid some checks during header writing.
195-
* @deprecated Unused: avcodec_receive_packet() does not work
196-
* with preallocated packet buffers.
197-
*/
198-
#define AV_INPUT_BUFFER_MIN_SIZE 16384
199-
#endif
200-
201190
/**
202191
* @ingroup lavc_encoding
203192
*/
@@ -234,18 +223,9 @@ typedef struct RcOverride{
234223
* Use qpel MC.
235224
*/
236225
#define AV_CODEC_FLAG_QPEL (1 << 4)
237-
#if FF_API_DROPCHANGED
238-
/**
239-
* Don't output frames whose parameters differ from first
240-
* decoded frame in stream.
241-
*
242-
* @deprecated callers should implement this functionality in their own code
243-
*/
244-
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
245-
#endif
246226
/**
247227
* Request the encoder to output reconstructed frames, i.e.\ frames that would
248-
* be produced by decoding the encoded bistream. These frames may be retrieved
228+
* be produced by decoding the encoded bitstream. These frames may be retrieved
249229
* by calling avcodec_receive_frame() immediately after a successful call to
250230
* avcodec_receive_packet().
251231
*
@@ -515,16 +495,21 @@ typedef struct AVCodecContext {
515495
int flags2;
516496

517497
/**
518-
* some codecs need / can use extradata like Huffman tables.
519-
* MJPEG: Huffman tables
520-
* rv10: additional flags
521-
* MPEG-4: global headers (they can be in the bitstream or here)
522-
* The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
523-
* than extradata_size to avoid problems if it is read with the bitstream reader.
524-
* The bytewise contents of extradata must not depend on the architecture or CPU endianness.
525-
* Must be allocated with the av_malloc() family of functions.
526-
* - encoding: Set/allocated/freed by libavcodec.
527-
* - decoding: Set/allocated/freed by user.
498+
* Out-of-band global headers that may be used by some codecs.
499+
*
500+
* - decoding: Should be set by the caller when available (typically from a
501+
* demuxer) before opening the decoder; some decoders require this to be
502+
* set and will fail to initialize otherwise.
503+
*
504+
* The array must be allocated with the av_malloc() family of functions;
505+
* allocated size must be at least AV_INPUT_BUFFER_PADDING_SIZE bytes
506+
* larger than extradata_size.
507+
*
508+
* - encoding: May be set by the encoder in avcodec_open2() (possibly
509+
* depending on whether the AV_CODEC_FLAG_GLOBAL_HEADER flag is set).
510+
*
511+
* After being set, the array is owned by the codec and freed in
512+
* avcodec_free_context().
528513
*/
529514
uint8_t *extradata;
530515
int extradata_size;
@@ -565,23 +550,6 @@ typedef struct AVCodecContext {
565550
*/
566551
AVRational framerate;
567552

568-
#if FF_API_TICKS_PER_FRAME
569-
/**
570-
* For some codecs, the time base is closer to the field rate than the frame rate.
571-
* Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
572-
* if no telecine is used ...
573-
*
574-
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
575-
*
576-
* @deprecated
577-
* - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
578-
* - encoding: Set AVCodecContext.framerate instead
579-
*
580-
*/
581-
attribute_deprecated
582-
int ticks_per_frame;
583-
#endif
584-
585553
/**
586554
* Codec delay.
587555
*
@@ -1648,165 +1616,29 @@ typedef struct AVCodecContext {
16481616
* See the AV_PROFILE_* defines in defs.h.
16491617
*/
16501618
int profile;
1651-
#if FF_API_FF_PROFILE_LEVEL
1652-
/** @deprecated The following defines are deprecated; use AV_PROFILE_*
1653-
* in defs.h instead. */
1654-
#define FF_PROFILE_UNKNOWN -99
1655-
#define FF_PROFILE_RESERVED -100
1656-
1657-
#define FF_PROFILE_AAC_MAIN 0
1658-
#define FF_PROFILE_AAC_LOW 1
1659-
#define FF_PROFILE_AAC_SSR 2
1660-
#define FF_PROFILE_AAC_LTP 3
1661-
#define FF_PROFILE_AAC_HE 4
1662-
#define FF_PROFILE_AAC_HE_V2 28
1663-
#define FF_PROFILE_AAC_LD 22
1664-
#define FF_PROFILE_AAC_ELD 38
1665-
#define FF_PROFILE_MPEG2_AAC_LOW 128
1666-
#define FF_PROFILE_MPEG2_AAC_HE 131
1667-
1668-
#define FF_PROFILE_DNXHD 0
1669-
#define FF_PROFILE_DNXHR_LB 1
1670-
#define FF_PROFILE_DNXHR_SQ 2
1671-
#define FF_PROFILE_DNXHR_HQ 3
1672-
#define FF_PROFILE_DNXHR_HQX 4
1673-
#define FF_PROFILE_DNXHR_444 5
1674-
1675-
#define FF_PROFILE_DTS 20
1676-
#define FF_PROFILE_DTS_ES 30
1677-
#define FF_PROFILE_DTS_96_24 40
1678-
#define FF_PROFILE_DTS_HD_HRA 50
1679-
#define FF_PROFILE_DTS_HD_MA 60
1680-
#define FF_PROFILE_DTS_EXPRESS 70
1681-
#define FF_PROFILE_DTS_HD_MA_X 61
1682-
#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
1683-
1684-
1685-
#define FF_PROFILE_EAC3_DDP_ATMOS 30
1686-
1687-
#define FF_PROFILE_TRUEHD_ATMOS 30
1688-
1689-
#define FF_PROFILE_MPEG2_422 0
1690-
#define FF_PROFILE_MPEG2_HIGH 1
1691-
#define FF_PROFILE_MPEG2_SS 2
1692-
#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
1693-
#define FF_PROFILE_MPEG2_MAIN 4
1694-
#define FF_PROFILE_MPEG2_SIMPLE 5
1695-
1696-
#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
1697-
#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
1698-
1699-
#define FF_PROFILE_H264_BASELINE 66
1700-
#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
1701-
#define FF_PROFILE_H264_MAIN 77
1702-
#define FF_PROFILE_H264_EXTENDED 88
1703-
#define FF_PROFILE_H264_HIGH 100
1704-
#define FF_PROFILE_H264_HIGH_10 110
1705-
#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
1706-
#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
1707-
#define FF_PROFILE_H264_HIGH_422 122
1708-
#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
1709-
#define FF_PROFILE_H264_STEREO_HIGH 128
1710-
#define FF_PROFILE_H264_HIGH_444 144
1711-
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
1712-
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
1713-
#define FF_PROFILE_H264_CAVLC_444 44
1714-
1715-
#define FF_PROFILE_VC1_SIMPLE 0
1716-
#define FF_PROFILE_VC1_MAIN 1
1717-
#define FF_PROFILE_VC1_COMPLEX 2
1718-
#define FF_PROFILE_VC1_ADVANCED 3
1719-
1720-
#define FF_PROFILE_MPEG4_SIMPLE 0
1721-
#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
1722-
#define FF_PROFILE_MPEG4_CORE 2
1723-
#define FF_PROFILE_MPEG4_MAIN 3
1724-
#define FF_PROFILE_MPEG4_N_BIT 4
1725-
#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
1726-
#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
1727-
#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
1728-
#define FF_PROFILE_MPEG4_HYBRID 8
1729-
#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
1730-
#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
1731-
#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
1732-
#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
1733-
#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
1734-
#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
1735-
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
1736-
1737-
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
1738-
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
1739-
#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
1740-
#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
1741-
#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
1742-
1743-
#define FF_PROFILE_VP9_0 0
1744-
#define FF_PROFILE_VP9_1 1
1745-
#define FF_PROFILE_VP9_2 2
1746-
#define FF_PROFILE_VP9_3 3
1747-
1748-
#define FF_PROFILE_HEVC_MAIN 1
1749-
#define FF_PROFILE_HEVC_MAIN_10 2
1750-
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
1751-
#define FF_PROFILE_HEVC_REXT 4
1752-
#define FF_PROFILE_HEVC_SCC 9
1753-
1754-
#define FF_PROFILE_VVC_MAIN_10 1
1755-
#define FF_PROFILE_VVC_MAIN_10_444 33
1756-
1757-
#define FF_PROFILE_AV1_MAIN 0
1758-
#define FF_PROFILE_AV1_HIGH 1
1759-
#define FF_PROFILE_AV1_PROFESSIONAL 2
1760-
1761-
#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
1762-
#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
1763-
#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
1764-
#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
1765-
#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
1766-
1767-
#define FF_PROFILE_SBC_MSBC 1
1768-
1769-
#define FF_PROFILE_PRORES_PROXY 0
1770-
#define FF_PROFILE_PRORES_LT 1
1771-
#define FF_PROFILE_PRORES_STANDARD 2
1772-
#define FF_PROFILE_PRORES_HQ 3
1773-
#define FF_PROFILE_PRORES_4444 4
1774-
#define FF_PROFILE_PRORES_XQ 5
1775-
1776-
#define FF_PROFILE_ARIB_PROFILE_A 0
1777-
#define FF_PROFILE_ARIB_PROFILE_C 1
1778-
1779-
#define FF_PROFILE_KLVA_SYNC 0
1780-
#define FF_PROFILE_KLVA_ASYNC 1
1781-
1782-
#define FF_PROFILE_EVC_BASELINE 0
1783-
#define FF_PROFILE_EVC_MAIN 1
1784-
#endif
17851619

17861620
/**
17871621
* Encoding level descriptor.
17881622
* - encoding: Set by user, corresponds to a specific level defined by the
17891623
* codec, usually corresponding to the profile level, if not specified it
1790-
* is set to FF_LEVEL_UNKNOWN.
1624+
* is set to AV_LEVEL_UNKNOWN.
17911625
* - decoding: Set by libavcodec.
17921626
* See AV_LEVEL_* in defs.h.
17931627
*/
17941628
int level;
1795-
#if FF_API_FF_PROFILE_LEVEL
1796-
/** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
1797-
* in defs.h instead. */
1798-
#define FF_LEVEL_UNKNOWN -99
1799-
#endif
18001629

1630+
#if FF_API_CODEC_PROPS
18011631
/**
18021632
* Properties of the stream that gets decoded
18031633
* - encoding: unused
18041634
* - decoding: set by libavcodec
18051635
*/
1636+
attribute_deprecated
18061637
unsigned properties;
18071638
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
18081639
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
18091640
#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
1641+
#endif
18101642

18111643
/**
18121644
* Skip loop filtering for selected frames.
@@ -1895,8 +1727,13 @@ typedef struct AVCodecContext {
18951727
* For SUBTITLE_ASS subtitle type, it should contain the whole ASS
18961728
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
18971729
* the Format line following. It shouldn't include any Dialogue line.
1898-
* - encoding: Set/allocated/freed by user (before avcodec_open2())
1899-
* - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
1730+
*
1731+
* - encoding: May be set by the caller before avcodec_open2() to an array
1732+
* allocated with the av_malloc() family of functions.
1733+
* - decoding: May be set by libavcodec in avcodec_open2().
1734+
*
1735+
* After being set, the array is owned by the codec and freed in
1736+
* avcodec_free_context().
19001737
*/
19011738
int subtitle_header_size;
19021739
uint8_t *subtitle_header;
@@ -2380,24 +2217,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
23802217
*/
23812218
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
23822219

2383-
#if FF_API_AVCODEC_CLOSE
2384-
/**
2385-
* Close a given AVCodecContext and free all the data associated with it
2386-
* (but not the AVCodecContext itself).
2387-
*
2388-
* Calling this function on an AVCodecContext that hasn't been opened will free
2389-
* the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
2390-
* codec. Subsequent calls will do nothing.
2391-
*
2392-
* @deprecated Do not use this function. Use avcodec_free_context() to destroy a
2393-
* codec context (either open or closed). Opening and closing a codec context
2394-
* multiple times is not supported anymore -- use multiple codec contexts
2395-
* instead.
2396-
*/
2397-
attribute_deprecated
2398-
int avcodec_close(AVCodecContext *avctx);
2399-
#endif
2400-
24012220
/**
24022221
* Free all allocated data in the given subtitle struct.
24032222
*
@@ -3081,7 +2900,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
30812900
*
30822901
* @note for encoders, this function will only do something if the encoder
30832902
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
3084-
* will drain any remaining packets, and can then be re-used for a different
2903+
* will drain any remaining packets, and can then be reused for a different
30852904
* stream (as opposed to sending a null frame which will leave the encoder
30862905
* in a permanent EOF state after draining). This can be desirable if the
30872906
* cost of tearing down and replacing the encoder instance is high.
@@ -3116,8 +2935,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
31162935
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
31172936

31182937
/**
3119-
* @return a positive value if s is open (i.e. avcodec_open2() was called on it
3120-
* with no corresponding avcodec_close()), 0 otherwise.
2938+
* @return a positive value if s is open (i.e. avcodec_open2() was called on it),
2939+
* 0 otherwise.
31212940
*/
31222941
int avcodec_is_open(AVCodecContext *s);
31232942

0 commit comments

Comments
 (0)