Update to 7.0

Close: rhbz#2273572
This commit is contained in:
Robert-André Mauchin 2024-04-13 16:33:51 +02:00
commit 6777d32a14
13 changed files with 805 additions and 876 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ ffmpeg-*.asc
ffmpeg-*.rpm
ffmpeg-*.tar.xz
/ffmpeg.keyring
/results_*
/*.rpm

View file

@ -1,109 +0,0 @@
From a641e629591d68bd3edd99bddec623dc31295f6b Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Wed, 6 Dec 2023 14:37:34 +0100
Subject: [PATCH] lavc/libopenh264: Drop openh264 runtime version checks
Years ago, openh264 releases often changed their ABI without changing
the library soname. To avoid running into ABI issues, a version check
was added to lavc libopenh264 code to error out at runtime in case the
build time and runtime openh264 versions don't match.
This should no longer be an issue with newer openh264 releases and we
can drop the runtime version check and rely on upstream doing the right
thing and bump the library soname if the ABI changes, similar to how
other libraries are consumed in ffmpeg.
Almost all major distributions now include openh264 and this means there
are more eyes on ABI changes and issues are discovered and reported
quickly. See e.g. https://github.com/cisco/openh264/issues/3564 where an
ABI issue was quickly discovered and fixed.
Relaxing the check allows downstream distributions to build ffmpeg
against e.g. openh264 2.3.1 and ship an update to ABI-compatible
openh264 2.4.0, without needing to coordinate a lock step update between
ffmpeg and openh264 (which can be difficult if openh264 is distributed
by Cisco and ffmpeg comes from the distro, such as is the case for
Fedora).
Signed-off-by: Kalev Lember <klember@redhat.com>
---
libavcodec/libopenh264.c | 15 ---------------
libavcodec/libopenh264.h | 2 --
libavcodec/libopenh264dec.c | 4 ----
libavcodec/libopenh264enc.c | 4 ----
4 files changed, 25 deletions(-)
diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c
index 0f6d28ed88..c80c85ea8b 100644
--- a/libavcodec/libopenh264.c
+++ b/libavcodec/libopenh264.c
@@ -46,18 +46,3 @@ void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg)
int equiv_ffmpeg_log_level = libopenh264_to_ffmpeg_log_level(level);
av_log(ctx, equiv_ffmpeg_log_level, "%s\n", msg);
}
-
-int ff_libopenh264_check_version(void *logctx)
-{
- // Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion
- // function (for functions returning larger structs), thus skip the check in those
- // configurations.
-#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7)
- OpenH264Version libver = WelsGetCodecVersion();
- if (memcmp(&libver, &g_stCodecVersion, sizeof(libver))) {
- av_log(logctx, AV_LOG_ERROR, "Incorrect library version loaded\n");
- return AVERROR(EINVAL);
- }
-#endif
- return 0;
-}
diff --git a/libavcodec/libopenh264.h b/libavcodec/libopenh264.h
index dbb9c5d429..0b462d6fdc 100644
--- a/libavcodec/libopenh264.h
+++ b/libavcodec/libopenh264.h
@@ -34,6 +34,4 @@
void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg);
-int ff_libopenh264_check_version(void *logctx);
-
#endif /* AVCODEC_LIBOPENH264_H */
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index 7d650ae03e..b6a9bba2dc 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -52,13 +52,9 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
{
SVCContext *s = avctx->priv_data;
SDecodingParam param = { 0 };
- int err;
int log_level;
WelsTraceCallback callback_function;
- if ((err = ff_libopenh264_check_version(avctx)) < 0)
- return AVERROR_DECODER_NOT_FOUND;
-
if (WelsCreateDecoder(&s->decoder)) {
av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
return AVERROR_UNKNOWN;
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index f518d0894e..6f231d22b2 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -110,14 +110,10 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
{
SVCContext *s = avctx->priv_data;
SEncParamExt param = { 0 };
- int err;
int log_level;
WelsTraceCallback callback_function;
AVCPBProperties *props;
- if ((err = ff_libopenh264_check_version(avctx)) < 0)
- return AVERROR_ENCODER_NOT_FOUND;
-
if (WelsCreateSVCEncoder(&s->encoder)) {
av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n");
return AVERROR_UNKNOWN;
--
2.43.0

View file

@ -12,7 +12,7 @@ community or a corporation.
2. Set the `Release` to 0 in the spec file.
3. Set `pkg_suffix` to `%nil`
4. Do a full build locally: `fedpkg mockbuild --with full_build`
5. Run `./ffmpeg_update_free_sources.sh results_ffmpeg/5.0/0.fc35/build.log`
5. Run `./ffmpeg_update_free_sources.sh results_ffmpeg/7.0/0.fc40/build.log`
This will update the `ffmpeg_free_sources` file list.
Note that header files will need to be manually added
to the `ffmpeg_free_sources` file list.

View file

@ -81,7 +81,6 @@ aura
aura2
av1 # libaom
av1_qsv # libaom
ayuv # trivial
bethsoftvid # trivial
bfi # trivial
bink
@ -162,7 +161,7 @@ gsm_ms
gsm_ms_at
h261
h263
h263_v4l2m2m
h263_v4l2m2m # hardware
h263i
h263p
hap
@ -244,13 +243,13 @@ mp3on4
mp3on4float
mpc7
mpc8
mpeg1video
mpeg1_v4l2m2m
mpeg2video
mpeg1video
mpeg2_qsv
mpeg2_v4l2m2m
mpeg2video
mpeg4
mpeg4_v4l2m2m
mpeg4_v4l2m2m # hardware
mpegvideo
mpl2
msa1
@ -335,6 +334,7 @@ qcelp
qdm2
qdmc
qdraw
qoa
qoi
qpeg
qtrle

View file

@ -31,7 +31,6 @@ av1_amf
av1_nvenc
av1_qsv
av1_vaapi
ayuv # trival
bitpacked # trivial
bmp # trivial
cinepak
@ -70,9 +69,9 @@ hevc_v4l2m2m # hardware
hevc_vaapi # hardware
huffyuv # trivial+zlib
ilbc # ilbc
jpegls
jpeg2000
libaom # libaom
jpegls
libaom
libaom_av1 # libaom
libcodec2 # codec2
libgsm # libgsm
@ -85,7 +84,6 @@ libopenh264 # openh264_dlopen
libopenjpeg # openjpeg
libopus # opus
librav1e # rav1e
libschroedinger # schroedinger
libspeex # speex
libsvtav1
libtheora # libtheora
@ -104,9 +102,9 @@ mlp
mp2 # twolame
mp2fixed # twolame
mpeg1video
mpeg2video
mpeg2_qsv
mpeg2_vaapi
mpeg2video
mpeg4
mpeg4_v4l2m2m # hardware
msmpeg4v2

View file

@ -4,23 +4,24 @@ fdk-aac-free-devel is GPL compatible
See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112
Index: ffmpeg-5.0/configure
Index: ffmpeg-7.0/configure
===================================================================
--- ffmpeg-5.0.orig/configure 2022-02-09 20:07:49.490888877 +0100
+++ ffmpeg-5.0/configure 2022-02-09 20:08:30.102854308 +0100
@@ -1783,7 +1783,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
--- ffmpeg-7.0.orig/configure 2022-02-09 20:07:49.490888877 +0100
+++ ffmpeg-7.0/configure 2022-02-09 20:08:30.102854308 +0100
@@ -1872,7 +1872,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
- libfdk_aac
libtls
"
@@ -1822,6 +1821,7 @@ EXTERNAL_LIBRARY_LIST="
@@ -1912,6 +1911,7 @@ EXTERNAL_LIBRARY_LIST="
libcodec2
libdav1d
libdc1394
libdrm
+ libfdk_aac
libflite
libfontconfig
libfreetype

View file

@ -1,67 +0,0 @@
From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001
From: Frank Plowman <post@frankplowman.com>
Date: Fri, 22 Dec 2023 12:00:01 +0000
Subject: [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-type: text/plain
The gcrypt definition of `bn_new` used to use the return statement
on errors, with an AVERROR return value, regardless of the signature
of the function where the macro is used - it is called in
`dh_generate_key` and `ff_dh_init` which return pointers. As a result,
compiling with gcrypt and the ffrtmpcrypt protocol resulted in an
int-conversion warning. GCC 14 may upgrade these to errors [1].
This patch fixes the problem by changing the macro to remove `AVERROR`
and instead set `bn` to null if the allocation fails. This is the
behaviour of all the other `bn_new` implementations and so the result is
already checked at all the callsites. AFAICT, this should be the only
change needed to get ffmpeg off Fedora's naughty list of projects with
warnings which may be upgraded to errors in GCC 14 [2].
[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html
[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html
Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavformat/rtmpdh.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
index 5ddae537a1..6a6c2ccd87 100644
--- a/libavformat/rtmpdh.c
+++ b/libavformat/rtmpdh.c
@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
return 0;
}
#elif CONFIG_GCRYPT
-#define bn_new(bn) \
- do { \
- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
- if (!gcry_check_version("1.5.4")) \
- return AVERROR(EINVAL); \
- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
- } \
- bn = gcry_mpi_new(1); \
+#define bn_new(bn) \
+ do { \
+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
+ if (gcry_check_version("1.5.4")) { \
+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
+ } \
+ } \
+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \
+ bn = gcry_mpi_new(1); \
+ else \
+ bn = NULL; \
} while (0)
#define bn_free(bn) gcry_mpi_release(bn)
#define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w)
--
2.43.0

View file

@ -12,35 +12,35 @@ diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 1916aa2dc5..e6682849fa 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1019,6 +1019,10 @@ attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st);
+// Chromium: We use the internal field first_dts ^^^
+
#define AV_PROGRAM_RUNNING 1
/**
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cf4d68bff9..7d750abf88 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -55,6 +55,13 @@ int ff_unlock_avformat(void)
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void)
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
}
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st)
+{
+ return cffstream(st)->first_dts;
+ return cffstream(st)->first_dts;
+}
+// Chromium: We use the internal field first_dts ^^^
+
/* an arbitrarily chosen "sane" max packet size -- 50M */
#define SANE_CHUNK_SIZE (50000000)
--
2.41.0

View file

@ -11,19 +11,19 @@ reduced codec selection list.
libavformat/matroskaenc.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Index: ffmpeg-6.0/libavformat/matroskaenc.c
Index: ffmpeg-7.0/libavformat/matroskaenc.c
===================================================================
--- ffmpeg-6.0.orig/libavformat/matroskaenc.c
+++ ffmpeg-6.0/libavformat/matroskaenc.c
@@ -3321,16 +3321,25 @@ static int mkv_query_codec(enum AVCodecI
--- ffmpeg-7.0.orig/libavformat/matroskaenc.c
+++ ffmpeg-7.0/libavformat/matroskaenc.c
@@ -3540,16 +3540,25 @@ static int mkv_query_codec(enum AVCodecI
return 0;
}
+#define PREFAUDIO \
+ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \
+ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \
+ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \
+ AV_CODEC_ID_AC3
+ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \
+ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \
+ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \
+ AV_CODEC_ID_AC3
+
const FFOutputFormat ff_matroska_muxer = {
.p.name = "matroska",
@ -36,16 +36,16 @@ Index: ffmpeg-6.0/libavformat/matroskaenc.c
- .p.video_codec = CONFIG_LIBX264_ENCODER ?
- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
+ .p.audio_codec = PREFAUDIO,
+ .p.video_codec =
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
+ AV_CODEC_ID_THEORA,
+ .p.video_codec =
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
+ AV_CODEC_ID_THEORA,
.init = mkv_init,
.deinit = mkv_deinit,
.write_header = mkv_write_header,
@@ -3388,8 +3397,7 @@ const FFOutputFormat ff_matroska_audio_m
@@ -3617,8 +3626,7 @@ const FFOutputFormat ff_matroska_audio_m
.p.mime_type = "audio/x-matroska",
.p.extensions = "mka",
.priv_data_size = sizeof(MatroskaMuxContext),
@ -55,3 +55,4 @@ Index: ffmpeg-6.0/libavformat/matroskaenc.c
.p.video_codec = AV_CODEC_ID_NONE,
.init = mkv_init,
.deinit = mkv_deinit,

View file

@ -27,15 +27,15 @@ diff --git a/configure b/configure
index 1f0b9497cb..97fa4a5d6a 100755
--- a/configure
+++ b/configure
@@ -249,6 +249,7 @@ External library support:
@@ -251,6 +251,7 @@ External library support:
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
--enable-libopencv enable video filtering via libopencv [no]
--enable-libopenh264 enable H.264 encoding via OpenH264 [no]
+ --enable-libopenh264-dlopen enable H.264 encoding via dlopen()'ed OpenH264 [no]
+ --enable-libopenh264-dlopen enable H.264 encoding via dlopen()'ed OpenH264 [no]
--enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
--enable-libopenmpt enable decoding tracked files via libopenmpt [no]
--enable-libopenvino enable OpenVINO as a DNN module backend
@@ -1871,6 +1872,7 @@ EXTERNAL_LIBRARY_LIST="
@@ -1931,6 +1932,7 @@ EXTERNAL_LIBRARY_LIST="
libmysofa
libopencv
libopenh264
@ -43,10 +43,10 @@ index 1f0b9497cb..97fa4a5d6a 100755
libopenjpeg
libopenmpt
libopenvino
@@ -6765,6 +6767,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
@@ -6918,6 +6920,7 @@ enabled libopencv && { check_hea
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
enabled libopenh264 && require_pkg_config libopenh264 "openh264 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion
+enabled libopenh264_dlopen && enable libopenh264 && add_cppflags "-I$(dirname `readlink -f $0`)/ffdlopenhdrs/include -DCONFIG_LIBOPENH264_DLOPEN=1"
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
@ -55,7 +55,7 @@ diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 580a8d6b54..c27d229f6d 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1115,6 +1115,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o
@@ -1128,6 +1128,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER)
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
@ -69,7 +69,7 @@ index c80c85ea8b..128c3d9846 100644
+++ b/libavcodec/libopenh264.c
@@ -20,8 +20,13 @@
*/
#include <string.h>
+
+#ifdef CONFIG_LIBOPENH264_DLOPEN
@ -78,7 +78,7 @@ index c80c85ea8b..128c3d9846 100644
#include <wels/codec_api.h>
#include <wels/codec_ver.h>
+#endif
#include "libavutil/error.h"
#include "libavutil/log.h"
diff --git a/libavcodec/libopenh264_dlopen.c b/libavcodec/libopenh264_dlopen.c
@ -305,20 +305,20 @@ index b6a9bba2dc..e042189161 100644
@@ -19,8 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef CONFIG_LIBOPENH264_DLOPEN
+#include "libopenh264_dlopen.h"
+#else
#include <wels/codec_api.h>
#include <wels/codec_ver.h>
+#endif
#include "libavutil/common.h"
#include "libavutil/fifo.h"
@@ -55,6 +59,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
@@ -55,6 +59,12 @@ static av_cold int svc_decode_init(AVCod
int log_level;
WelsTraceCallback callback_function;
+#ifdef CONFIG_LIBOPENH264_DLOPEN
+ if (loadLibOpenH264(avctx)) {
+ return AVERROR_DECODER_NOT_FOUND;
@ -335,20 +335,20 @@ index 6f231d22b2..3f0e990d80 100644
@@ -19,8 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef CONFIG_LIBOPENH264_DLOPEN
+#include "libopenh264_dlopen.h"
+#else
#include <wels/codec_api.h>
#include <wels/codec_ver.h>
+#endif
#include "libavutil/attributes.h"
#include "libavutil/common.h"
@@ -114,6 +118,12 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
@@ -114,6 +118,12 @@ static av_cold int svc_encode_init(AVCod
WelsTraceCallback callback_function;
AVCPBProperties *props;
+#ifdef CONFIG_LIBOPENH264_DLOPEN
+ if (loadLibOpenH264(avctx)) {
+ return AVERROR_ENCODER_NOT_FOUND;

View file

@ -6,18 +6,14 @@ Subject: [PATCH] Fix -Wint-conversion and -Wincompatible-pointer-types errors
---
libavcodec/pcm-bluray.c | 4 ++--
libavcodec/pcm-dvd.c | 2 +-
libavcodec/vulkan_av1.c | 2 +-
libavcodec/vulkan_decode.c | 6 +++---
libavcodec/vulkan_video.c | 2 +-
libavfilter/vsrc_testsrc_vulkan.c | 4 ++--
libavutil/hwcontext_vaapi.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index f656095..56fa373 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCod
samples *= num_source_channels;
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
#if HAVE_BIGENDIAN
@ -26,7 +22,7 @@ index f656095..56fa373 100644
#else
do {
*dst16++ = bytestream2_get_be16u(&gb);
@@ -187,7 +187,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
@@ -187,7 +187,7 @@ static int pcm_bluray_decode_frame(AVCod
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
do {
#if HAVE_BIGENDIAN
@ -39,7 +35,7 @@ diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 419b2a1..319746c 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCo
switch (avctx->bits_per_coded_sample) {
case 16: {
#if HAVE_BIGENDIAN
@ -48,77 +44,12 @@ index 419b2a1..319746c 100644
dst16 += blocks * s->block_size / 2;
#else
int samples = blocks * avctx->ch_layout.nb_channels;
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 4998bf7..9730e4b 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
.pNext = &av1_params,
.videoSession = ctx->common.session,
- .videoSessionParametersTemplate = NULL,
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
};
err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create);
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index a89d84f..fdbcbb4 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic,
return 0;
vkpic->dpb_frame = NULL;
- vkpic->img_view_ref = NULL;
- vkpic->img_view_out = NULL;
- vkpic->img_view_dest = NULL;
+ vkpic->img_view_ref = VK_NULL_HANDLE;
+ vkpic->img_view_out = VK_NULL_HANDLE;
+ vkpic->img_view_dest = VK_NULL_HANDLE;
vkpic->destroy_image_view = vk->DestroyImageView;
vkpic->wait_semaphores = vk->WaitSemaphores;
diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c
index 236aa12..c5144bd 100644
--- a/libavcodec/vulkan_video.c
+++ b/libavcodec/vulkan_video.c
@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s,
if (common->session) {
vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session,
s->hwctx->alloc);
- common->session = NULL;
+ common->session = VK_NULL_HANDLE;
}
if (common->nb_mem && common->mem)
diff --git a/libavfilter/vsrc_testsrc_vulkan.c b/libavfilter/vsrc_testsrc_vulkan.c
index 8761c21..1720bfa 100644
--- a/libavfilter/vsrc_testsrc_vulkan.c
+++ b/libavfilter/vsrc_testsrc_vulkan.c
@@ -231,7 +231,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
return AVERROR(ENOMEM);
err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, s->picref, NULL,
- NULL, &s->opts, sizeof(s->opts));
+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
if (err < 0)
return err;
}
@@ -250,7 +250,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
frame->sample_aspect_ratio = s->sar;
if (!s->draw_once) {
err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, frame, NULL,
- NULL, &s->opts, sizeof(s->opts));
+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
if (err < 0) {
av_frame_free(&frame);
return err;
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 12bc951..d326ad6 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
@@ -1213,7 +1213,7 @@ static int vaapi_map_from_drm(AVHWFrames
if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
int k;
- unsigned long buffer_handle;

View file

@ -3,7 +3,7 @@
%bcond_with all_codecs
# Break dependency cycles by disabling certain optional dependencies.
%bcond_with bootstrap
%bcond_without bootstrap
# If you want to do a build with the upstream source tarball, then set the
# pkg_suffix to %%nil. We can't handle this with a conditional, as srpm
@ -61,11 +61,15 @@
%if %{with all_codecs}
%bcond_without evc
%bcond_without rtmp
%bcond_without vvc
%bcond_without x264
%bcond_without x265
%else
%bcond_with evc
%bcond_with rtmp
%bcond_with vvc
%bcond_with x264
%bcond_with x265
%endif
@ -79,20 +83,20 @@
%endif
%global openh264_soversion 7
%global av_codec_soversion 60
%global av_device_soversion 60
%global av_filter_soversion 9
%global av_format_soversion 60
%global av_util_soversion 58
%global postproc_soversion 57
%global swresample_soversion 4
%global swscale_soversion 7
%global av_codec_soversion 61
%global av_device_soversion 61
%global av_filter_soversion 10
%global av_format_soversion 61
%global av_util_soversion 59
%global postproc_soversion 58
%global swresample_soversion 5
%global swscale_soversion 8
Name: ffmpeg
%global pkg_name %{name}%{?pkg_suffix}
Version: 6.1.1
Release: 11%{?dist}
Version: 7.0
Release: 1%{?dist}
Summary: A complete solution to record, convert and stream audio and video
License: GPL-3.0-or-later
URL: https://ffmpeg.org/
@ -116,10 +120,6 @@ Patch1: ffmpeg-codec-choice.patch
# Allow to build with fdk-aac-free
# See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112
Patch2: ffmpeg-allow-fdk-aac-free.patch
# Drop openh264 runtime version checks
# https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10211
Patch4: 0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch
Patch5: ffmpeg-c99.patch
# Fix build with gcc14 (-Wint-conversion, -Wincompatible-pointer-types)
Patch6: ffmpeg-gcc14.patch
@ -167,6 +167,8 @@ BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(caca)
BuildRequires: pkgconfig(codec2)
BuildRequires: pkgconfig(dav1d)
BuildRequires: pkgconfig(dvdnav)
BuildRequires: pkgconfig(dvdread)
BuildRequires: pkgconfig(ffnvcodec)
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(fontconfig)
@ -201,6 +203,7 @@ BuildRequires: pkgconfig(libopenmpt)
BuildRequires: pkgconfig(libplacebo) >= 4.192.0
%endif
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(librabbitmq)
BuildRequires: pkgconfig(librist)
BuildRequires: pkgconfig(librsvg-2.0)
@ -264,6 +267,10 @@ BuildRequires: librtmp-devel
%if %{with vpl}
BuildRequires: pkgconfig(vpl) >= 2.6
%endif
%if %{with evc}
BuildRequires: pkgconfig(libxevd)
BuildRequires: pkgconfig(libxeve)
%endif
%if %{with x264}
BuildRequires: pkgconfig(x264)
%endif
@ -609,7 +616,8 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
%if %{with dc1394}
--enable-libdc1394 \
%endif
--enable-libdrm \
--enable-libdvdnav \
--enable-libdvdread \
--enable-libfdk-aac \
%if %{with flite}
--enable-libflite \
@ -637,6 +645,7 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
--enable-libplacebo \
%endif
--enable-libpulse \
--enable-libqrencode \
--enable-librabbitmq \
--enable-librav1e \
--enable-librist \
@ -675,6 +684,10 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libvo-amrwbenc \
%if %{with evc}
--enable-libxeve \
--enable-libxevd \
%endif
%if %{with x264}
--enable-libx264 \
%endif
@ -696,7 +709,7 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
--enable-hwaccels \
--disable-encoders \
--disable-decoders \
--disable-decoder="h264,hevc,vc1" \
--disable-decoder="h264,hevc,libxevd,vc1,vvc" \
--enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <enable_encoders)" \
--enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <enable_decoders)" \
%endif
@ -865,6 +878,10 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
%{_mandir}/man3/libswscale.3*
%changelog
* Sat Apr 13 2024 Robert-André Mauchin <zebob.m@gmail.com> - 7.0-0
- Rebase to 7.0
- Close rhbz#2273572
* Wed Mar 13 2024 Sérgio Basto <sergio@serjux.com> - 6.1.1-11
- Rebuild for jpegxl (libjxl) 0.10.2

File diff suppressed because it is too large Load diff