Index: branches/2019Q3/multimedia/vlc/files/patch-libplacebo-1.18 =================================================================== --- branches/2019Q3/multimedia/vlc/files/patch-libplacebo-1.18 (revision 506640) +++ branches/2019Q3/multimedia/vlc/files/patch-libplacebo-1.18 (revision 506641) @@ -1,98 +1,101 @@ -https://mailman.videolan.org/pipermail/vlc-devel/2019-May/124293.html +https://code.videolan.org/videolan/vlc/commit/b579384a2396 +https://code.videolan.org/videolan/vlc/commit/29773f496f33 +https://code.videolan.org/videolan/vlc/commit/24dc03640d3c --- modules/video_output/opengl/fragment_shaders.c.orig 2018-12-16 20:40:54 UTC +++ modules/video_output/opengl/fragment_shaders.c @@ -616,7 +616,13 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_ 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; --- modules/video_output/opengl/vout_helper.c.orig 2018-10-10 14:20:20 UTC +++ modules/video_output/opengl/vout_helper.c @@ -628,7 +628,9 @@ opengl_init_program(vout_display_opengl_t *vgl, struct .log_level = PL_LOG_INFO, }); if (tc->pl_ctx) { -# if PL_API_VER >= 6 +# if PL_API_VER >= 20 + tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); +# elif PL_API_VER >= 6 tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); # else tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0); --- modules/video_output/opengl/vout_helper.h.orig 2018-02-19 15:53:40 UTC +++ modules/video_output/opengl/vout_helper.h @@ -151,6 +151,30 @@ static const char * const tone_text[] = { #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." +#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 MAX_BOOST_TEXT "Maximum brightness boost" +#define MAX_BOOST_LONGTEXT "Maximum allowed brightness boost to compensate for dark scenes. A value of 1.0 means no brightness boost is allowed." + +#define PEAK_PERIOD_TEXT "HDR peak detection period" +#define PEAK_PERIOD_LONGTEXT "This option enables peak detection with the specified smoothing period. A value of 0.0 disables peak detection. Higher values result in a larger smoothing period which means the detected values will be stable over a longer number of frames, at the cost of responding more slowly to changes in scene brightness" + +#define SCENE_THRESHOLD_LOW_TEXT "Scene change lower threshold" +#define SCENE_THRESHOLD_LOW_LONGTEXT "When using HDR peak detection, this sets the lower boundary of a brightness change indicating a scene change. Brightness changes between frames that exceed this threshold will begin to be mixed into the detected peak more strongly, bypassing the peak smoothing. Setting this to a negative number disables this logic." + +#define SCENE_THRESHOLD_HIGH_TEXT "Scene change upper threshold" +#define SCENE_THRESHOLD_HIGH_LONGTEXT "This sets the upper boundary of a brightness change indicating a scene change. Brightness changes that exceed this value will instantly replace the detected peak, bypassing all smoothing. Setting this to a negative number disables this logic." + +#define DELAYED_PEAK_TEXT "Allow delaying peak detection by up to one frame" +#define DELAYED_PEAK_LONGTEXT "In some cases, peak detection may be more convenient to compute if the results are delayed by a frame. When this option is disabled, libplacebo will use an indirect buffer simply to force peak detection results to be up-to-date. Enabling it allows skipping this indirection in order to improve performance at the cost of some potentially noticeable brightness flickering immediately after a scene change." + #define DITHER_TEXT "Dithering algorithm" #define DITHER_LONGTEXT "The algorithm to use when dithering to a lower bit depth (degrades performance on some platforms)." -@@ -171,6 +195,21 @@ static const char * const dither_text[] = { +@@ -171,6 +195,22 @@ static const char * const dither_text[] = { #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." + +#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) ++ 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 +223,9 @@ static const char * const dither_text[] = { 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) \ Index: branches/2019Q3 =================================================================== --- branches/2019Q3 (revision 506640) +++ branches/2019Q3 (revision 506641) Property changes on: branches/2019Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r506640