From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/, media-video/ffmpeg/files/
Date: Wed, 26 Jul 2023 04:08:34 +0000 (UTC) [thread overview]
Message-ID: <1690343397.180b5c780fbc8154bf4be5c69d67ff184cd539c6.sam@gentoo> (raw)
commit: 180b5c780fbc8154bf4be5c69d67ff184cd539c6
Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Fri Jul 21 02:54:23 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 26 03:49:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=180b5c78
media-video/ffmpeg: fix building against libplacebo-6
Backports two commits from master that remove the offending
force_icc_lut field.
Closes: https://bugs.gentoo.org/910406
Closes: https://github.com/gentoo/gentoo/pull/31987
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-video/ffmpeg/ffmpeg-6.0-r4.ebuild | 1 +
...eg-6.0-libplacebo-remove-deprecated-field.patch | 103 +++++++++++++++++++++
2 files changed, 104 insertions(+)
diff --git a/media-video/ffmpeg/ffmpeg-6.0-r4.ebuild b/media-video/ffmpeg/ffmpeg-6.0-r4.ebuild
index d3ce1df53e9f..e4b90e3a7bf4 100644
--- a/media-video/ffmpeg/ffmpeg-6.0-r4.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.0-r4.ebuild
@@ -344,6 +344,7 @@ PATCHES=(
"${FILESDIR}"/${P}-DECLARE_ALIGNED.patch
"${FILESDIR}"/${PN}-5.1.2-get_cabac_inline_x86-32-bit.patch
"${FILESDIR}"/${P}-wint-conversion-vulkan.patch
+ "${FILESDIR}"/${P}-libplacebo-remove-deprecated-field.patch
)
MULTILIB_WRAPPED_HEADERS=(
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
new file mode 100644
index 000000000000..ca05c1c56ea4
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.0-libplacebo-remove-deprecated-field.patch
@@ -0,0 +1,103 @@
+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 },
next reply other threads:[~2023-07-26 4:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 4:08 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-05 15:50 [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/, media-video/ffmpeg/files/ Ionen Wolkens
2025-03-11 9:04 Ionen Wolkens
2024-11-19 21:21 Andreas K. Hüttel
2024-08-29 7:52 Andrew Ammerlaan
2024-07-03 0:37 Sam James
2023-12-16 11:26 Sam James
2023-12-03 23:20 James Le Cuirot
2023-08-02 8:13 Sam James
2023-06-07 3:38 Sam James
2023-03-15 2:15 Sam James
2023-03-14 20:23 Craig Andrews
2022-10-09 23:10 Sam James
2022-08-21 2:39 Sam James
2022-07-21 2:53 Matt Turner
2022-07-21 2:31 Matt Turner
2022-04-17 19:24 Sam James
2022-03-16 15:18 Sam James
2020-10-07 17:07 Sam James
2020-07-27 16:40 Sam James
2020-06-17 17:35 Thomas Deutschmann
2017-10-08 10:21 Alexis Ballier
2017-08-27 6:33 Alexis Ballier
2016-10-24 10:35 Alexis Ballier
2016-02-01 8:41 Alexis Ballier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1690343397.180b5c780fbc8154bf4be5c69d67ff184cd539c6.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox