efbe35ad89
Needed to patch vlc-3.0.8 to build with new libplaceabo API (changes taken from upstream code).
74 lines
4.2 KiB
Diff
74 lines
4.2 KiB
Diff
--- modules/video_output/opengl/vout_helper.c.orig 2019-10-26 20:43:34.539073815 -0400
|
|
+++ modules/video_output/opengl/vout_helper.c 2019-10-26 20:44:35.160773193 -0400
|
|
@@ -628,8 +628,8 @@
|
|
.log_level = PL_LOG_INFO,
|
|
});
|
|
if (tc->pl_ctx) {
|
|
-# if PL_API_VER >= 6
|
|
- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0);
|
|
+# if PL_API_VER >= 20
|
|
+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL);
|
|
# else
|
|
tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0);
|
|
# endif
|
|
--- modules/video_output/opengl/fragment_shaders.c.orig 2019-10-26 20:46:43.382252481 -0400
|
|
+++ modules/video_output/opengl/fragment_shaders.c 2019-10-26 20:51:40.295679834 -0400
|
|
@@ -616,7 +616,13 @@
|
|
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.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");
|
|
+# 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;
|
|
--- modules/video_output/opengl/vout_helper.h.orig 2019-10-26 21:13:30.126142457 -0400
|
|
+++ modules/video_output/opengl/vout_helper.h 2019-10-26 21:11:44.991922998 -0400
|
|
@@ -171,6 +171,30 @@
|
|
#define DEPTH_TEXT "Dither depth override (0 = framebuffer depth)"
|
|
#define DEPTH_LONGTEXT "Overrides the detected framebuffer depth. Useful to dither to lower bit depths than otherwise required."
|
|
|
|
+#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)."
|
|
+
|
|
+#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("Colorspace conversion", NULL) \
|
|
add_integer("rendering-intent", pl_color_map_default_params.intent, \
|
|
@@ -184,10 +208,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) \
|