SHA256
1
0
forked from pool/ffmpeg-7

ffmpeg 7.1

This commit is contained in:
Jan Engelhardt 2024-10-02 10:26:00 +02:00
parent e2cfa392ea
commit 0c96160890
11 changed files with 74 additions and 227 deletions

View File

@ -1,58 +0,0 @@
From 654bd47716c4f36719fb0f3f7fd8386d5ed0b916 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Fri, 9 Aug 2024 11:32:00 +0100
Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
binutils 2.43
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
binutils 2.43 has stricter validation for labels[1] and results in errors
when building ffmpeg for armv5:
src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
Remove the leading zero in the "01" label to resolve this error.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
index 4f9aa485fd..d31568611c 100644
--- a/libavcodec/arm/mlpdsp_armv5te.S
+++ b/libavcodec/arm/mlpdsp_armv5te.S
@@ -229,7 +229,7 @@ A .endif
.endif
// Begin loop
-01:
+1:
.if TOTAL_TAPS == 0
// Things simplify a lot in this case
// In fact this could be pipelined further if it's worth it...
@@ -241,7 +241,7 @@ A .endif
str ST0, [PST, #-4]!
str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
str ST0, [PSAMP], #4 * MAX_CHANNELS
- bne 01b
+ bne 1b
.else
.if \fir_taps & 1
.set LOAD_REG, 1
@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1
str ST3, [PST, #-4]!
str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
str ST3, [PSAMP], #4 * MAX_CHANNELS
- bne 01b
+ bne 1b
.endif
b 99f
--
2.46.0

View File

@ -1,113 +0,0 @@
From 5b87869c09cece1583e74b6f796aa825a4765631 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Wed, 31 Jul 2024 22:19:53 -0300
Subject: [PATCH] avformat/mov: fix track handling when mixing IAMF and video
tracks
Fixes crashes when muxing the two together.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/movenc.c | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e40948edb8..d20d0bc064 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -7149,7 +7149,9 @@ static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
static int mov_init_iamf_track(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
- MOVTrack *track = &mov->tracks[0]; // IAMF if present is always the first track
+ MOVTrack *track;
+ IAMFContext *iamf;
+ int first_iamf_idx = INT_MAX, last_iamf_idx = 0;
int nb_audio_elements = 0, nb_mix_presentations = 0;
int ret;
@@ -7171,24 +7173,24 @@ static int mov_init_iamf_track(AVFormatContext *s)
return AVERROR(EINVAL);
}
- track->iamf = av_mallocz(sizeof(*track->iamf));
- if (!track->iamf)
+ iamf = av_mallocz(sizeof(*iamf));
+ if (!iamf)
return AVERROR(ENOMEM);
+
for (int i = 0; i < s->nb_stream_groups; i++) {
const AVStreamGroup *stg = s->stream_groups[i];
switch(stg->type) {
case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT:
for (int j = 0; j < stg->nb_streams; j++) {
- track->first_iamf_idx = FFMIN(stg->streams[j]->index, track->first_iamf_idx);
- track->last_iamf_idx = FFMAX(stg->streams[j]->index, track->last_iamf_idx);
- stg->streams[j]->priv_data = track;
+ first_iamf_idx = FFMIN(stg->streams[j]->index, first_iamf_idx);
+ last_iamf_idx = FFMAX(stg->streams[j]->index, last_iamf_idx);
}
- ret = ff_iamf_add_audio_element(track->iamf, stg, s);
+ ret = ff_iamf_add_audio_element(iamf, stg, s);
break;
case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION:
- ret = ff_iamf_add_mix_presentation(track->iamf, stg, s);
+ ret = ff_iamf_add_mix_presentation(iamf, stg, s);
break;
default:
av_assert0(0);
@@ -7197,8 +7199,20 @@ static int mov_init_iamf_track(AVFormatContext *s)
return ret;
}
+ track = &mov->tracks[first_iamf_idx];
+ track->iamf = iamf;
+ track->first_iamf_idx = first_iamf_idx;
+ track->last_iamf_idx = last_iamf_idx;
track->tag = MKTAG('i','a','m','f');
+ for (int i = 0; i < s->nb_stream_groups; i++) {
+ AVStreamGroup *stg = s->stream_groups[i];
+ if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT)
+ continue;
+ for (int j = 0; j < stg->nb_streams; j++)
+ stg->streams[j]->priv_data = track;
+ }
+
ret = avio_open_dyn_buf(&track->iamf_buf);
if (ret < 0)
return ret;
@@ -7209,6 +7223,7 @@ static int mov_init_iamf_track(AVFormatContext *s)
static int mov_init(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
+ int has_iamf = 0;
int i, ret;
mov->fc = s;
@@ -7359,6 +7374,7 @@ static int mov_init(AVFormatContext *s)
}
st->priv_data = st;
}
+ has_iamf = 1;
if (!mov->nb_tracks) // We support one track for the entire IAMF structure
mov->nb_tracks++;
@@ -7455,8 +7471,11 @@ static int mov_init(AVFormatContext *s)
for (int j = 0, i = 0; j < s->nb_streams; j++) {
AVStream *st = s->streams[j];
- if (st != st->priv_data)
+ if (st != st->priv_data) {
+ if (has_iamf)
+ i += has_iamf--;
continue;
+ }
st->priv_data = &mov->tracks[i++];
}
--
2.41.0

BIN
ffmpeg-7.0.2.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmatZQYYHGZmbXBlZy1k
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYIlcIAKF1VWqnhhKkBHSxEnH8ipUH
nlJmPitKaJTwgtAtHGH8DL4XlgUwxfws9YohJ6V2fz/LjD+4rcU1BB9lMKNTaEW3
g27lIRHXC571OGgBKJFadhsbULtUu9oUOIcqS28zOl3fsok/G7NVd3ajkpiRUPhu
LRXUXNbCIwtXbIdS0yECpiRcHMj/hX6nkY3yHrmWXAts/TtmIQyaNTbnC4ervA1s
Ijc4cY/unb6OD9DpmC6DznVykyfzc2GjjCiNxRXrljp+MaZ7jBEMwjXfOIATwBwj
gCN+N6nlxc5e3gMOGcAJy93iD9HpbgVDAn6S6jnB/z5+Tyv6ZeP+sytsgOCNjlQ=
=R372
-----END PGP SIGNATURE-----

BIN
ffmpeg-7.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

11
ffmpeg-7.1.tar.xz.asc Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmb549IYHGZmbXBlZy1k
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYilgH/2sKAFBy8ojPrYxVy7i+O3WO
bE5lu2yhE6gHkHnxZga5k1uuhkRhapgTiUs9foG0zmL6Qfsg7lJ2EjrieD+hSWsw
ApqHVW5SUUSrtY0kO9Z/2jQIRBH5JaMPSar6YNPTdXuSUcun784gPgwIGYwzAM/S
14tkOZpq+X4nSJ4JezJDWeIsdz8zK4gIOuo0eCPbUgZ/A7wUMdypGZ9LOqk/mCc8
RnErz36HlZzUnGrL73gxsGCQ2PXL+1oMHnt0antF90T4YNusOX9FprclH/jb+RLl
jTb8RVb/4xJKV96ScMiwy2GaozzXFjzY1X7Gq8WN5NGRlbso6WQpqt8yunD7ib4=
=A/aU
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Oct 2 08:20:18 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 7.1
* ffmpeg CLI filtergraph chaining
* pad_vaapi, drawbox_vaapi filters
* vf_scale supports secondary ref input and framesync options
* vf_scale2ref deprecated
* removed DEC Alpha DSP and support code
* perlin video source
* Cropping metadata parsing and writing in Matroska and MP4/MOV
de/muxers
* YUV colorspace negotiation for codecs and filters, obsoleting
the YUVJ pixel format
* Vulkan H.264 and H.265 encoders
* stream specifiers in fftools can now match by stream
disposition
* LCEVC enhancement data exporting in H.26x and MP4/ISOBMFF
* LCEVC filter
- Delete patches/ffmpeg-7-fix-crashes.patch,
0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch (merged)
-------------------------------------------------------------------
Mon Sep 30 12:34:56 UTC 2024 - olaf@aepfle.de

View File

@ -86,7 +86,7 @@
%define _major_expected 8
Name: ffmpeg-7
Version: 7.0.2
Version: 7.1
Release: 0
Summary: Set of libraries for working with various multimedia formats
License: GPL-3.0-or-later
@ -109,8 +109,6 @@ Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
Patch5: work-around-abi-break.patch
Patch10: ffmpeg-chromium.patch
Patch91: ffmpeg-dlopen-openh264.patch
Patch95: ffmpeg-7-fix-crashes.patch
Patch96: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
BuildRequires: ladspa-devel
BuildRequires: libgsm-devel
@ -816,8 +814,6 @@ Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
Patch5: work-around-abi-break.patch
Patch10: ffmpeg-chromium.patch
Patch91: ffmpeg-dlopen-openh264.patch
Patch95: ffmpeg-7-fix-crashes.patch
Patch96: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
BuildRequires: c_compiler
Requires: this-is-only-for-build-envs

View File

@ -11,11 +11,11 @@ Add av_stream_get_first_dts for Chromium
libavformat/utils.c | 7 +++++++
2 files changed, 11 insertions(+)
Index: ffmpeg-7.0/libavformat/avformat.h
Index: ffmpeg-7.1/libavformat/avformat.h
===================================================================
--- ffmpeg-7.0.orig/libavformat/avformat.h
+++ ffmpeg-7.0/libavformat/avformat.h
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup {
--- ffmpeg-7.1.orig/libavformat/avformat.h
+++ ffmpeg-7.1/libavformat/avformat.h
@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
@ -26,13 +26,13 @@ Index: ffmpeg-7.0/libavformat/avformat.h
#define AV_PROGRAM_RUNNING 1
/**
Index: ffmpeg-7.0/libavformat/utils.c
Index: ffmpeg-7.1/libavformat/utils.c
===================================================================
--- ffmpeg-7.0.orig/libavformat/utils.c
+++ ffmpeg-7.0/libavformat/utils.c
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void)
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
}
--- ffmpeg-7.1.orig/libavformat/utils.c
+++ ffmpeg-7.1/libavformat/utils.c
@@ -44,6 +44,13 @@
* various utility functions for use within FFmpeg
*/
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st)

View File

@ -23,19 +23,19 @@ Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
create mode 100644 libavcodec/libopenh264_dlopen.c
create mode 100644 libavcodec/libopenh264_dlopen.h
Index: ffmpeg-7.0/configure
Index: ffmpeg-7.1/configure
===================================================================
--- ffmpeg-7.0.orig/configure
+++ ffmpeg-7.0/configure
@@ -252,6 +252,7 @@ External library support:
--- ffmpeg-7.1.orig/configure
+++ ffmpeg-7.1/configure
@@ -255,6 +255,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-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
--enable-libopenjpeg enable JPEG 2000 encoding via OpenJPEG [no]
--enable-libopenmpt enable decoding tracked files via libopenmpt [no]
--enable-libopenvino enable OpenVINO as a DNN module backend
@@ -1933,6 +1934,7 @@ EXTERNAL_LIBRARY_LIST="
@@ -1939,6 +1940,7 @@ EXTERNAL_LIBRARY_LIST="
libmysofa
libopencv
libopenh264
@ -43,7 +43,7 @@ Index: ffmpeg-7.0/configure
libopenjpeg
libopenmpt
libopenvino
@@ -6921,6 +6923,7 @@ enabled libopencv && { check_hea
@@ -6966,6 +6968,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 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion
@ -51,11 +51,11 @@ Index: ffmpeg-7.0/configure
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; } }
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
Index: ffmpeg-7.0/libavcodec/Makefile
Index: ffmpeg-7.1/libavcodec/Makefile
===================================================================
--- ffmpeg-7.0.orig/libavcodec/Makefile
+++ ffmpeg-7.0/libavcodec/Makefile
@@ -1128,6 +1128,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER)
--- ffmpeg-7.1.orig/libavcodec/Makefile
+++ ffmpeg-7.1/libavcodec/Makefile
@@ -1138,6 +1138,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
@ -63,10 +63,10 @@ Index: ffmpeg-7.0/libavcodec/Makefile
OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o
OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o
OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o
Index: ffmpeg-7.0/libavcodec/libopenh264.c
Index: ffmpeg-7.1/libavcodec/libopenh264.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264.c
+++ ffmpeg-7.0/libavcodec/libopenh264.c
--- ffmpeg-7.1.orig/libavcodec/libopenh264.c
+++ ffmpeg-7.1/libavcodec/libopenh264.c
@@ -20,8 +20,13 @@
*/
@ -81,10 +81,10 @@ Index: ffmpeg-7.0/libavcodec/libopenh264.c
#include "libavutil/error.h"
#include "libavutil/log.h"
Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.c
Index: ffmpeg-7.1/libavcodec/libopenh264_dlopen.c
===================================================================
--- /dev/null
+++ ffmpeg-7.0/libavcodec/libopenh264_dlopen.c
+++ ffmpeg-7.1/libavcodec/libopenh264_dlopen.c
@@ -0,0 +1,147 @@
+/*
+ * OpenH264 dlopen code
@ -233,10 +233,10 @@ Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.c
+
+ return 0;
+}
Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.h
Index: ffmpeg-7.1/libavcodec/libopenh264_dlopen.h
===================================================================
--- /dev/null
+++ ffmpeg-7.0/libavcodec/libopenh264_dlopen.h
+++ ffmpeg-7.1/libavcodec/libopenh264_dlopen.h
@@ -0,0 +1,58 @@
+/*
+ * OpenH264 dlopen code
@ -296,10 +296,10 @@ Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.h
+#endif /* CONFIG_LIBOPENH264_DLOPEN */
+
+#endif /* HAVE_LIBOPENH264_DLOPEN_H */
Index: ffmpeg-7.0/libavcodec/libopenh264dec.c
Index: ffmpeg-7.1/libavcodec/libopenh264dec.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264dec.c
+++ ffmpeg-7.0/libavcodec/libopenh264dec.c
--- ffmpeg-7.1.orig/libavcodec/libopenh264dec.c
+++ ffmpeg-7.1/libavcodec/libopenh264dec.c
@@ -19,8 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@ -324,10 +324,10 @@ Index: ffmpeg-7.0/libavcodec/libopenh264dec.c
if (WelsCreateDecoder(&s->decoder)) {
av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
return AVERROR_UNKNOWN;
Index: ffmpeg-7.0/libavcodec/libopenh264enc.c
Index: ffmpeg-7.1/libavcodec/libopenh264enc.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264enc.c
+++ ffmpeg-7.0/libavcodec/libopenh264enc.c
--- ffmpeg-7.1.orig/libavcodec/libopenh264enc.c
+++ ffmpeg-7.1/libavcodec/libopenh264enc.c
@@ -19,8 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

View File

@ -37,10 +37,10 @@ releases.
ffbuild/library.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: ffmpeg-5.1/ffbuild/library.mak
Index: ffmpeg-7.1/ffbuild/library.mak
===================================================================
--- ffmpeg-5.1.orig/ffbuild/library.mak
+++ ffmpeg-5.1/ffbuild/library.mak
--- ffmpeg-7.1.orig/ffbuild/library.mak
+++ ffmpeg-7.1/ffbuild/library.mak
@@ -59,7 +59,7 @@ $(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)ver
$$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"