commit:     c9ed1d4bb3417c2351ab6bd8a81c74bc3dd9ec7e
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Nov 23 16:32:15 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Nov 23 22:23:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ed1d4b

media-video/ffmpeg: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../ffmpeg-5.1.2-get_cabac_inline_x86-32-bit.patch |  25 -----
 ...eg-6.0-libplacebo-remove-deprecated-field.patch | 103 -------------------
 .../ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch     | 112 ---------------------
 3 files changed, 240 deletions(-)

diff --git 
a/media-video/ffmpeg/files/ffmpeg-5.1.2-get_cabac_inline_x86-32-bit.patch 
b/media-video/ffmpeg/files/ffmpeg-5.1.2-get_cabac_inline_x86-32-bit.patch
deleted file mode 100644
index 40db3304b564..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-5.1.2-get_cabac_inline_x86-32-bit.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugs.gentoo.org/901099 and partly https://bugs.gentoo.org/900937.
-
-Newer compilers may optimise such that < 7 registers are free on 32-bit x86
-and then we get an "invalid asm" error. This is https://bugs.gentoo.org/901099
-and https://trac.ffmpeg.org/ticket/8903.
-
-Making matters worse, GCC sometimes hangs on invalid asm, so this also
-mitigates a hang with e.g. -O3 -march=znver1. See 
https://bugs.gentoo.org/900937
-and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137.
-
-In future, we may want to adjust the definition of HAVE_7REGS to just exclude
-32-bit x86, but that's a big sledgehammer, so let's avoid it for now until we 
have
-a reply on the upstream ffmpeg bug.
---- a/libavcodec/x86/cabac.h
-+++ b/libavcodec/x86/cabac.h
-@@ -175,7 +175,7 @@
-
- #endif /* BROKEN_RELOCATIONS */
-
--#if HAVE_7REGS && !BROKEN_COMPILER
-+#if HAVE_7REGS && !BROKEN_COMPILER && !ARCH_X86_32
- #define get_cabac_inline get_cabac_inline_x86
- static
- #if defined(_WIN32) && !defined(_WIN64) && defined(__clang__)
-

diff --git 
a/media-video/ffmpeg/files/ffmpeg-6.0-libplacebo-remove-deprecated-field.patch 
b/media-video/ffmpeg/files/ffmpeg-6.0-libplacebo-remove-deprecated-field.patch
deleted file mode 100644
index ca05c1c56ea4..000000000000
--- 
a/media-video/ffmpeg/files/ffmpeg-6.0-libplacebo-remove-deprecated-field.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-Bug: https://bugs.gentoo.org/910406
-
-Backports the following two commits:
-  
https://github.com/FFmpeg/FFmpeg/commit/11eca6018c40f5ebe6af93cbc4b4dce447d8b3bc
-  
https://github.com/FFmpeg/FFmpeg/commit/1231003c3c6d4839a9e838d06f8e16ee7690958f
-
---- a/doc/filters.texi
-+++ b/doc/filters.texi
-@@ -16242,9 +16242,6 @@
- @item disable_builtin
- Disable built-in GPU sampling (forces LUT).
- 
--@item force_icc_lut
--Force the use of a full ICC 3DLUT for gamut mapping.
--
- @item disable_fbos
- Forcibly disable FBOs, resulting in loss of almost all functionality, but
- offering the maximum possible speed.
---- a/libavfilter/version_major.h
-+++ b/libavfilter/version_major.h
-@@ -35,4 +35,6 @@
-  * the public API and may change, break or disappear at any time.
-  */
- 
-+#define FF_API_LIBPLACEBO_OPTS (LIBAVFILTER_VERSION_MAJOR < 10)
-+
- #endif /* AVFILTER_VERSION_MAJOR_H */
---- a/libavfilter/vf_libplacebo.c
-+++ b/libavfilter/vf_libplacebo.c
-@@ -97,7 +97,6 @@
-     float polar_cutoff;
-     int disable_linear;
-     int disable_builtin;
--    int force_icc_lut;
-     int force_dither;
-     int disable_fbos;
- 
-@@ -132,11 +131,15 @@
-     int inverse_tonemapping;
-     float crosstalk;
-     int tonemapping_lut_size;
-+
-+#if FF_API_LIBPLACEBO_OPTS
-     /* for backwards compatibility */
-     float desat_str;
-     float desat_exp;
-     int gamut_warning;
-     int gamut_clipping;
-+    int force_icc_lut;
-+#endif
- 
-      /* pl_dither_params */
-     int dithering;
-@@ -380,6 +383,7 @@
-         pl_rect2df_aspect_set(&target.crop, aspect, s->pad_crop_ratio);
-     }
- 
-+#if FF_API_LIBPLACEBO_OPTS
-     /* backwards compatibility with older API */
-     if (!tonemapping_mode && (s->desat_str >= 0.0f || s->desat_exp >= 0.0f)) {
-         float str = s->desat_str < 0.0f ? 0.9f : s->desat_str;
-@@ -397,6 +401,7 @@
-         gamut_mode = PL_GAMUT_WARN;
-     if (s->gamut_clipping)
-         gamut_mode = PL_GAMUT_DESATURATE;
-+#endif
- 
-     /* Update render params */
-     params = (struct pl_render_params) {
-@@ -458,7 +463,6 @@
-         .polar_cutoff = s->polar_cutoff,
-         .disable_linear_scaling = s->disable_linear,
-         .disable_builtin_scalers = s->disable_builtin,
--        .force_icc_lut = s->force_icc_lut,
-         .force_dither = s->force_dither,
-         .disable_fbos = s->disable_fbos,
-     };
-@@ -818,11 +822,14 @@
-     { "inverse_tonemapping", "Inverse tone mapping (range expansion)", 
OFFSET(inverse_tonemapping), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { "tonemapping_crosstalk", "Crosstalk factor for tone-mapping", 
OFFSET(crosstalk), AV_OPT_TYPE_FLOAT, {.dbl = 0.04}, 0.0, 0.30, DYNAMIC },
-     { "tonemapping_lut_size", "Tone-mapping LUT size", 
OFFSET(tonemapping_lut_size), AV_OPT_TYPE_INT, {.i64 = 256}, 2, 1024, DYNAMIC },
-+
-+#if FF_API_LIBPLACEBO_OPTS
-     /* deprecated options for backwards compatibility, defaulting to -1 to 
not override the new defaults */
-     { "desaturation_strength", "Desaturation strength", OFFSET(desat_str), 
AV_OPT_TYPE_FLOAT, {.dbl = -1.0}, -1.0, 1.0, DYNAMIC | AV_OPT_FLAG_DEPRECATED },
-     { "desaturation_exponent", "Desaturation exponent", OFFSET(desat_exp), 
AV_OPT_TYPE_FLOAT, {.dbl = -1.0}, -1.0, 10.0, DYNAMIC | AV_OPT_FLAG_DEPRECATED 
},
-     { "gamut_warning", "Highlight out-of-gamut colors", 
OFFSET(gamut_warning), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | 
AV_OPT_FLAG_DEPRECATED },
-     { "gamut_clipping", "Enable colorimetric gamut clipping", 
OFFSET(gamut_clipping), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | 
AV_OPT_FLAG_DEPRECATED },
-+#endif
- 
-     { "dithering", "Dither method to use", OFFSET(dithering), 
AV_OPT_TYPE_INT, {.i64 = PL_DITHER_BLUE_NOISE}, -1, PL_DITHER_METHOD_COUNT - 1, 
DYNAMIC, "dither" },
-         { "none", "Disable dithering", 0, AV_OPT_TYPE_CONST, {.i64 = -1}, 0, 
0, STATIC, "dither" },
-@@ -847,7 +854,9 @@
-     { "polar_cutoff", "Polar LUT cutoff", OFFSET(polar_cutoff), 
AV_OPT_TYPE_FLOAT, {.dbl = 0}, 0.0, 1.0, DYNAMIC },
-     { "disable_linear", "Disable linear scaling", OFFSET(disable_linear), 
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { "disable_builtin", "Disable built-in scalers", OFFSET(disable_builtin), 
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
--    { "force_icc_lut", "Force the use of a full ICC 3DLUT for color mapping", 
OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-+#if FF_API_LIBPLACEBO_OPTS
-+    { "force_icc_lut", "Deprecated, does nothing", OFFSET(force_icc_lut), 
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED },
-+#endif
-     { "force_dither", "Force dithering", OFFSET(force_dither), 
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { "disable_fbos", "Force-disable FBOs", OFFSET(disable_fbos), 
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { NULL },

diff --git a/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch 
b/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch
deleted file mode 100644
index 10c216ec4c88..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://bugs.gentoo.org/924431
-https://git.videolan.org/?p=ffmpeg.git;a=commit;h=75b1a555a70c178a9166629e43ec2f6250219eb2
-https://git.videolan.org/?p=ffmpeg.git;a=commit;h=ac06190a5a11f2b170e7719d769d7c0d65bff3e0
-
-From 75b1a555a70c178a9166629e43ec2f6250219eb2 Mon Sep 17 00:00:00 2001
-From: Leo Izen <[email protected]>
-Date: Sat, 8 Jul 2023 14:43:31 -0400
-Subject: [PATCH] avcodec/libjxldec: build against libjxl 0.9
-
-Git master libjxl changed several function signatures, so this commit
-adds some #ifdefs to handle the new signatures without breaking old
-releases. Do note that old git master development versions of libjxl
-will be broken, but no releases will be.
-
-Signed-off-by: Leo Izen <[email protected]>
---- a/libavcodec/libjxldec.c
-+++ b/libavcodec/libjxldec.c
-@@ -210,14 +210,22 @@ static int libjxl_get_icc(AVCodecContext *avctx)
-     JxlDecoderStatus jret;
-     /* an ICC profile is present, and we can meaningfully get it,
-      * because the pixel data is not XYB-encoded */
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-     jret = JxlDecoderGetICCProfileSize(ctx->decoder, &ctx->jxl_pixfmt, 
JXL_COLOR_PROFILE_TARGET_DATA, &icc_len);
-+#else
-+    jret = JxlDecoderGetICCProfileSize(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, &icc_len);
-+#endif
-     if (jret == JXL_DEC_SUCCESS && icc_len > 0) {
-         av_buffer_unref(&ctx->iccp);
-         ctx->iccp = av_buffer_alloc(icc_len);
-         if (!ctx->iccp)
-             return AVERROR(ENOMEM);
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-         jret = JxlDecoderGetColorAsICCProfile(ctx->decoder, &ctx->jxl_pixfmt, 
JXL_COLOR_PROFILE_TARGET_DATA,
--                                                ctx->iccp->data, icc_len);
-+                                              ctx->iccp->data, icc_len);
-+#else
-+        jret = JxlDecoderGetColorAsICCProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, ctx->iccp->data, icc_len);
-+#endif
-         if (jret != JXL_DEC_SUCCESS) {
-             av_log(avctx, AV_LOG_WARNING, "Unable to obtain ICC Profile\n");
-             av_buffer_unref(&ctx->iccp);
-@@ -253,12 +261,21 @@ static int libjxl_color_encoding_event(AVCodecContext 
*avctx, AVFrame *frame)
-     /* set this flag if we need to fall back on wide gamut */
-     int fallback = 0;
- 
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-     jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, NULL, 
JXL_COLOR_PROFILE_TARGET_ORIGINAL, &jxl_color);
-+#else
-+    jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_ORIGINAL, &jxl_color);
-+#endif
-     if (jret == JXL_DEC_SUCCESS) {
-         /* enum values describe the colors of this image */
-         jret = JxlDecoderSetPreferredColorProfile(ctx->decoder, &jxl_color);
-         if (jret == JXL_DEC_SUCCESS)
--            jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
&ctx->jxl_pixfmt, JXL_COLOR_PROFILE_TARGET_DATA, &jxl_color);
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-+            jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
&ctx->jxl_pixfmt,
-+                                                      
JXL_COLOR_PROFILE_TARGET_DATA, &jxl_color);
-+#else
-+            jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, &jxl_color);
-+#endif
-         /* if we couldn't successfully request the pixel data space, we fall 
back on wide gamut */
-         /* this code path is very unlikely to happen in practice */
-         if (jret != JXL_DEC_SUCCESS)
--- 
-2.30.2
-
-From ac06190a5a11f2b170e7719d769d7c0d65bff3e0 Mon Sep 17 00:00:00 2001
-From: Leo Izen <[email protected]>
-Date: Tue, 23 Jan 2024 17:29:14 -0500
-Subject: [PATCH] avcodec/libjxl.h: include version.h
-
-This file has been exported since our minimum required version (0.7.0),
-but it wasn't documented. Instead it was transitively included by
-<jxl/decode.h> (but not jxl/encode.h), which ffmpeg relied on.
-
-libjxl broke its API in libjxl/libjxl@66b959239355aef5255 by removing
-the transitive include of version.h, and they do not plan on adding
-it back. Instead they are choosing to leave the API backwards-
-incompatible with downstream callers written for some fairly recent
-versions of their API.
-
-As a result, we include <jxl/version.h> to continue to build against
-more recent versions of libjxl. The version macros removed are also
-present in that file, so we no longer need to redefine them.
-
-Signed-off-by: Leo Izen <[email protected]>
---- a/libavcodec/libjxl.h
-+++ b/libavcodec/libjxl.h
-@@ -27,19 +27,8 @@
- #ifndef AVCODEC_LIBJXL_H
- #define AVCODEC_LIBJXL_H
- 
--#include <jxl/decode.h>
- #include <jxl/memory_manager.h>
--
--/*
-- * libjxl version 0.7.0 and earlier doesn't contain these macros at all
-- * so to detect version 0.7.0 versus 0.8.0 we need to define them ourselves
-- */
--#ifndef JPEGXL_COMPUTE_NUMERIC_VERSION
--    #define JPEGXL_COMPUTE_NUMERIC_VERSION(major,minor,patch) ((major<<24) | 
(minor<<16) | (patch<<8) | 0)
--#endif
--#ifndef JPEGXL_NUMERIC_VERSION
--    #define JPEGXL_NUMERIC_VERSION JPEGXL_COMPUTE_NUMERIC_VERSION(0, 7, 0)
--#endif
-+#include <jxl/version.h>
- 
- /**
-  * Transform threadcount in ffmpeg to one used by libjxl.
--- 
-2.30.2

Reply via email to