]> git.pld-linux.org Git - packages/vlc.git/commitdiff
port libplacebo 0.18 compatibility fix from vlc 4; rel 2
authorJan Palus <atler@pld-linux.org>
Sat, 26 Oct 2019 22:38:24 +0000 (00:38 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 26 Oct 2019 22:38:24 +0000 (00:38 +0200)
vlc-libplacebo-0.18.patch [new file with mode: 0644]
vlc.spec

diff --git a/vlc-libplacebo-0.18.patch b/vlc-libplacebo-0.18.patch
new file mode 100644 (file)
index 0000000..fc13a6e
--- /dev/null
@@ -0,0 +1,95 @@
+From b579384a239683232f5558216cc03c6ae5a5dc38 Mon Sep 17 00:00:00 2001
+From: Niklas Haas <git@haasn.xyz>
+Date: Mon, 6 May 2019 09:56:36 +0200
+Subject: [PATCH] placebo: update for new tone mapping desaturation algo
+
+This was introduced in API version 10, and refactors the tone mapping
+desaturation curve into a new, more tunable algorithm that has some
+different behavior. In particular, it allows us to simulate exactly the
+"hollywood" style of tone mapping, so we document those special values
+specifically.
+
+Signed-off-by: Thomas Guillem <thomas@gllm.fr>
+---
+ .../video_output/opengl/fragment_shaders.c    |  6 ++++++
+ modules/video_output/opengl/vout_helper.h     | 19 +++++++++++++++++--
+ modules/video_output/placebo_utils.h          | 12 ++++++++++++
+ modules/video_output/vulkan/display.c         | 18 ++++++++++++++++++
+ 4 files changed, 53 insertions(+), 2 deletions(-)
+
+diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
+index f58b4467b6..79bba13912 100644
+--- a/modules/video_output/opengl/fragment_shaders.c
++++ b/modules/video_output/opengl/fragment_shaders.c
+@@ -558,7 +558,13 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target,
+         color_params.intent = var_InheritInteger(tc->gl, "rendering-intent");
+         color_params.tone_mapping_algo = var_InheritInteger(tc->gl, "tone-mapping");
+         color_params.tone_mapping_param = var_InheritFloat(tc->gl, "tone-mapping-param");
++#    if PL_API_VER >= 10
++        color_params.desaturation_strength = var_InheritFloat(tc->gl, "desat-strength");
++        color_params.desaturation_exponent = var_InheritFloat(tc->gl, "desat-exponent");
++        color_params.desaturation_base = var_InheritFloat(tc->gl, "desat-base");
++#    else
+         color_params.tone_mapping_desaturate = var_InheritFloat(tc->gl, "tone-mapping-desat");
++#    endif
+         color_params.gamut_warning = var_InheritBool(tc->gl, "tone-mapping-warn");
+         struct pl_color_space dst_space = pl_color_space_unknown;
+diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h
+index a13f66c1cc..332f63c79e 100644
+--- a/modules/video_output/opengl/vout_helper.h
++++ b/modules/video_output/opengl/vout_helper.h
+@@ -148,6 +148,15 @@
+ #define TONEMAP_DESAT_TEXT "Tone-mapping desaturation coefficient"
+ #define TONEMAP_DESAT_LONGTEXT "How strongly to desaturate overbright colors towards white. 0.0 disables this behavior."
++#define DESAT_STRENGTH_TEXT "Desaturation strength"
++#define DESAT_STRENGTH_LONGTEXT "How strongly to desaturate bright spectral colors towards white. 0.0 disables this behavior, 1.0 enables full desaturation (hollywood-style)"
++
++#define DESAT_EXPONENT_TEXT "Desaturation exponent"
++#define DESAT_EXPONENT_LONGTEXT "Controls the steepness of the desaturation curve. If you set this to 0.0, the curve will be flat, i.e. desaturation always enabled (hollywood-style)."
++
++#define DESAT_BASE_TEXT "Desaturation base"
++#define DESAT_BASE_LONGTEXT "Controls the starting offset of the desaturation curve. Brightness values below this base will always be colorimetrically tone mapped (never desaturated)."
++
+ #define TONEMAP_WARN_TEXT "Highlight clipped pixels"
+ #define TONEMAP_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process."
+@@ -171,6 +180,22 @@
+ #ifdef HAVE_LIBPLACEBO
+ #include "../placebo_utils.h"
++
++#if PL_API_VER >= 10
++#define add_desat_params() \
++    add_float("desat-strength", pl_color_map_default_params.desaturation_strength, \
++              DESAT_STRENGTH_TEXT, DESAT_STRENGTH_LONGTEXT, false) \
++    add_float("desat-exponent", pl_color_map_default_params.desaturation_exponent, \
++              DESAT_EXPONENT_TEXT, DESAT_EXPONENT_LONGTEXT, false) \
++    add_float("desat-base", pl_color_map_default_params.desaturation_base, \
++              DESAT_BASE_TEXT, DESAT_BASE_LONGTEXT, false) \
++    add_obsolete_string("tone-mapping-desat")
++#else
++#define add_desat_params() \
++    add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \
++              TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false)
++#endif
++
+ #define add_glopts_placebo() \
+     set_section(N_("Colorspace conversion"), NULL) \
+     add_integer("rendering-intent", pl_color_map_default_params.intent, \
+@@ -200,10 +184,9 @@
+     add_integer("tone-mapping", PL_TONE_MAPPING_HABLE, \
+                 TONEMAPPING_TEXT, TONEMAPPING_LONGTEXT, false) \
+             change_integer_list(tone_values, tone_text) \
++    add_desat_params() \
+     add_float("tone-mapping-param", pl_color_map_default_params.tone_mapping_param, \
+               TONEMAP_PARAM_TEXT, TONEMAP_PARAM_LONGTEXT, true) \
+-    add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \
+-              TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false) \
+     add_bool("tone-mapping-warn", false, TONEMAP_WARN_TEXT, TONEMAP_WARN_LONGTEXT, false) \
+     set_section("Dithering", NULL) \
+     add_integer("dither-algo", -1, DITHER_TEXT, DITHER_LONGTEXT, false) \
+-- 
+2.22.0
+
index e67436a9379474facc07f050e91f13cf01371ea6..1bba4eafb6f9609360ea76cc83af83eb0953b8ce 100644 (file)
--- a/vlc.spec
+++ b/vlc.spec
@@ -69,7 +69,7 @@ Summary:      VLC - a multimedia player and stream server
 Summary(pl.UTF-8):     VLC - odtwarzacz multimedialny oraz serwer strumieni
 Name:          vlc
 Version:       3.0.8
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         X11/Applications/Multimedia
 Source0:       http://download.videolan.org/pub/videolan/vlc/%{version}/%{name}-%{version}.tar.xz
@@ -80,6 +80,7 @@ Patch2:               %{name}-mpc.patch
 Patch3:                xmas-sucks.patch
 Patch4:                no-cache.patch
 Patch5:                %{name}-fdk_aac.patch
+Patch6:                %{name}-libplacebo-0.18.patch
 URL:           http://www.videolan.org/vlc/
 # 1.0 for X11 or GLESv1, 1.1 for GLESv2
 BuildRequires: EGL-devel >= %{?with_glesv2:1.1}%{!?with_glesv2:1.0}
@@ -365,6 +366,7 @@ Akcje klienta VLC dla Solid.
 %endif
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 %{__libtoolize}
This page took 0.230643 seconds and 4 git commands to generate.