[vlc-commits] [Git][videolan/vlc][master] 6 commits: contrib: soxr: use libavutil tx instead of avfft in newer FFmpeg
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Nov 13 09:25:48 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a4e28d65 by Steve Lhomme at 2025-11-13T09:53:14+01:00
contrib: soxr: use libavutil tx instead of avfft in newer FFmpeg
avfft was removed from FFmpeg 8 but we can use the API with older FFMpeg as well.
- - - - -
ff292b65 by Steve Lhomme at 2025-11-13T09:53:14+01:00
avcodec: use AV_PROFILE_xxx instead of FF_PROFILE_xxx
This was added in libavcodec 60.26.100 [^1]. We require 58.54.100.
[^1]: https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/8238bc0b5e3dba271217b1223a901b3f9713dc6e
- - - - -
dae7faa0 by Steve Lhomme at 2025-11-13T09:53:14+01:00
avcodec: encoder: remove AV_INPUT_BUFFER_MIN_SIZE usage
It's not supported in FFMpeg 8.0 since 60.40.100.
It used to be used with preallocated packet buffers with
the old encode API, but said API is no more and therefore
there is no reason for this to be public any more.
So deprecate it and use an internal replacement
for the encoders using it as an upper bound for the
size of their headers.
- - - - -
be6c3df3 by Steve Lhomme at 2025-11-13T09:53:14+01:00
CI: update the libvlcjni hash
There's a lot of build system cleanup/simplifications, in particular https://code.videolan.org/videolan/libvlcjni/-/commit/eb10be729d3aa8f89d42ec020dd101acc88797ee
- - - - -
0e10dfc0 by Steve Lhomme at 2025-11-13T09:53:14+01:00
contrib: add standalone libpostproc build
It's no longer part of FFmpeg 8.0.
Use a custom build file as it doesn't build from source.
- - - - -
88fb5d50 by Steve Lhomme at 2025-11-13T09:53:14+01:00
contrib: ffmpeg: update to 8.0
libpostproc is not part of FFmpeg 8.0 anymore, despite what is said in [^1].
It has moved to https://github.com/michaelni/libpostproc
[^1]: https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/8c920c4c396163e3b9a0b428dd550d3c986236aa
- - - - -
22 changed files:
- contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
- contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
- contrib/src/ffmpeg/0001-fix-mf_utils-compilation-with-mingw64.patch
- contrib/src/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
- contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
- contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
- contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch
- contrib/src/ffmpeg/SHA512SUMS
- contrib/src/ffmpeg/avcodec-fix-compilation-visionos.patch
- contrib/src/ffmpeg/dxva_vc1_crash.patch
- contrib/src/ffmpeg/h264_early_SAR.patch
- contrib/src/ffmpeg/rules.mak
- + contrib/src/postproc/0001-force-using-external-libavutil.patch
- + contrib/src/postproc/0002-add-missing-libavcodec-headers.patch
- + contrib/src/postproc/rules.mak
- + contrib/src/soxr/0001-use-libavutil-tx-code-instead-of-avfft-in-newer-FFmp.patch
- contrib/src/soxr/rules.mak
- extras/ci/gitlab-ci.yml
- modules/codec/avcodec/avcommon_compat.h
- modules/codec/avcodec/directx_va.c
- modules/codec/avcodec/encoder.c
- modules/codec/avcodec/vaapi.c
Changes:
=====================================
contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
=====================================
@@ -1,7 +1,7 @@
-From 8353ed0ad5634cee0d66936e5ccbe54aa845dff7 Mon Sep 17 00:00:00 2001
+From b8a6a11e1be9712e4274de8f9dc49b63f3a1e54c Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Thu, 3 Oct 2019 14:05:40 +0200
-Subject: [PATCH 2/9] avcodec/dxva2_hevc: add support for parsing HEVC Range
+Subject: [PATCH 03/10] avcodec/dxva2_hevc: add support for parsing HEVC Range
Extension data
---
@@ -27,7 +27,7 @@ index 27f40e5519..67ce8d3871 100644
* @defgroup lavc_codec_hwaccel_d3d11va Direct3D11
* @ingroup lavc_codec_hwaccel
diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c
-index 7686f0eb6c..2b1633fca9 100644
+index e72d49b7d9..a19931b7de 100644
--- a/libavcodec/d3d12va_hevc.c
+++ b/libavcodec/d3d12va_hevc.c
@@ -33,7 +33,7 @@
@@ -39,7 +39,7 @@ index 7686f0eb6c..2b1633fca9 100644
DXVA_Qmatrix_HEVC qm;
unsigned slice_count;
DXVA_Slice_HEVC_Short slice_short[MAX_SLICES];
-@@ -148,15 +148,18 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
+@@ -151,15 +151,18 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
static int d3d12va_hevc_end_frame(AVCodecContext *avctx)
{
@@ -111,7 +111,7 @@ index bdec6112e9..1520964878 100644
* @defgroup lavc_codec_hwaccel_dxva2 DXVA2
* @ingroup lavc_codec_hwaccel
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
-index d01d1e76e8..cc922f5077 100644
+index 85698dfcce..7c11621f5a 100644
--- a/libavcodec/dxva2_hevc.c
+++ b/libavcodec/dxva2_hevc.c
@@ -28,11 +28,12 @@
@@ -181,7 +181,7 @@ index d01d1e76e8..cc922f5077 100644
pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc << 0) |
(sps->separate_colour_plane << 2) |
((sps->bit_depth - 8) << 3) |
-@@ -411,16 +442,18 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx,
+@@ -412,16 +443,18 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx,
static int dxva2_hevc_end_frame(AVCodecContext *avctx)
{
@@ -203,7 +203,7 @@ index d01d1e76e8..cc922f5077 100644
commit_bitstream_and_slice_buffer);
return ret;
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
-index 224a867ebc..7f3e5938ac 100644
+index 6cbd0e42d7..6c301ae85a 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -33,6 +33,7 @@
@@ -259,15 +259,15 @@ index 224a867ebc..7f3e5938ac 100644
#define DXVA_SHARED_CONTEXT(avctx) ((FFDXVASharedContext *)((avctx)->internal->hwaccel_priv_data))
#define DXVA_CONTEXT(avctx) (AVDXVAContext *)((avctx)->hwaccel_context ? (avctx)->hwaccel_context : (&(DXVA_SHARED_CONTEXT(avctx)->ctx)))
-@@ -171,7 +210,7 @@ void ff_dxva2_h264_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo
-
+@@ -172,7 +211,7 @@ void ff_dxva2_h264_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo
void ff_dxva2_h264_fill_scaling_lists(const AVCodecContext *avctx, AVDXVAContext *ctx, DXVA_Qmatrix_H264 *qm);
+ #if CONFIG_HEVC_D3D12VA_HWACCEL || CONFIG_HEVC_D3D11VA_HWACCEL || CONFIG_HEVC_D3D11VA2_HWACCEL || CONFIG_HEVC_DXVA2_HWACCEL
-void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *ctx, DXVA_PicParams_HEVC *pp);
+void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *ctx, DXVA_PicParams_HEVC_Rext *pp);
void ff_dxva2_hevc_fill_scaling_lists(const AVCodecContext *avctx, AVDXVAContext *ctx, DXVA_Qmatrix_HEVC *qm);
-
+ #endif
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
=====================================
@@ -1,8 +1,8 @@
-From 9ec0de5f215f6d7e6854e619071f79ff095432ad Mon Sep 17 00:00:00 2001
+From de7c10a54b8beb95882273a1c4b391e82d00bc98 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Fri, 12 Feb 2021 08:20:56 +0100
-Subject: [PATCH 1/2] avcodec/mpeg12dec: don't call hw->end_frame when starting
- second field decoding
+Subject: [PATCH 06/10] avcodec/mpeg12dec: don't call hw->end_frame when
+ starting second field decoding
This call is unbalanced with a hwaccel->start_frame. It fixes some crashes
because this call ends up using uninitialized memory. Decoding works as
@@ -12,10 +12,10 @@ expected after this patch.
1 file changed, 8 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index 4f784611de..a9e2383892 100644
+index 3ea8d02e1b..f22396f66e 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
-@@ -1340,14 +1340,6 @@ static int mpeg_field_start(Mpeg1Context *s1, const uint8_t *buf, int buf_size)
+@@ -1308,14 +1308,6 @@ static int mpeg_field_start(Mpeg1Context *s1, const uint8_t *buf, int buf_size)
av_log(s->avctx, AV_LOG_ERROR, "first field missing\n");
return AVERROR_INVALIDDATA;
}
@@ -31,5 +31,5 @@ index 4f784611de..a9e2383892 100644
if (ret < 0)
return ret;
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0001-fix-mf_utils-compilation-with-mingw64.patch
=====================================
@@ -1,7 +1,7 @@
-From 1be62d64ffd3c498265fc2387a61fdac7899d85c Mon Sep 17 00:00:00 2001
+From 6dfde9e33970ea1a819e824e7b5f7404382c066b Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Mon, 31 May 2021 13:36:39 +0200
-Subject: [PATCH 5/9] fix MediaFoundation compilation if WINVER was forced by
+Subject: [PATCH 08/10] fix MediaFoundation compilation if WINVER was forced by
the user
In mingw64 and Windows Kits the MF_MT_VIDEO_ROTATION is defined if WINVER is at
@@ -13,7 +13,7 @@ always be the case if WINVER is also set by the user, so we force it manually.
2 files changed, 4 insertions(+)
diff --git a/libavcodec/mf_utils.c b/libavcodec/mf_utils.c
-index 48e3a63efc..98cf3c8db2 100644
+index ff44130ca9..d362cb0f72 100644
--- a/libavcodec/mf_utils.c
+++ b/libavcodec/mf_utils.c
@@ -19,7 +19,9 @@
@@ -27,7 +27,7 @@ index 48e3a63efc..98cf3c8db2 100644
#include "mf_utils.h"
diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
-index b8f8a25f43..737e4fcc81 100644
+index 30531fe3e8..0283198d67 100644
--- a/libavcodec/mfenc.c
+++ b/libavcodec/mfenc.c
@@ -19,7 +19,9 @@
@@ -41,5 +41,5 @@ index b8f8a25f43..737e4fcc81 100644
#include "encode.h"
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
=====================================
@@ -1,7 +1,7 @@
-From 86dd05c31e1de90f25c01b70c8b5b28a04db0d04 Mon Sep 17 00:00:00 2001
+From 344ab39580f914227afea57d780b94b859c511a0 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Tue, 20 Aug 2019 13:10:24 +0200
-Subject: [PATCH 3/9] avcodec/hevcdec: allow HEVC 444 8/10/12 bits decoding
+Subject: [PATCH 04/10] avcodec/hevcdec: allow HEVC 444 8/10/12 bits decoding
with DXVA2/D3D11VA/D3D12VA
And 4:2:0 12 bits as well.
@@ -10,10 +10,10 @@ And 4:2:0 12 bits as well.
1 file changed, 20 insertions(+)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
-index 0dc24f82f8..db191b5262 100644
+index f44bda8a92..86a8f291a1 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
-@@ -594,6 +594,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
+@@ -650,6 +650,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
#if CONFIG_HEVC_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI;
#endif
@@ -30,7 +30,7 @@ index 0dc24f82f8..db191b5262 100644
#if CONFIG_HEVC_VDPAU_HWACCEL
*fmt++ = AV_PIX_FMT_VDPAU;
#endif
-@@ -629,6 +639,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
+@@ -688,6 +698,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
#if CONFIG_HEVC_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI;
#endif
@@ -48,5 +48,5 @@ index 0dc24f82f8..db191b5262 100644
*fmt++ = AV_PIX_FMT_VDPAU;
#endif
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
=====================================
@@ -1,7 +1,8 @@
-From 70ef5f6aa8865e04a1df3e7a3c73542fb3f7d49f Mon Sep 17 00:00:00 2001
+From 7ce0bcb85e22b098a79af4cd7470e3240401f482 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Fri, 12 Feb 2021 11:10:03 +0100
-Subject: [PATCH 2/2] avcodec/mpeg12dec: don't end a slice without first_slice
+Subject: [PATCH 07/10] avcodec/mpeg12dec: don't end a slice without
+ first_slice
If first_slice is set that means the first slice/field is not started yet. We
should not end the slice. In particular calling hwaccel->end_frame may crash as
@@ -14,13 +15,13 @@ for this check to work.
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index a9e2383892..f796e60514 100644
+index f22396f66e..39dc481cea 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
-@@ -2187,9 +2187,14 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
- s2->er.error_count += s2->thread_context[i]->er.error_count;
- }
-
+@@ -2241,9 +2241,14 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
+ if (!skip_frame) {
+ mpeg12_execute_slice_threads(avctx, s);
+
- ret = slice_end(avctx, picture, got_output);
+ if (s->first_slice) // not started yet. don't end it
+ ret = 0;
@@ -32,7 +33,7 @@ index a9e2383892..f796e60514 100644
+ s->first_slice = 1;
}
s2->pict_type = 0;
-
---
-2.45.0.windows.1
+
+--
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
=====================================
@@ -1,21 +1,21 @@
-From f5c129ae85d23e8968310dc8f9b5be5f9e8f0152 Mon Sep 17 00:00:00 2001
+From f26eb2a4a6c4f10fe4b7833c8ef98e0255515e79 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Fri, 4 Oct 2019 12:42:11 +0200
-Subject: [PATCH 4/9] avcodec/hevcdec: allow HEVC 422 10/12 bits decoding with
- DXVA2/D3D11VA/D3D12VA
+Subject: [PATCH 05/10] avcodec/hevcdec: allow HEVC 422 10/12 bits decoding
+ with DXVA2/D3D11VA/D3D12VA
---
libavcodec/hevc/hevcdec.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
-index db191b5262..c512534526 100644
+index 86a8f291a1..77dbfde64b 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
-@@ -627,6 +627,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
+@@ -686,6 +686,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
#endif
- #if CONFIG_HEVC_VULKAN_HWACCEL
- *fmt++ = AV_PIX_FMT_VULKAN;
+ #if CONFIG_HEVC_NVDEC_HWACCEL
+ *fmt++ = AV_PIX_FMT_CUDA;
+#endif
+#if CONFIG_HEVC_DXVA2_HWACCEL
+ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
@@ -29,10 +29,10 @@ index db191b5262..c512534526 100644
#endif
break;
case AV_PIX_FMT_YUV444P10:
-@@ -665,6 +675,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
+@@ -727,6 +737,16 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
#endif
- #if CONFIG_HEVC_VULKAN_HWACCEL
- *fmt++ = AV_PIX_FMT_VULKAN;
+ #if CONFIG_HEVC_NVDEC_HWACCEL
+ *fmt++ = AV_PIX_FMT_CUDA;
+#endif
+#if CONFIG_HEVC_DXVA2_HWACCEL
+ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
@@ -47,5 +47,5 @@ index db191b5262..c512534526 100644
break;
}
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch
=====================================
@@ -1,7 +1,7 @@
-From 122235558093bb6fb6edceca51a8a11ef8e055c4 Mon Sep 17 00:00:00 2001
+From d803c704a4427c0d8825e45874ac1e1732e2d382 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Tue, 20 Feb 2024 13:21:36 +0100
-Subject: [PATCH 6/9] avcodec/videotoolboxenc: disable calls on unsupported
+Subject: [PATCH 09/10] avcodec/videotoolboxenc: disable calls on unsupported
iOS/tvOS version
VTCopySupportedPropertyDictionaryForEncoder and kVTCompressionPropertyKey_EncoderID are not
@@ -14,37 +14,36 @@ We don't need to dump encoder data for debugging in those cases.
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
-index da7b291b03..6b263ee6e9 100644
+index b748ecda61..7879e6c1ff 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
-@@ -1203,8 +1203,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
+@@ -1218,8 +1218,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
return AVERROR_EXTERNAL;
}
-
+
-#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
-- if (__builtin_available(macOS 10.13, *)) {
-+#if (TARGET_OS_OSX && defined(__MAC_10_13) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_13) || \
+- if (__builtin_available(macOS 10.13, iOS 11.0, *)) {
++#if (TARGET_OS_OSX && defined(__MAC_13_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_0) || \
+ (TARGET_OS_IOS && defined(__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0) || \
+ (TARGET_OS_TV && defined(__TVOS_11_0) && __TV_OS_VERSION_MAX_ALLOWED >= __TVOS_11_0)
+ if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, *)) {
if (vtctx->supported_props) {
CFRelease(vtctx->supported_props);
vtctx->supported_props = NULL;
-@@ -1220,12 +1222,12 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
+@@ -1235,12 +1237,12 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR,"Error retrieving the supported property dictionary err=%"PRId64"\n", (int64_t)status);
return AVERROR_EXTERNAL;
}
- }
-#endif
-
+
status = vt_dump_encoder(avctx);
if (status < 0)
return status;
+ }
+#endif
-
+
if (avctx->flags & AV_CODEC_FLAG_QSCALE && !vtenc_qscale_enabled()) {
av_log(avctx, AV_LOG_ERROR, "Error: -q:v qscale not available for encoder. Use -b:v bitrate instead.\n");
---
-2.45.0.windows.1
-
+--
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/SHA512SUMS
=====================================
@@ -1 +1 @@
-181e6415da359e3addbc448ff09b5cebe57d9c37106e5125c41f484adebc250502fc9efe150cb117d7378e20830715035be94c2ba4ad7c369b18af85f1a4ca20 ffmpeg-7.1.2.tar.xz
+96f01fc3b881e208e8d35d858b2f60627f298b06103195e3e753b1c6429810d7a484d4daeebad6d0810172616383d103dfb5fcadc4512726c3719800d24a3fde ffmpeg-8.0.tar.xz
=====================================
contrib/src/ffmpeg/avcodec-fix-compilation-visionos.patch
=====================================
@@ -1,17 +1,17 @@
-From 28a1eaf1477329824b38dd75c8d44ee9239848e3 Mon Sep 17 00:00:00 2001
+From 347cf74983357ade0b7e768769713913015e9d0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
Date: Sun, 17 Mar 2024 16:03:53 +0100
-Subject: [PATCH 7/9] fix compilation for xrOS
+Subject: [PATCH 10/10] fix compilation for xrOS
---
libavcodec/videotoolbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
-index 505483ef66..0bfaa3d097 100644
+index ccba249140..b2f38905a7 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
-@@ -788,7 +788,9 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width,
+@@ -818,7 +818,9 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width,
CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w);
CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h);
#if TARGET_OS_IPHONE
@@ -22,5 +22,5 @@ index 505483ef66..0bfaa3d097 100644
CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue);
#endif
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/dxva_vc1_crash.patch
=====================================
@@ -1,16 +1,15 @@
-From 2dbcebff1e80541d8aa71041f36a086856987373 Mon Sep 17 00:00:00 2001
+From 6bca9ec4f826cab7ed941dd34535fc251f253659 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Tue, 23 Jan 2018 13:01:22 +0100
-Subject: [PATCH 8/9] fix crash on bogus frame reference in MPEG-2 with
- DXVA
+Subject: [PATCH 01/10] fix crash on bogus frame reference in MPEG-2 with DXVA
+It was added for VC-1 in fe6037fd04db8837dcdb9013f9c4ad4e7eb0592e but not in MPEG-2.
---
libavcodec/dxva2_mpeg2.c | 4 ++--
- libavcodec/dxva2_vc1.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
-index d88e782414..c3097cb6e5 100644
+index 7955bcdea2..e559c4a97d 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -50,11 +50,11 @@ void ff_dxva2_mpeg2_fill_picture_parameters(AVCodecContext *avctx,
@@ -28,5 +27,5 @@ index d88e782414..c3097cb6e5 100644
else
pp->wBackwardRefPictureIndex = 0xffff;
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/h264_early_SAR.patch
=====================================
@@ -1,7 +1,7 @@
-From 493ea35f144dbe4dc5abbd18edfb803cba1dcaf0 Mon Sep 17 00:00:00 2001
+From 9994ac6f9f137441dfc3d49a5c9b6f914166dd25 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Mon, 22 Jan 2018 11:09:56 +0100
-Subject: [PATCH 1/9] avcodec/h264_slice: use the new SAR early when setting
+Subject: [PATCH 02/10] avcodec/h264_slice: use the new SAR early when setting
the decoder
If we don't do that get_format might not be called for a while and the proper
@@ -13,10 +13,10 @@ See the sample mentioned here: https://trac.videolan.org/vlc/ticket/19435
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
-index a66b75ca80..094b36ae28 100644
+index 7e53e38cca..a4bf58af1c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
-@@ -1079,8 +1079,10 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
+@@ -1090,8 +1090,10 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
|| (non_j_pixfmt(h->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h, 0))))
must_reinit = 1;
@@ -29,5 +29,5 @@ index a66b75ca80..094b36ae28 100644
if (!h->setup_finished) {
h->avctx->profile = ff_h264_get_profile(sps);
--
-2.45.0.windows.1
+2.45.1.windows.1
=====================================
contrib/src/ffmpeg/rules.mak
=====================================
@@ -1,7 +1,7 @@
# FFmpeg
FFMPEG_HASH=ec47a3b95f88fc3f820b900038ac439e4eb3fede
-FFMPEG_MAJVERSION := 7.1.2
+FFMPEG_MAJVERSION := 8.0
FFMPEG_REVISION := 0
# FFMPEG_VERSION := $(FFMPEG_MAJVERSION).$(FFMPEG_REVISION)
FFMPEG_VERSION := $(FFMPEG_MAJVERSION)
@@ -64,13 +64,6 @@ ifneq ($(findstring amf,$(PKGS)),)
DEPS_ffmpeg += amf $(DEPS_amf)
endif
-# Postproc
-MAYBE_POSTPROC =
-ifdef GPL
-FFMPEGCONF += --enable-gpl --enable-postproc
-MAYBE_POSTPROC = libpostproc
-endif
-
# Small size
ifdef WITH_OPTIMIZATION
ifdef ENABLE_SMALL
@@ -218,7 +211,7 @@ endif
# Build
PKGS += ffmpeg
-ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale $(MAYBE_POSTPROC)"),)
+ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale"),)
PKGS_FOUND += ffmpeg
endif
=====================================
contrib/src/postproc/0001-force-using-external-libavutil.patch
=====================================
@@ -0,0 +1,24 @@
+From 5beb776fa1faa6c3e7ef28d3242a6c971f91a3cb Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 7 Nov 2025 12:46:24 +0100
+Subject: [PATCH 1/2] force using external libavutil
+
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index 3a400dffb8..124690ecdb 100755
+--- a/configure
++++ b/configure
+@@ -8103,6 +8103,7 @@ extralibs_avfilter="$avfilter_extralibs"
+ extralibs_postproc="$postproc_extralibs"
+ extralibs_swscale="$swscale_extralibs"
+ extralibs_swresample="$swresample_extralibs"
++requires="libavutil"
+ EOF
+
+ for lib in $LIBRARY_LIST; do
+--
+2.45.1.windows.1
+
=====================================
contrib/src/postproc/0002-add-missing-libavcodec-headers.patch
=====================================
@@ -0,0 +1,729 @@
+From 6af2145488805dd565dcc28f94de78415258412f Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 7 Nov 2025 11:32:58 +0100
+Subject: [PATCH 2/2] add missing libavcodec headers
+
+Otherwise the code won't compile on its own.
+
+Taken from libavcodec 62.11.100
+---
+ libavcodec/arm/mathops.h | 108 ++++++++++++++++
+ libavcodec/mathops.h | 254 ++++++++++++++++++++++++++++++++++++++
+ libavcodec/mips/mathops.h | 67 ++++++++++
+ libavcodec/ppc/mathops.h | 79 ++++++++++++
+ libavcodec/x86/mathops.h | 153 +++++++++++++++++++++++
+ libavutil/fixed_dsp.h | 2 +-
+ 6 files changed, 662 insertions(+), 1 deletion(-)
+ create mode 100644 libavcodec/arm/mathops.h
+ create mode 100644 libavcodec/mathops.h
+ create mode 100644 libavcodec/mips/mathops.h
+ create mode 100644 libavcodec/ppc/mathops.h
+ create mode 100644 libavcodec/x86/mathops.h
+
+diff --git a/libavcodec/arm/mathops.h b/libavcodec/arm/mathops.h
+new file mode 100644
+index 0000000000..dc57c5571c
+--- /dev/null
++++ b/libavcodec/arm/mathops.h
+@@ -0,0 +1,108 @@
++/*
++ * simple math operations
++ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at> et al
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVCODEC_ARM_MATHOPS_H
++#define AVCODEC_ARM_MATHOPS_H
++
++#include <stdint.h>
++#include "config.h"
++#include "libavutil/common.h"
++
++#if HAVE_INLINE_ASM
++
++#if HAVE_ARMV6_INLINE
++#define MULH MULH
++static inline av_const int MULH(int a, int b)
++{
++ int r;
++ __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
++ return r;
++}
++
++#define FASTDIV FASTDIV
++static av_always_inline av_const int FASTDIV(int a, int b)
++{
++ int r;
++ __asm__ ("cmp %2, #2 \n\t"
++ "ldr %0, [%3, %2, lsl #2] \n\t"
++ "ite le \n\t"
++ "lsrle %0, %1, #1 \n\t"
++ "smmulgt %0, %0, %1 \n\t"
++ : "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc");
++ return r;
++}
++
++#else /* HAVE_ARMV6_INLINE */
++
++#define FASTDIV FASTDIV
++static av_always_inline av_const int FASTDIV(int a, int b)
++{
++ int r, t;
++ __asm__ ("umull %1, %0, %2, %3"
++ : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
++ return r;
++}
++#endif
++
++#define MLS64(d, a, b) MAC64(d, -(a), b)
++
++#if HAVE_ARMV5TE_INLINE
++
++/* signed 16x16 -> 32 multiply add accumulate */
++# define MAC16(rt, ra, rb) \
++ __asm__ ("smlabb %0, %1, %2, %0" : "+r"(rt) : "r"(ra), "r"(rb));
++
++/* signed 16x16 -> 32 multiply */
++# define MUL16 MUL16
++static inline av_const int MUL16(int ra, int rb)
++{
++ int rt;
++ __asm__ ("smulbb %0, %1, %2" : "=r"(rt) : "r"(ra), "r"(rb));
++ return rt;
++}
++
++#endif
++
++#define mid_pred mid_pred
++static inline av_const int mid_pred(int a, int b, int c)
++{
++ int m;
++ __asm__ (
++ "mov %0, %2 \n\t"
++ "cmp %1, %2 \n\t"
++ "itt gt \n\t"
++ "movgt %0, %1 \n\t"
++ "movgt %1, %2 \n\t"
++ "cmp %1, %3 \n\t"
++ "it le \n\t"
++ "movle %1, %3 \n\t"
++ "cmp %0, %1 \n\t"
++ "it gt \n\t"
++ "movgt %0, %1 \n\t"
++ : "=&r"(m), "+r"(a)
++ : "r"(b), "r"(c)
++ : "cc");
++ return m;
++}
++
++#endif /* HAVE_INLINE_ASM */
++
++#endif /* AVCODEC_ARM_MATHOPS_H */
+diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
+new file mode 100644
+index 0000000000..aa0bdfe956
+--- /dev/null
++++ b/libavcodec/mathops.h
+@@ -0,0 +1,254 @@
++/*
++ * simple math operations
++ * Copyright (c) 2001, 2002 Fabrice Bellard
++ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at> et al
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++#ifndef AVCODEC_MATHOPS_H
++#define AVCODEC_MATHOPS_H
++
++#include <stdint.h>
++
++#include "libavutil/attributes_internal.h"
++#include "libavutil/common.h"
++#include "config.h"
++
++#define MAX_NEG_CROP 1024
++
++extern const uint32_t ff_inverse[257];
++extern const uint8_t ff_log2_run[41];
++EXTERN const uint32_t ff_square_tab[512];
++extern const uint8_t ff_sqrt_tab[256];
++EXTERN const uint8_t ff_crop_tab[256 + 2 * MAX_NEG_CROP];
++extern const uint8_t ff_zigzag_direct[64];
++extern const uint8_t ff_zigzag_scan[16+1];
++
++#if ARCH_ARM
++# include "arm/mathops.h"
++#elif ARCH_MIPS
++# include "mips/mathops.h"
++#elif ARCH_PPC
++# include "ppc/mathops.h"
++#elif ARCH_X86
++# include "x86/mathops.h"
++#endif
++
++/* generic implementation */
++
++#ifndef MUL64
++# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
++#endif
++
++#ifndef MULL
++# define MULL(a,b,s) (MUL64(a, b) >> (s))
++#endif
++
++#ifndef MULH
++static av_always_inline int MULH(int a, int b){
++ return MUL64(a, b) >> 32;
++}
++#endif
++
++#ifndef UMULH
++static av_always_inline unsigned UMULH(unsigned a, unsigned b){
++ return ((uint64_t)(a) * (uint64_t)(b))>>32;
++}
++#endif
++
++#ifndef MAC64
++# define MAC64(d, a, b) ((d) += MUL64(a, b))
++#endif
++
++#ifndef MLS64
++# define MLS64(d, a, b) ((d) -= MUL64(a, b))
++#endif
++
++/* signed 16x16 -> 32 multiply add accumulate */
++#ifndef MAC16
++# define MAC16(rt, ra, rb) rt += (ra) * (rb)
++#endif
++
++/* signed 16x16 -> 32 multiply */
++#ifndef MUL16
++# define MUL16(ra, rb) ((ra) * (rb))
++#endif
++
++#ifndef MLS16
++# define MLS16(rt, ra, rb) ((rt) -= (ra) * (rb))
++#endif
++
++/* median of 3 */
++#ifndef mid_pred
++#define mid_pred mid_pred
++static inline av_const int mid_pred(int a, int b, int c)
++{
++ if(a>b){
++ if(c>b){
++ if(c>a) b=a;
++ else b=c;
++ }
++ }else{
++ if(b>c){
++ if(c>a) b=c;
++ else b=a;
++ }
++ }
++ return b;
++}
++#endif
++
++#ifndef median4
++#define median4 median4
++static inline av_const int median4(int a, int b, int c, int d)
++{
++ if (a < b) {
++ if (c < d) return (FFMIN(b, d) + FFMAX(a, c)) / 2;
++ else return (FFMIN(b, c) + FFMAX(a, d)) / 2;
++ } else {
++ if (c < d) return (FFMIN(a, d) + FFMAX(b, c)) / 2;
++ else return (FFMIN(a, c) + FFMAX(b, d)) / 2;
++ }
++}
++#endif
++
++#define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1)
++
++#ifndef sign_extend
++static inline av_const int sign_extend(int val, unsigned bits)
++{
++ unsigned shift = 8 * sizeof(int) - bits;
++ union { unsigned u; int s; } v = { (unsigned) val << shift };
++ return v.s >> shift;
++}
++#endif
++
++#ifndef sign_extend64
++static inline av_const int64_t sign_extend64(int64_t val, unsigned bits)
++{
++ unsigned shift = 8 * sizeof(int64_t) - bits;
++ union { uint64_t u; int64_t s; } v = { (uint64_t) val << shift };
++ return v.s >> shift;
++}
++#endif
++
++#ifndef zero_extend
++static inline av_const unsigned zero_extend(unsigned val, unsigned bits)
++{
++ return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
++}
++#endif
++
++#ifndef COPY3_IF_LT
++#define COPY3_IF_LT(x, y, a, b, c, d)\
++if ((y) < (x)) {\
++ (x) = (y);\
++ (a) = (b);\
++ (c) = (d);\
++}
++#endif
++
++#ifndef MASK_ABS
++#define MASK_ABS(mask, level) do { \
++ mask = level >> 31; \
++ level = (level ^ mask) - mask; \
++ } while (0)
++#endif
++
++#ifndef NEG_SSR32
++# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s)))
++#endif
++
++#ifndef NEG_USR32
++# define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s)))
++#endif
++
++#if HAVE_BIGENDIAN
++# ifndef PACK_2U8
++# define PACK_2U8(a,b) (((a) << 8) | (b))
++# endif
++# ifndef PACK_4U8
++# define PACK_4U8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
++# endif
++# ifndef PACK_2U16
++# define PACK_2U16(a,b) (((a) << 16) | (b))
++# endif
++#else
++# ifndef PACK_2U8
++# define PACK_2U8(a,b) (((b) << 8) | (a))
++# endif
++# ifndef PACK_4U2
++# define PACK_4U8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a))
++# endif
++# ifndef PACK_2U16
++# define PACK_2U16(a,b) (((b) << 16) | (a))
++# endif
++#endif
++
++#ifndef PACK_2S8
++# define PACK_2S8(a,b) PACK_2U8((a)&255, (b)&255)
++#endif
++#ifndef PACK_4S8
++# define PACK_4S8(a,b,c,d) PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255)
++#endif
++#ifndef PACK_2S16
++# define PACK_2S16(a,b) PACK_2U16((a)&0xffff, (b)&0xffff)
++#endif
++
++#ifndef FASTDIV
++# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
++#endif /* FASTDIV */
++
++#ifndef ff_sqrt
++#define ff_sqrt ff_sqrt
++static inline av_const unsigned int ff_sqrt(unsigned int a)
++{
++ unsigned int b;
++
++ if (a < 255) return (ff_sqrt_tab[a + 1] - 1) >> 4;
++ else if (a < (1 << 12)) b = ff_sqrt_tab[a >> 4] >> 2;
++#if !CONFIG_SMALL
++ else if (a < (1 << 14)) b = ff_sqrt_tab[a >> 6] >> 1;
++ else if (a < (1 << 16)) b = ff_sqrt_tab[a >> 8] ;
++#endif
++ else {
++ int s = av_log2_16bit(a >> 16) >> 1;
++ unsigned int c = a >> (s + 2);
++ b = ff_sqrt_tab[c >> (s + 8)];
++ b = FASTDIV(c,b) + (b << s);
++ }
++
++ return b - (a < b * b);
++}
++#endif
++
++static inline av_const float ff_sqrf(float a)
++{
++ return a*a;
++}
++
++static inline int8_t ff_u8_to_s8(uint8_t a)
++{
++ union {
++ uint8_t u8;
++ int8_t s8;
++ } b;
++ b.u8 = a;
++ return b.s8;
++}
++
++#endif /* AVCODEC_MATHOPS_H */
+diff --git a/libavcodec/mips/mathops.h b/libavcodec/mips/mathops.h
+new file mode 100644
+index 0000000000..bb9dc8375a
+--- /dev/null
++++ b/libavcodec/mips/mathops.h
+@@ -0,0 +1,67 @@
++/*
++ * Copyright (c) 2009 Mans Rullgard <mans at mansr.com>
++ * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong at loongson.cn>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVCODEC_MIPS_MATHOPS_H
++#define AVCODEC_MIPS_MATHOPS_H
++
++#include <stdint.h>
++#include "config.h"
++#include "libavutil/common.h"
++
++#if HAVE_INLINE_ASM
++
++#if HAVE_LOONGSON3
++
++#define MULH MULH
++static inline av_const int MULH(int a, int b)
++{
++ int c;
++ __asm__ ("dmult %1, %2 \n\t"
++ "mflo %0 \n\t"
++ "dsrl %0, %0, 32 \n\t"
++ : "=r"(c)
++ : "r"(a),"r"(b)
++ : "hi", "lo");
++ return c;
++}
++
++#define mid_pred mid_pred
++static inline av_const int mid_pred(int a, int b, int c)
++{
++ int t = b;
++ __asm__ ("sgt $8, %1, %2 \n\t"
++ "movn %0, %1, $8 \n\t"
++ "movn %1, %2, $8 \n\t"
++ "sgt $8, %1, %3 \n\t"
++ "movz %1, %3, $8 \n\t"
++ "sgt $8, %0, %1 \n\t"
++ "movn %0, %1, $8 \n\t"
++ : "+&r"(t),"+&r"(a)
++ : "r"(b),"r"(c)
++ : "$8");
++ return t;
++}
++
++#endif /* HAVE_LOONGSON3 */
++
++#endif /* HAVE_INLINE_ASM */
++
++#endif /* AVCODEC_MIPS_MATHOPS_H */
+diff --git a/libavcodec/ppc/mathops.h b/libavcodec/ppc/mathops.h
+new file mode 100644
+index 0000000000..dbd714fcd4
+--- /dev/null
++++ b/libavcodec/ppc/mathops.h
+@@ -0,0 +1,79 @@
++/*
++ * simple math operations
++ * Copyright (c) 2001, 2002 Fabrice Bellard
++ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at> et al
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVCODEC_PPC_MATHOPS_H
++#define AVCODEC_PPC_MATHOPS_H
++
++#include <stdint.h>
++#include "config.h"
++#include "libavutil/common.h"
++
++#if HAVE_PPC4XX
++/* signed 16x16 -> 32 multiply add accumulate */
++#define MAC16(rt, ra, rb) \
++ __asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
++
++/* signed 16x16 -> 32 multiply */
++#define MUL16(ra, rb) \
++ ({ int __rt; \
++ __asm__ ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \
++ __rt; })
++#endif
++
++#define MULH MULH
++static inline av_const int MULH(int a, int b){
++ int r;
++ __asm__ ("mulhw %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
++ return r;
++}
++
++#if !ARCH_PPC64
++static inline av_const int64_t MAC64(int64_t d, int a, int b)
++{
++ union { uint64_t x; unsigned hl[2]; } x = { d };
++ int h, l;
++ __asm__ ("mullw %3, %4, %5 \n\t"
++ "mulhw %2, %4, %5 \n\t"
++ "addc %1, %1, %3 \n\t"
++ "adde %0, %0, %2 \n\t"
++ : "+r"(x.hl[0]), "+r"(x.hl[1]), "=&r"(h), "=&r"(l)
++ : "r"(a), "r"(b));
++ return x.x;
++}
++#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
++
++static inline av_const int64_t MLS64(int64_t d, int a, int b)
++{
++ union { uint64_t x; unsigned hl[2]; } x = { d };
++ int h, l;
++ __asm__ ("mullw %3, %4, %5 \n\t"
++ "mulhw %2, %4, %5 \n\t"
++ "subfc %1, %3, %1 \n\t"
++ "subfe %0, %2, %0 \n\t"
++ : "+r"(x.hl[0]), "+r"(x.hl[1]), "=&r"(h), "=&r"(l)
++ : "r"(a), "r"(b));
++ return x.x;
++}
++#define MLS64(d, a, b) ((d) = MLS64(d, a, b))
++#endif
++
++#endif /* AVCODEC_PPC_MATHOPS_H */
+diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
+new file mode 100644
+index 0000000000..ca7e2dffc1
+--- /dev/null
++++ b/libavcodec/x86/mathops.h
+@@ -0,0 +1,153 @@
++/*
++ * simple math operations
++ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at> et al
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVCODEC_X86_MATHOPS_H
++#define AVCODEC_X86_MATHOPS_H
++
++#include "config.h"
++
++#include "libavutil/common.h"
++#include "libavutil/x86/asm.h"
++
++#if HAVE_INLINE_ASM
++
++#if ARCH_X86_32
++
++#define MULL MULL
++static av_always_inline av_const int MULL(int a, int b, unsigned shift)
++{
++ int rt, dummy;
++ if (__builtin_constant_p(shift))
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "i"(shift & 0x1F)
++ );
++ else
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "c"((uint8_t)shift)
++ );
++ return rt;
++}
++
++#define MULH MULH
++static av_always_inline av_const int MULH(int a, int b)
++{
++ int rt, dummy;
++ __asm__ (
++ "imull %3"
++ :"=d"(rt), "=a"(dummy)
++ :"a"(a), "rm"(b)
++ );
++ return rt;
++}
++
++#define MUL64 MUL64
++static av_always_inline av_const int64_t MUL64(int a, int b)
++{
++ int64_t rt;
++ __asm__ (
++ "imull %2"
++ :"=A"(rt)
++ :"a"(a), "rm"(b)
++ );
++ return rt;
++}
++
++#endif /* ARCH_X86_32 */
++
++#if HAVE_I686
++/* median of 3 */
++#define mid_pred mid_pred
++static inline av_const int mid_pred(int a, int b, int c)
++{
++ int i=b;
++ __asm__ (
++ "cmp %2, %1 \n\t"
++ "cmovg %1, %0 \n\t"
++ "cmovg %2, %1 \n\t"
++ "cmp %3, %1 \n\t"
++ "cmovl %3, %1 \n\t"
++ "cmp %1, %0 \n\t"
++ "cmovg %1, %0 \n\t"
++ :"+&r"(i), "+&r"(a)
++ :"r"(b), "r"(c)
++ );
++ return i;
++}
++
++#if HAVE_6REGS
++#define COPY3_IF_LT(x, y, a, b, c, d)\
++__asm__ volatile(\
++ "cmpl %0, %3 \n\t"\
++ "cmovl %3, %0 \n\t"\
++ "cmovl %4, %1 \n\t"\
++ "cmovl %5, %2 \n\t"\
++ : "+&r" (x), "+&r" (a), "+r" (c)\
++ : "r" (y), "r" (b), "r" (d)\
++);
++#endif /* HAVE_6REGS */
++
++#endif /* HAVE_I686 */
++
++#define MASK_ABS(mask, level) \
++ __asm__ ("cdq \n\t" \
++ "xorl %1, %0 \n\t" \
++ "subl %1, %0 \n\t" \
++ : "+a"(level), "=&d"(mask))
++
++// avoid +32 for shift optimization (gcc should do that ...)
++#define NEG_SSR32 NEG_SSR32
++static inline int32_t NEG_SSR32( int32_t a, int8_t s){
++ if (__builtin_constant_p(s))
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "i" (-s & 0x1F)
++ );
++ else
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
++ return a;
++}
++
++#define NEG_USR32 NEG_USR32
++static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++ if (__builtin_constant_p(s))
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "i" (-s & 0x1F)
++ );
++ else
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
++ return a;
++}
++
++#endif /* HAVE_INLINE_ASM */
++#endif /* AVCODEC_X86_MATHOPS_H */
+diff --git a/libavutil/fixed_dsp.h b/libavutil/fixed_dsp.h
+index 71df874263..699ecce79f 100644
+--- a/libavutil/fixed_dsp.h
++++ b/libavutil/fixed_dsp.h
+@@ -50,7 +50,7 @@
+
+ #include <stdint.h>
+ #include "attributes.h"
+-#include "mathops.h"
++#include "../libavcodec/mathops.h"
+
+ typedef struct AVFixedDSPContext {
+ /* Assume len is a multiple of 16, and arrays are 32-byte aligned */
+--
+2.45.1.windows.1
+
=====================================
contrib/src/postproc/rules.mak
=====================================
@@ -0,0 +1,192 @@
+# libpostproc
+
+POSTPROC_GITURL:=$(GITHUB)/michaelni/libpostproc
+POSTPROC_GITVERSION:=e4982b227779f24f7c54d699d2e247652f69c475
+
+POSTPROC_CONF = --prefix="$(PREFIX)" --enable-static --disable-shared \
+ --extra-ldflags="$(LDFLAGS)" \
+ --cc="$(CC)" \
+ --host-cc="$(BUILDCC)" \
+ --pkg-config="$(PKG_CONFIG)" \
+ --disable-doc \
+ --disable-debug \
+ --disable-devices \
+ --disable-bsfs \
+ --disable-nvenc \
+ --disable-linux-perf
+
+ifdef ENABLE_PDB
+POSTPROC_CONF += --ln_s=false
+endif
+
+DEPS_postproc = ffmpeg $(DEPS_ffmpeg)
+
+POSTPROC_CONF += --disable-network
+POSTPROC_CONF += --disable-encoders --disable-muxers
+
+# Small size
+ifdef WITH_OPTIMIZATION
+ifdef ENABLE_SMALL
+POSTPROC_CONF += --enable-small
+endif
+ifeq ($(ARCH),arm)
+ifdef HAVE_ARMV7A
+POSTPROC_CONF += --enable-thumb
+endif
+endif
+else
+POSTPROC_CONF += --optflags=-Og
+endif
+
+ifdef HAVE_CROSS_COMPILE
+POSTPROC_CONF += --enable-cross-compile --disable-programs
+ifndef HAVE_DARWIN_OS
+POSTPROC_CONF += --cross-prefix=$(HOST)-
+endif
+endif
+
+# ARM stuff
+ifeq ($(ARCH),arm)
+POSTPROC_CONF += --arch=arm
+ifdef HAVE_ARMV7A
+POSTPROC_CONF += --cpu=cortex-a8
+endif
+ifdef HAVE_ARMV6
+POSTPROC_CONF += --cpu=armv6 --disable-neon
+endif
+endif
+
+# ARM64 stuff
+ifeq ($(ARCH),aarch64)
+POSTPROC_CONF += --arch=aarch64
+endif
+
+# MIPS stuff
+ifeq ($(ARCH),mipsel)
+POSTPROC_CONF += --arch=mips
+endif
+ifeq ($(ARCH),mips64el)
+POSTPROC_CONF += --arch=mips64
+endif
+
+# RISC-V stuff
+ifneq ($(findstring $(ARCH),riscv32 riscv64),)
+POSTPROC_CONF += --arch=riscv
+endif
+
+# x86 stuff
+ifeq ($(ARCH),i386)
+ifndef HAVE_DARWIN_OS
+POSTPROC_CONF += --arch=x86
+endif
+endif
+
+# x86_64 stuff
+ifeq ($(ARCH),x86_64)
+ifndef HAVE_DARWIN_OS
+POSTPROC_CONF += --arch=x86_64
+endif
+endif
+
+# Darwin
+ifdef HAVE_DARWIN_OS
+ifeq ($(ARCH),arm64_32)
+# TODO remove when FFMpeg supports arm64_32
+POSTPROC_CONF += --arch=aarch64_32
+else
+POSTPROC_CONF += --arch=$(ARCH)
+endif
+POSTPROC_CONF += --target-os=darwin --extra-cflags="$(CFLAGS)"
+ifeq ($(ARCH),x86_64)
+POSTPROC_CONF += --cpu=core2
+endif
+ifdef HAVE_IOS
+POSTPROC_CONF += --enable-pic --extra-ldflags="$(EXTRA_CFLAGS) -isysroot $(IOS_SDK)"
+ifdef HAVE_WATCHOS
+POSTPROC_CONF += --disable-everything
+endif
+endif
+endif
+
+# Linux
+ifdef HAVE_LINUX
+POSTPROC_CONF += --target-os=linux --enable-pic
+
+endif
+
+ifdef HAVE_ANDROID
+# broken text relocations
+ifeq ($(ANDROID_ABI), x86)
+POSTPROC_CONF += --disable-mmx --disable-mmxext --disable-inline-asm
+endif
+endif
+
+POSTPROC_CONF += --disable-autodetect
+# use the real maintained libavutil, only headers should be used
+# DO NOT install this libavutil in place of the FFmpeg one
+POSTPROC_CONF += --disable-avutil
+POSTPROC_CONF += --enable-postproc
+
+# Windows
+ifdef HAVE_WIN32
+POSTPROC_CONF += --target-os=mingw32
+POSTPROC_CONF += --enable-w32threads
+
+ifeq ($(ARCH),x86_64)
+POSTPROC_CONF += --cpu=athlon64 --arch=x86_64
+else
+ifeq ($(ARCH),i386) # 32bits intel
+POSTPROC_CONF+= --cpu=i686 --arch=x86
+else
+ifdef HAVE_ARMV7A
+POSTPROC_CONF+= --arch=arm
+endif
+endif
+endif
+
+else # !Windows
+POSTPROC_CONF += --enable-pthreads
+endif
+
+# Solaris
+ifdef HAVE_SOLARIS
+ifeq ($(ARCH),x86_64)
+POSTPROC_CONF += --cpu=core2
+endif
+POSTPROC_CONF += --target-os=sunos --enable-pic
+endif
+
+ifdef HAVE_EMSCRIPTEN
+POSTPROC_CONF+= --arch=wasm32 --target-os=none --enable-pic
+endif
+
+# Build
+ifdef GPL
+PKGS += postproc
+endif
+ifeq ($(call need_pkg,"libpostproc"),)
+PKGS_FOUND += postproc
+endif
+
+POSTPROC_CONF += --nm="$(NM)" --ar="$(AR)" --ranlib="$(RANLIB)"
+
+$(TARBALLS)/postproc-$(POSTPROC_GITVERSION).tar.xz:
+ $(call download_git,$(POSTPROC_GITURL),,$(POSTPROC_GITVERSION))
+
+.sum-postproc: $(TARBALLS)/postproc-$(POSTPROC_GITVERSION).tar.xz
+ $(call check_githash,$(POSTPROC_GITVERSION))
+ touch $@
+
+postproc: postproc-$(POSTPROC_GITVERSION).tar.xz .sum-postproc
+ $(UNPACK)
+ $(APPLY) $(SRC)/postproc/0001-force-using-external-libavutil.patch
+ $(APPLY) $(SRC)/postproc/0002-add-missing-libavcodec-headers.patch
+ $(MOVE)
+
+.postproc: postproc
+ $(REQUIRE_GPL)
+ $(MAKEBUILDDIR)
+ $(MAKECONFDIR)/configure $(POSTPROC_CONF)
+ +$(MAKEBUILD)
+ +$(MAKEBUILD) install-libs install-headers
+ touch $@
=====================================
contrib/src/soxr/0001-use-libavutil-tx-code-instead-of-avfft-in-newer-FFmp.patch
=====================================
@@ -0,0 +1,290 @@
+From d950ec16ad02c11b1fe41d9e873311a2b2b35d2f Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 7 Nov 2025 14:38:39 +0100
+Subject: [PATCH] use libavutil tx code instead of avfft in newer FFmpeg
+
+The code is using the replacement code from libavcodec 7.1 using the tx API.
+---
+ src/avfft32.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/avfft32s.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 224 insertions(+)
+
+diff --git a/src/avfft32.c b/src/avfft32.c
+index fe651f5..409b478 100644
+--- a/src/avfft32.c
++++ b/src/avfft32.c
+@@ -3,13 +3,121 @@
+
+ #include <stdlib.h>
+ #include <math.h>
++#include <libavutil/version.h>
++#define USE_LAVUTIL_TX (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57,19,100))
++#if USE_LAVUTIL_TX
++# include <libavutil/tx.h>
++# include <string.h>
++# include <stdlib.h>
++
++typedef struct AVTXWrapper {
++ AVTXContext *ctx;
++ av_tx_fn fn;
++
++ ptrdiff_t stride;
++ int len;
++ int inv;
++
++ float *tmp;
++} AVTXWrapper;
++#else /* !USE_LAVUTIL_TX */
+ #include <libavcodec/avfft.h>
++#endif /* !USE_LAVUTIL_TX */
+ #include "filter.h"
+ #include "rdft_t.h"
+
++#if USE_LAVUTIL_TX
++static void * forward_setup(int len) {
++ int ret;
++ float scale = (0) ? 0.5f : 1.0f;
++ AVTXWrapper *s;
++
++ s = malloc(sizeof(*s));
++ if (!s)
++ return NULL;
++
++ s->stride = (0) ? sizeof(AVComplexFloat) : sizeof(float);
++ s->len = 1 << (int)(log(len)/log(2)+.5);
++ s->inv = (0);
++
++ ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, (0),
++ s->len, &scale, 0x0);
++ if (ret < 0) {
++ free(s);
++ return NULL;
++ }
++
++ s->tmp = malloc((s->len + 2)*sizeof(float));
++ if (!s->tmp) {
++ av_tx_uninit(&s->ctx);
++ free(s);
++ return NULL;
++ }
++
++ return s;
++}
++static void * backward_setup(int len) {
++ int ret;
++ float scale = (1) ? 0.5f : 1.0f;
++ AVTXWrapper *s;
++
++ s = malloc(sizeof(*s));
++ if (!s)
++ return NULL;
++
++ s->stride = (1) ? sizeof(AVComplexFloat) : sizeof(float);
++ s->len = 1 << (int)(log(len)/log(2)+.5);
++ s->inv = (1);
++
++ ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, (1),
++ s->len, &scale, 0x0);
++ if (ret < 0) {
++ free(s);
++ return NULL;
++ }
++
++ s->tmp = malloc((s->len + 2)*sizeof(float));
++ if (!s->tmp) {
++ av_tx_uninit(&s->ctx);
++ free(s);
++ return NULL;
++ }
++
++ return s;
++}
++static void rdft(int length, void * setup, float * data) {
++ AVTXWrapper *w = setup;
++ float *src = w->inv ? w->tmp : data;
++ float *dst = w->inv ? data : w->tmp;
++
++ if (w->inv) {
++ memcpy(src, data, w->len*sizeof(float));
++
++ src[w->len] = src[1];
++ src[1] = 0.0f;
++ }
++
++ w->fn(w->ctx, dst, (void *)src, w->stride);
++
++ if (!w->inv) {
++ dst[1] = dst[w->len];
++ memcpy(data, dst, w->len*sizeof(float));
++ }
++ (void)length;
++}
++static void rdft_end(AVTXWrapper *s)
++{
++ if (s) {
++ av_tx_uninit(&s->ctx);
++ free(s->tmp);
++ free(s);
++ }
++}
++#else
+ static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);}
+ static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);}
+ static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;}
++#endif
+ static int multiplier(void) {return 2;}
+ static void nothing(void) {}
+ static int flags(void) {return 0;}
+@@ -17,7 +125,11 @@ static int flags(void) {return 0;}
+ fn_t _soxr_rdft32_cb[] = {
+ (fn_t)forward_setup,
+ (fn_t)backward_setup,
++#if USE_LAVUTIL_TX
++ (fn_t)rdft_end,
++#else
+ (fn_t)av_rdft_end,
++#endif
+ (fn_t)rdft,
+ (fn_t)rdft,
+ (fn_t)rdft,
+diff --git a/src/avfft32s.c b/src/avfft32s.c
+index 5a7e62d..9ffbe47 100644
+--- a/src/avfft32s.c
++++ b/src/avfft32s.c
+@@ -2,13 +2,121 @@
+ * Licence for this file: LGPL v2.1 See LICENCE for details. */
+
+ #include <math.h>
++#include <libavutil/version.h>
++#define USE_LAVUTIL_TX (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57,19,100))
++#if USE_LAVUTIL_TX
++# include <libavutil/tx.h>
++# include <string.h>
++# include <stdlib.h>
++
++typedef struct AVTXWrapper {
++ AVTXContext *ctx;
++ av_tx_fn fn;
++
++ ptrdiff_t stride;
++ int len;
++ int inv;
++
++ float *tmp;
++} AVTXWrapper;
++#else /* !USE_LAVUTIL_TX */
+ #include <libavcodec/avfft.h>
++#endif /* !USE_LAVUTIL_TX */
+ #include "util32s.h"
+ #include "rdft_t.h"
+
++#if USE_LAVUTIL_TX
++static void * forward_setup(int len) {
++ int ret;
++ float scale = (0) ? 0.5f : 1.0f;
++ AVTXWrapper *s;
++
++ s = malloc(sizeof(*s));
++ if (!s)
++ return NULL;
++
++ s->stride = (0) ? sizeof(AVComplexFloat) : sizeof(float);
++ s->len = 1 << (int)(log(len)/log(2)+.5);
++ s->inv = (0);
++
++ ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, (0),
++ s->len, &scale, 0x0);
++ if (ret < 0) {
++ free(s);
++ return NULL;
++ }
++
++ s->tmp = malloc((s->len + 2)*sizeof(float));
++ if (!s->tmp) {
++ av_tx_uninit(&s->ctx);
++ free(s);
++ return NULL;
++ }
++
++ return s;
++}
++static void * backward_setup(int len) {
++ int ret;
++ float scale = (1) ? 0.5f : 1.0f;
++ AVTXWrapper *s;
++
++ s = malloc(sizeof(*s));
++ if (!s)
++ return NULL;
++
++ s->stride = (1) ? sizeof(AVComplexFloat) : sizeof(float);
++ s->len = 1 << (int)(log(len)/log(2)+.5);
++ s->inv = (1);
++
++ ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, (1),
++ s->len, &scale, 0x0);
++ if (ret < 0) {
++ free(s);
++ return NULL;
++ }
++
++ s->tmp = malloc((s->len + 2)*sizeof(float));
++ if (!s->tmp) {
++ av_tx_uninit(&s->ctx);
++ free(s);
++ return NULL;
++ }
++
++ return s;
++}
++static void rdft(int length, void * setup, float * data) {
++ AVTXWrapper *w = setup;
++ float *src = w->inv ? w->tmp : data;
++ float *dst = w->inv ? data : w->tmp;
++
++ if (w->inv) {
++ memcpy(src, data, w->len*sizeof(float));
++
++ src[w->len] = src[1];
++ src[1] = 0.0f;
++ }
++
++ w->fn(w->ctx, dst, (void *)src, w->stride);
++
++ if (!w->inv) {
++ dst[1] = dst[w->len];
++ memcpy(data, dst, w->len*sizeof(float));
++ }
++ (void)length;
++}
++static void rdft_end(AVTXWrapper *s)
++{
++ if (s) {
++ av_tx_uninit(&s->ctx);
++ free(s->tmp);
++ free(s);
++ }
++}
++#else
+ static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);}
+ static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);}
+ static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;}
++#endif
+ static int multiplier(void) {return 2;}
+ static void nothing(void) {}
+ static int flags(void) {return RDFT_IS_SIMD;}
+@@ -16,7 +124,11 @@ static int flags(void) {return RDFT_IS_SIMD;}
+ fn_t _soxr_rdft32s_cb[] = {
+ (fn_t)forward_setup,
+ (fn_t)backward_setup,
++#if USE_LAVUTIL_TX
++ (fn_t)rdft_end,
++#else
+ (fn_t)av_rdft_end,
++#endif
+ (fn_t)rdft,
+ (fn_t)rdft,
+ (fn_t)rdft,
+--
+2.45.1.windows.1
+
=====================================
contrib/src/soxr/rules.mak
=====================================
@@ -24,6 +24,7 @@ soxr: soxr-$(SOXR_VERSION)-Source.tar.xz .sum-soxr
$(APPLY) $(SRC)/soxr/soxr-check-function.patch
$(APPLY) $(SRC)/soxr/aarch64.patch
$(APPLY) $(SRC)/soxr/0001-Allocate-an-extra-real-number.patch
+ $(APPLY) $(SRC)/soxr/0001-use-libavutil-tx-code-instead-of-avfft-in-newer-FFmp.patch
$(call pkg_static,"src/soxr.pc.in")
$(MOVE)
=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -619,7 +619,7 @@ xros-arm64:
name: $VLC_ANDROID_IMAGE
script: |
git clone https://code.videolan.org/videolan/libvlcjni.git
- (cd libvlcjni && git checkout e90807431330d949b855b37695b9004af6b00bd9)
+ (cd libvlcjni && git checkout b39434016d07928498b915e4164a02a6a3f2f695)
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
CONTRIB_FLAGS="--with-prebuilt-contribs"
elif [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" -a "${CI_PROJECT_PATH}" = "videolan/vlc" ]; then
=====================================
modules/codec/avcodec/avcommon_compat.h
=====================================
@@ -69,9 +69,6 @@
#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME
# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME
#endif
-#ifndef AV_INPUT_BUFFER_MIN_SIZE
-# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE
-#endif
#ifndef FF_MAX_B_FRAMES
# define FF_MAX_B_FRAMES 16 // FIXME: remove this
#endif
@@ -97,4 +94,10 @@
#endif
+#if LIBAVCODEC_VERSION_CHECK(60,26,100)
+# define AVPROFILE(prof) (AV_PROFILE_##prof)
+#else
+# define AVPROFILE(prof) (FF_PROFILE_##prof)
+#endif
+
#endif
=====================================
modules/codec/avcodec/directx_va.c
=====================================
@@ -50,30 +50,30 @@
#include "../../packetizer/h264_nal.h"
#include "../../packetizer/hevc_nal.h"
-static const int PROF_MPEG2_MAIN[] = { FF_PROFILE_MPEG2_SIMPLE,
- FF_PROFILE_MPEG2_MAIN,
- FF_PROFILE_UNKNOWN };
-static const int PROF_H264_HIGH[] = { FF_PROFILE_H264_BASELINE,
- FF_PROFILE_H264_CONSTRAINED_BASELINE,
- FF_PROFILE_H264_MAIN,
- FF_PROFILE_H264_HIGH,
- FF_PROFILE_UNKNOWN };
-static const int PROF_HEVC_MAIN[] = { FF_PROFILE_HEVC_MAIN,
- FF_PROFILE_UNKNOWN };
-static const int PROF_HEVC_MAIN10[] = { FF_PROFILE_HEVC_MAIN,
- FF_PROFILE_HEVC_MAIN_10,
- FF_PROFILE_UNKNOWN };
+static const int PROF_MPEG2_MAIN[] = { AVPROFILE(MPEG2_SIMPLE),
+ AVPROFILE(MPEG2_MAIN),
+ AVPROFILE(UNKNOWN) };
+static const int PROF_H264_HIGH[] = { AVPROFILE(H264_BASELINE),
+ AVPROFILE(H264_CONSTRAINED_BASELINE),
+ AVPROFILE(H264_MAIN),
+ AVPROFILE(H264_HIGH),
+ AVPROFILE(UNKNOWN) };
+static const int PROF_HEVC_MAIN[] = { AVPROFILE(HEVC_MAIN),
+ AVPROFILE(UNKNOWN) };
+static const int PROF_HEVC_MAIN10[] = { AVPROFILE(HEVC_MAIN),
+ AVPROFILE(HEVC_MAIN_10),
+ AVPROFILE(UNKNOWN) };
#ifdef FF_DXVA2_WORKAROUND_HEVC_REXT
-static const int PROF_HEVC_MAIN_REXT[] = { FF_PROFILE_HEVC_REXT,
- FF_PROFILE_UNKNOWN };
+static const int PROF_HEVC_MAIN_REXT[] = { AVPROFILE(HEVC_REXT),
+ AVPROFILE(UNKNOWN) };
#endif
-static const int PROF_VP9_MAIN[] = { FF_PROFILE_VP9_0, FF_PROFILE_UNKNOWN };
-static const int PROF_VP9_10[] = { FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN };
+static const int PROF_VP9_MAIN[] = { AVPROFILE(VP9_0), AVPROFILE(UNKNOWN) };
+static const int PROF_VP9_10[] = { AVPROFILE(VP9_2), AVPROFILE(UNKNOWN) };
-static const int PROF_AV1_MAIN[] = { FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
-static const int PROF_AV1_HIGH[] = { FF_PROFILE_AV1_HIGH, FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
+static const int PROF_AV1_MAIN[] = { AVPROFILE(AV1_MAIN), AVPROFILE(UNKNOWN) };
+static const int PROF_AV1_HIGH[] = { AVPROFILE(AV1_HIGH), AVPROFILE(AV1_MAIN), AVPROFILE(UNKNOWN) };
#if defined(__MINGW64_VERSION_MAJOR) // mingw-w64 doesn't have all the standard GUIDs
@@ -428,7 +428,7 @@ static bool profile_supported(const directx_va_mode_t *mode, const es_format_t *
int profile;
if (fmt->i_profile >= 0)
profile = fmt->i_profile;
- else if (avctx->profile != FF_PROFILE_UNKNOWN)
+ else if (avctx->profile != AVPROFILE(UNKNOWN))
profile = avctx->profile;
else
profile = -1;
@@ -447,7 +447,7 @@ static bool profile_supported(const directx_va_mode_t *mode, const es_format_t *
bool is_supported = false;
if (profile != -1)
- for (const int *p_profile = &mode->p_profiles[0]; *p_profile != FF_PROFILE_UNKNOWN; ++p_profile)
+ for (const int *p_profile = &mode->p_profiles[0]; *p_profile != AVPROFILE(UNKNOWN); ++p_profile)
{
if (*p_profile == profile)
{
=====================================
modules/codec/avcodec/encoder.c
=====================================
@@ -492,30 +492,30 @@ int InitVideoEnc( vlc_object_t *p_this )
psz_val = var_GetString( p_enc, ENC_CFG_PREFIX "aac-profile" );
/* libavcodec uses faac encoder atm, and it has issues with
* other than low-complexity profile, so default to that */
- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW;
+ p_sys->i_aac_profile = AVPROFILE(AAC_LOW);
if( psz_val && *psz_val )
{
if( !strncmp( psz_val, "main", 4 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_MAIN;
+ p_sys->i_aac_profile = AVPROFILE(AAC_MAIN);
else if( !strncmp( psz_val, "low", 3 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW;
+ p_sys->i_aac_profile = AVPROFILE(AAC_LOW);
else if( !strncmp( psz_val, "ssr", 3 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_SSR;
+ p_sys->i_aac_profile = AVPROFILE(AAC_SSR);
else if( !strncmp( psz_val, "ltp", 3 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_LTP;
+ p_sys->i_aac_profile = AVPROFILE(AAC_LTP);
/* These require libavcodec with libfdk-aac */
else if( !strncmp( psz_val, "hev2", 4 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_HE_V2;
+ p_sys->i_aac_profile = AVPROFILE(AAC_HE_V2);
else if( !strncmp( psz_val, "hev1", 4 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_HE;
+ p_sys->i_aac_profile = AVPROFILE(AAC_HE);
else if( !strncmp( psz_val, "ld", 2 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_LD;
+ p_sys->i_aac_profile = AVPROFILE(AAC_LD);
else if( !strncmp( psz_val, "eld", 3 ) )
- p_sys->i_aac_profile = FF_PROFILE_AAC_ELD;
+ p_sys->i_aac_profile = AVPROFILE(AAC_ELD);
else
{
msg_Warn( p_enc, "unknown AAC profile requested, setting it to low" );
- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW;
+ p_sys->i_aac_profile = AVPROFILE(AAC_LOW);
}
}
free( psz_val );
@@ -1067,7 +1067,7 @@ errmsg:
p_sys->i_sample_bytes = (p_enc->fmt_in.audio.i_bitspersample / 8);
p_sys->i_frame_size = p_context->frame_size > 1 ?
p_context->frame_size :
- AV_INPUT_BUFFER_MIN_SIZE;
+ 16384; // AV_INPUT_BUFFER_MIN_SIZE
p_sys->i_buffer_out = av_samples_get_buffer_size(NULL,
p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size,
p_sys->p_context->sample_fmt, DEFAULT_ALIGN);
=====================================
modules/codec/avcodec/vaapi.c
=====================================
@@ -195,10 +195,10 @@ static int CheckCodecConfig(vlc_va_t *va, AVCodecContext *ctx, VADisplay va_dpy,
VAProfile profile;
switch (ctx->profile)
{
- case FF_PROFILE_AV1_MAIN:
+ case AVPROFILE(AV1_MAIN):
profile = VAProfileAV1Profile0;
break;
- case FF_PROFILE_AV1_HIGH:
+ case AVPROFILE(AV1_HIGH):
profile = VAProfileAV1Profile1;
break;
default:
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/80868d09a4f093185697b430a1710f8625ed28d2...88fb5d501f8110ea1b52062f58c62fa5f52ae325
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/80868d09a4f093185697b430a1710f8625ed28d2...88fb5d501f8110ea1b52062f58c62fa5f52ae325
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list