[vlc-commits] [Git][videolan/vlc][master] 10 commits: libplacebo: add new color primaries enum members

Alexandre Janniaux gitlab at videolan.org
Fri Jun 4 13:40:07 UTC 2021



Alexandre Janniaux pushed to branch master at VideoLAN / VLC


Commits:
ccad653c by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: add new color primaries enum members

Not really that important or useful, but they're supported upstream so
there's also no real reason not to expose them.

- - - - -
ca206a51 by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: add support for BT.2390 EETF

This has already been the default in most libplacebo versions, in that
`pl_color_map_default_params.tone_mapping_algo` was equal to this value.
Despite this, it was never exposed in the UI, meaning users could not
actually manually select it.

Update the string to make it clear that this is the intended/recommended
default.

- - - - -
31351641 by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: add colorimetric gamut clipping option

New upstream feature. Simply needs to be exposed in the UI.

- - - - -
231ea4de by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: remove unneeded counter field

This field was left-over from an early API design, and never used for
anything in libplacebo. Recent versions have since deprecated it.

- - - - -
fe6ec4ce by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: rewrite picture placement logic

Recent versions of libplacebo use `pl_frame.crop` instead of
`pl_render_target.dst_rect`, for which the latter is now merely a
fallback.

Unfortunately, `pl_render_target_from_swapchain` ends up setting the
former field to values based on the swapchain dimensions, so the values
we set in `dst_rect` accidentally ended up ignored. In retrospect, this
was caused by the upstream decision to make the new field override the
old field if both are present, and having that logic the other way
around would also have avoided this bug. Bite the bullet and make it
conditional on the PL_API_VER.

All that said - merely fixing this bug, however, exposed serious
shortcomings in the video placement logic, in particular the lack of
proper flipping support for OpenGL. Fix it by rewriting the video
placement logic completely, based on the observation that
`vout_display_PlacePicture` is a relatively cheap function to call.
There's no need to awkwardly cache it inside `sys`.

- - - - -
e4a584e3 by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: fix use-after-free on uninit

`pl->ops->close` destroys the GPU instance, after which the swapchain is
undefined. Fix it by moving the swapchain destruction to `ops->close`
itself, where it can be done in the correct order.

(This also fixes a bug where, technically, the opengl instance attempted
destroying the swapchain while the context was not current on the
thread)

- - - - -
fb4e794c by Niklas Haas at 2021-06-04T10:37:08+00:00
opengl: drop redundant code path

This is redundant with the minimum version requirement being 1.7.

I sure can't wait until the next bump up to 1.29.0. All these ifdefs
keep reminding me of my failure to design a good API on my first try.

- - - - -
71a72062 by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: remove trailing \

Cosmetic. Side note: I really, *really* hope this commit title breaks
something, somewhere.

- - - - -
7de45dac by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: add support for custom LUTs

Unfortunately the UI for loading these is a bit clunky as they're hidden
behind so many layers of menu and advanced options, plus the fact that
the new LUTs still only get applied on vout reinit.

But it's still a feature that a lot of users have requested heavily, so
supporting them at all is a good thing. The implementation is rather
straightforward even though the amount of #ifdef's are really getting on
my nerves.

Can somebody just time travel me into a future universe in which I can
make libplacebo v4 the minimum dependency?

- - - - -
db6f8b7c by Niklas Haas at 2021-06-04T10:37:08+00:00
libplacebo: add support for custom shaders

It's finally time to use RAVU/FSRCNN(X)/NNEDI3/Anime4K in VLC.

Currently limited to only one shader, which isn't a huge limitation
seeing as you can just `cat` together as many shaders as you want to use
into one big file. But patches welcome(tm).

- - - - -


6 changed files:

- modules/video_output/libplacebo/display.c
- modules/video_output/libplacebo/instance.c
- modules/video_output/libplacebo/instance_opengl.c
- modules/video_output/libplacebo/instance_vulkan.c
- modules/video_output/libplacebo/utils.h
- modules/video_output/opengl/sampler.c


Changes:

=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -30,6 +30,7 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
+#include <vlc_fs.h>
 
 #include "utils.h"
 #include "instance.h"
@@ -38,6 +39,10 @@
 #include <libplacebo/utils/upload.h>
 #include <libplacebo/swapchain.h>
 
+#if PL_API_VER >= 113
+# include <libplacebo/shaders/lut.h>
+#endif
+
 struct vout_display_sys_t
 {
     vlc_placebo_t *pl;
@@ -49,10 +54,6 @@ struct vout_display_sys_t
     const struct pl_tex **overlay_tex;
     int num_overlays;
 
-    // Dynamic during rendering
-    vout_display_place_t place;
-    uint64_t counter;
-
     // Storage for rendering parameters
     struct pl_filter_config upscaler;
     struct pl_filter_config downscaler;
@@ -67,6 +68,17 @@ struct vout_display_sys_t
 #endif
     enum pl_chroma_location yuv_chroma_loc;
     int dither_depth;
+
+#if PL_API_VER >= 113
+    struct pl_custom_lut *lut;
+    char *lut_path;
+    int lut_mode;
+#endif
+
+#if PL_API_VER >= 58
+    const struct pl_hook *hook;
+    char *hook_path;
+#endif
 };
 
 // Display callbacks
@@ -179,6 +191,16 @@ static void Close(vout_display_t *vd)
         free(sys->overlay_tex);
     }
 
+#if PL_API_VER >= 113
+    pl_lut_free(&sys->lut);
+    free(sys->lut_path);
+#endif
+
+#if PL_API_VER >= 58
+    pl_mpv_user_shader_destroy(&sys->hook);
+    free(sys->hook_path);
+#endif
+
     vlc_placebo_Release(sys->pl);
 }
 
@@ -200,7 +222,6 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
     }
 
     struct pl_image img = {
-        .signature  = sys->counter++,
         .num_planes = pic->i_planes,
         .width      = pic->format.i_visible_width,
         .height     = pic->format.i_visible_height,
@@ -237,10 +258,36 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
 
     struct pl_render_target target;
     pl_render_target_from_swapchain(&target, &frame);
-    target.dst_rect.x0 = sys->place.x;
-    target.dst_rect.y0 = sys->place.y;
-    target.dst_rect.x1 = sys->place.x + sys->place.width;
-    target.dst_rect.y1 = sys->place.y + sys->place.height;
+
+    // Set the target crop dynamically based on the swapchain flip state
+    vout_display_place_t place;
+    vout_display_cfg_t cfg = *vd->cfg;
+    cfg.display.width = frame.fbo->params.w;
+    cfg.display.height = frame.fbo->params.h;
+    if (frame.flipped) {
+        switch (cfg.align.vertical) {
+        case VLC_VIDEO_ALIGN_TOP: cfg.align.vertical = VLC_VIDEO_ALIGN_BOTTOM; break;
+        case VLC_VIDEO_ALIGN_BOTTOM: cfg.align.vertical = VLC_VIDEO_ALIGN_TOP; break;
+        default: break;
+        }
+    }
+    vout_display_PlacePicture(&place, vd->fmt, &cfg);
+    if (frame.flipped) {
+        place.y = frame.fbo->params.h - place.y;
+        place.height = -place.height;
+    }
+
+#if PL_API_VER >= 101
+    target.crop = (struct pl_rect2df) {
+        place.x, place.y, place.x + place.width, place.y + place.height,
+    };
+#else
+    // Avoid using struct initializer for backwards compatibility
+    target.dst_rect.x0 = place.x;
+    target.dst_rect.y0 = place.y;
+    target.dst_rect.x1 = place.x + place.width;
+    target.dst_rect.y1 = place.y + place.height;
+#endif
 
     // Override the target colorimetry only if the user requests it
     if (sys->target.primaries)
@@ -289,23 +336,19 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
                 assert(!"Failed processing the subpicture_t into pl_plane_data!?");
 
             struct pl_overlay *overlay = &sys->overlays[i];
+            int ysign = frame.flipped ? (-1) : 1;
             *overlay = (struct pl_overlay) {
                 .rect = {
-                    .x0 = target.dst_rect.x0 + r->i_x,
-                    .y0 = target.dst_rect.y0 + r->i_y,
-                    .x1 = target.dst_rect.x0 + r->i_x + r->fmt.i_visible_width,
-                    .y1 = target.dst_rect.y0 + r->i_y + r->fmt.i_visible_height,
+                    .x0 = place.x + r->i_x,
+                    .y0 = place.y + r->i_y * ysign,
+                    .x1 = place.x + r->i_x + r->fmt.i_visible_width,
+                    .y1 = place.y + (r->i_y + r->fmt.i_visible_height) * ysign,
                 },
                 .mode = PL_OVERLAY_NORMAL,
                 .color = vlc_placebo_ColorSpace(&r->fmt),
                 .repr  = vlc_placebo_ColorRepr(&r->fmt),
             };
 
-            if (frame.flipped) {
-                overlay->rect.y0 = frame.fbo->params.h - overlay->rect.y0;
-                overlay->rect.y1 = frame.fbo->params.h - overlay->rect.y1;
-            }
-
             if (!pl_upload_plane(gpu, &overlay->plane, &sys->overlay_tex[i], &subdata)) {
                 msg_Err(vd, "Failed uploading subpicture region!");
                 num_regions = i; // stop here
@@ -320,11 +363,26 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
 
     // If we don't cover the entire output, clear it first
     struct pl_rect2d full = {0, 0, frame.fbo->params.w, frame.fbo->params.h };
-    if (!pl_rect2d_eq(target.dst_rect, full)) {
+    struct pl_rect2d norm = {place.x, place.y, place.x + place.width, place.y + place.height };
+    pl_rect2d_normalize(&norm);
+    if (!pl_rect2d_eq(norm, full)) {
         // TODO: make background color configurable?
         pl_tex_clear(gpu, frame.fbo, (float[4]){ 0.0, 0.0, 0.0, 0.0 });
     }
 
+#if PL_API_VER >= 113
+    switch (sys->lut_mode) {
+    case LUT_DECODING:
+        img.lut_type = PL_LUT_CONVERSION;
+        img.lut = sys->lut;
+        break;
+    case LUT_ENCODING:
+        target.lut_type = PL_LUT_CONVERSION;
+        target.lut = sys->lut;
+        break;
+    }
+#endif
+
     // Dispatch the actual image rendering with the pre-configured parameters
     if (!pl_render_image(sys->renderer, &img, &target, &sys->params)) {
         msg_Err(vd, "Failed rendering frame!");
@@ -364,8 +422,6 @@ static int Control(vout_display_t *vd, int query)
     case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
     case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
     case VOUT_DISPLAY_CHANGE_ZOOM: {
-        vout_display_PlacePicture(&sys->place, vd->fmt, vd->cfg);
-
         /* The following resize should be automatic on most platforms but can
          * trigger bugs on some platform with some drivers, that have been seen
          * on Windows in particular. Doing it right now enforces the correct
@@ -403,6 +459,104 @@ static int Control(vout_display_t *vd, int query)
     return VLC_EGENERIC;
 }
 
+#if PL_API_VER >= 113
+static void LoadCustomLUT(vout_display_sys_t *sys, const char *filepath)
+{
+    if (!filepath || !*filepath) {
+        pl_lut_free(&sys->lut);
+        return;
+    }
+
+    if (sys->lut_path && strcmp(filepath, sys->lut_path) == 0)
+        return; // same LUT
+
+    char *lut_file = NULL;
+    FILE *fs = NULL;
+
+    free(sys->lut_path);
+    sys->lut_path = strdup(filepath);
+
+    fs = vlc_fopen(filepath, "rb");
+    if (!fs)
+        goto error;
+    int ret = fseek(fs, 0, SEEK_END);
+    if (ret == -1)
+        goto error;
+    long length = ftell(fs);
+    if (length < 0)
+        goto error;
+    rewind(fs);
+
+    lut_file = vlc_alloc(length, sizeof(*lut_file));
+    if (!lut_file)
+        goto error;
+    ret = fread(lut_file, length, 1, fs);
+    if (ret != 1)
+        goto error;
+    sys->lut = pl_lut_parse_cube(sys->pl->ctx, lut_file, length);
+    if (!sys->lut)
+        goto error;
+
+    fclose(fs);
+    free(lut_file);
+    return;
+
+error:
+    free(lut_file);
+    if (fs)
+        fclose(fs);
+    return;
+}
+#endif
+
+#if PL_API_VER >= 58
+static void LoadUserShader(vout_display_sys_t *sys, const char *filepath)
+{
+    if (!filepath || !*filepath) {
+        pl_mpv_user_shader_destroy(&sys->hook);
+        return;
+    }
+
+    if (sys->hook_path && strcmp(filepath, sys->hook_path) == 0)
+        return; // same shader
+
+    char *shader_str = NULL;
+    FILE *fs = NULL;
+
+    free(sys->hook_path);
+    sys->hook_path = strdup(filepath);
+
+    fs = vlc_fopen(filepath, "rb");
+    int ret = fseek(fs, 0, SEEK_END);
+    if (ret == -1)
+        goto error;
+    long length = ftell(fs);
+    if (length < 0)
+        goto error;
+    rewind(fs);
+
+    shader_str = vlc_alloc(length, sizeof(*shader_str));
+    if (!shader_str)
+        goto error;
+    ret = fread(shader_str, length, 1, fs);
+    if (ret != 1)
+        goto error;
+    sys->hook = pl_mpv_user_shader_parse(sys->pl->gpu, shader_str, length);
+    if (!sys->hook)
+        goto error;
+
+    fclose(fs);
+    free(shader_str);
+    return;
+
+error:
+    free(shader_str);
+    if (fs)
+        fclose(fs);
+    return;
+}
+#endif
+
 // Options
 
 #define PROVIDER_TEXT N_("GPU instance provider")
@@ -418,6 +572,11 @@ vlc_module_begin ()
     add_shortcut ("libplacebo", "pl")
     add_module ("pl-gpu", "libplacebo gpu", NULL, PROVIDER_TEXT, PROVIDER_LONGTEXT)
 
+#if PL_API_VER >= 58
+    set_section("Custom shaders", NULL)
+    add_loadfile("pl-user-shader", NULL, USER_SHADER_FILE_TEXT, USER_SHADER_FILE_LONGTEXT)
+#endif
+
     set_section("Scaling", NULL)
     add_integer("pl-upscaler-preset", SCALE_BUILTIN,
             UPSCALER_PRESET_TEXT, SCALER_PRESET_LONGTEXT, false)
@@ -451,13 +610,18 @@ vlc_module_begin ()
     add_integer("pl-intent", pl_color_map_default_params.intent,
             RENDER_INTENT_TEXT, RENDER_INTENT_LONGTEXT, false)
             change_integer_list(intent_values, intent_text)
-    add_integer("pl-target-prim", PL_COLOR_PRIM_UNKNOWN, PRIM_TEXT, PRIM_LONGTEXT, false) \
-            change_integer_list(prim_values, prim_text) \
-    add_integer("pl-target-trc", PL_COLOR_TRC_UNKNOWN, TRC_TEXT, TRC_LONGTEXT, false) \
-            change_integer_list(trc_values, trc_text) \
+    add_integer("pl-target-prim", PL_COLOR_PRIM_UNKNOWN, PRIM_TEXT, PRIM_LONGTEXT, false)
+            change_integer_list(prim_values, prim_text)
+    add_integer("pl-target-trc", PL_COLOR_TRC_UNKNOWN, TRC_TEXT, TRC_LONGTEXT, false)
+            change_integer_list(trc_values, trc_text)
+
+#if PL_API_VER >= 113
+    add_loadfile("pl-lut-file", NULL, LUT_FILE_TEXT, LUT_FILE_LONGTEXT)
+    add_integer("pl-lut-mode", LUT_DISABLED, LUT_MODE_TEXT, LUT_MODE_LONGTEXT, false)
+            change_integer_list(lut_mode_values, lut_mode_text)
+#endif
 
-    // TODO: support for ICC profiles / 3DLUTs.. we will need some way of loading
-    // this from the operating system / user
+    // TODO: support for ICC profiles
 
     set_section("Tone mapping", NULL)
     add_integer("pl-tone-mapping", pl_color_map_default_params.tone_mapping_algo,
@@ -477,6 +641,9 @@ vlc_module_begin ()
 #else
     add_float("pl-tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate,
             TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false)
+#endif
+#if PL_API_VER >= 80
+    add_bool("pl-gamut-clipping", false, GAMUT_CLIPPING_TEXT, GAMUT_CLIPPING_LONGTEXT, true)
 #endif
     add_bool("pl-gamut-warning", false, GAMUT_WARN_TEXT, GAMUT_WARN_LONGTEXT, true)
 
@@ -586,6 +753,9 @@ static void UpdateParams(vout_display_t *vd)
     sys->color_map.max_boost = var_InheritFloat(vd, "pl-max-boost");
 #else
     sys->color_map.tone_mapping_desaturate = var_InheritFloat(vd, "pl-tone-mapping-desat");
+#endif
+#if PL_API_VER >= 80
+    sys->color_map.gamut_clipping = var_InheritBool(vd, "pl-gamut-clipping");
 #endif
     sys->color_map.gamut_warning = var_InheritBool(vd, "pl-gamut-warning");
 #if PL_API_VER < 12
@@ -667,4 +837,34 @@ static void UpdateParams(vout_display_t *vd)
         .transfer = var_InheritInteger(vd, "pl-target-trc"),
         .sig_avg = var_InheritFloat(vd, "pl-target-avg"),
     };
+
+#if PL_API_VER >= 113
+    sys->lut_mode = var_InheritInteger(vd, "pl-lut-mode");
+    char *lut_file = var_InheritString(vd, "pl-lut-file");
+    LoadCustomLUT(sys, lut_file);
+    free(lut_file);
+    if (sys->lut) {
+        sys->params.lut = sys->lut;
+        switch (sys->lut_mode) {
+        case LUT_NATIVE:     sys->params.lut_type = PL_LUT_NATIVE; break;
+        case LUT_LINEAR:     sys->params.lut_type = PL_LUT_NORMALIZED; break;
+        case LUT_CONVERSION: sys->params.lut_type = PL_LUT_CONVERSION; break;
+        default:
+            sys->params.lut = NULL; // the others need to be applied elsewhere
+            break;
+        }
+    }
+#endif
+
+#if PL_API_VER >= 58
+    char *shader_file = var_InheritString(vd, "pl-user-shader");
+    LoadUserShader(sys, shader_file);
+    free(shader_file);
+    if (sys->hook) {
+        sys->params.hooks = &sys->hook;
+        sys->params.num_hooks = 1;
+    } else {
+        sys->params.num_hooks = 0;
+    }
+#endif
 }


=====================================
modules/video_output/libplacebo/instance.c
=====================================
@@ -74,7 +74,6 @@ void vlc_placebo_Release(vlc_placebo_t *pl)
     if (pl->ops)
         pl->ops->close(pl);
 
-    pl_swapchain_destroy(&pl->swapchain);
     pl_context_destroy(&pl->ctx);
 
     /* TODO: use vlc_objres_clear */


=====================================
modules/video_output/libplacebo/instance_opengl.c
=====================================
@@ -149,6 +149,7 @@ static void CloseInstance(vlc_placebo_t *pl)
 
     if (sys->gl != NULL) {
         if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS) {
+            pl_swapchain_destroy(&pl->swapchain);
             pl_opengl_destroy(&sys->opengl);
             vlc_gl_ReleaseCurrent(sys->gl);
         }


=====================================
modules/video_output/libplacebo/instance_vulkan.c
=====================================
@@ -113,6 +113,7 @@ static void CloseInstance(vlc_placebo_t *pl)
 {
     vlc_placebo_system_t *sys = pl->sys;
 
+    pl_swapchain_destroy(&pl->swapchain);
     pl_vulkan_destroy(&sys->vulkan);
     pl_vk_inst_destroy(&sys->instance);
 


=====================================
modules/video_output/libplacebo/utils.h
=====================================
@@ -83,6 +83,10 @@ static const int prim_values[] = {
     PL_COLOR_PRIM_V_GAMUT,
     PL_COLOR_PRIM_S_GAMUT,
     PL_COLOR_PRIM_DISPLAY_P3,
+#if PL_API_VER >= 95
+    PL_COLOR_PRIM_EBU_3213,
+    PL_COLOR_PRIM_FILM_C,
+#endif
 };
 
 static const char * const prim_text[] = {
@@ -100,6 +104,10 @@ static const char * const prim_text[] = {
     "Panasonic V-Gamut (VARICAM)",
     "Sony S-Gamut",
     "Display-P3 (Digital Cinema with D65)",
+#if PL_API_VER >= 95
+    "EBU Tech. 3213-E / JEDEC P22 phosphors",
+    "Traditional film primaries with Illuminant C",
+#endif
 };
 
 #define TRC_TEXT "Display gamma / transfer function"
@@ -137,11 +145,49 @@ static const char * const trc_text[] = {
     "Sony S-Log2",
 };
 
+#define LUT_FILE_TEXT "Custom LUT file (.cube)"
+#define LUT_FILE_LONGTEXT "Path to a file containing an Adobe .cube style LUT to apply during rendering."
+
+enum {
+    LUT_DISABLED,
+    LUT_NATIVE,
+    LUT_LINEAR,
+    LUT_CONVERSION,
+    LUT_DECODING,
+    LUT_ENCODING,
+};
+
+static const int lut_mode_values[] = {
+    LUT_DISABLED,
+    LUT_NATIVE,
+    LUT_LINEAR,
+    LUT_CONVERSION,
+    LUT_DECODING,
+    LUT_ENCODING,
+};
+
+static const char * const lut_mode_text[] = {
+    "None / Disabled",
+    "Postprocessing (RGB->RGB)",
+    "Postprocessing, linear light (RGB->RGB)",
+    "Gamut mapping / tone mapping (RGB->RGB)",
+    "Input decoding (e.g. custom YUV->RGB)",
+    "Output encoding (e.g. custom RGB->YUV)",
+};
+
+#define LUT_MODE_TEXT "Custom LUT type"
+#define LUT_MODE_LONGTEXT "The type of operation this LUT should be used for."
+
+#define USER_SHADER_FILE_TEXT "Custom shader"
+#define USER_SHADER_FILE_LONGTEXT "Path to a file containing a custom user shader, in mpv .hook format."
 
 #define TONEMAPPING_TEXT "Tone-mapping algorithm"
 #define TONEMAPPING_LONGTEXT "Algorithm to use when converting from wide gamut to standard gamut, or from HDR to SDR."
 
 static const int tone_values[] = {
+#if PL_API_VER >= 68
+    PL_TONE_MAPPING_BT_2390,
+#endif
     PL_TONE_MAPPING_HABLE,
     PL_TONE_MAPPING_MOBIUS,
     PL_TONE_MAPPING_REINHARD,
@@ -151,7 +197,10 @@ static const int tone_values[] = {
 };
 
 static const char * const tone_text[] = {
-    "Hable (filmic mapping, recommended)",
+#if PL_API_VER >= 68
+    "ITU-R BT.2390 EETF (recommended)",
+#endif
+    "Hable (filmic mapping)",
     "Mobius (linear + knee)",
     "Reinhard (simple non-linear)",
     "Gamma-Power law",
@@ -177,6 +226,9 @@ static const char * const tone_text[] = {
 #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 GAMUT_CLIPPING_TEXT "Colorimetric gamut clipping"
+#define GAMUT_CLIPPING_LONGTEXT "Colorimetrically clip out-of-gamut colors by desaturating them until they hit the boundary of the permissible color volume."
+
 #define GAMUT_WARN_TEXT "Highlight clipped pixels"
 #define GAMUT_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process."
 


=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -1153,10 +1153,8 @@ CreateSampler(struct vlc_gl_interop *interop, struct vlc_gl_t *gl,
 #       endif
             },
         });
-#   elif PL_API_VER >= 6
-        priv->pl_sh = pl_shader_alloc(priv->pl_ctx, NULL, 0);
 #   else
-        priv->pl_sh = pl_shader_alloc(priv->pl_ctx, NULL, 0, 0);
+        priv->pl_sh = pl_shader_alloc(priv->pl_ctx, NULL, 0);
 #   endif
     }
 #endif



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/851d7f33234385a6879cb5d45b6c57d6a34a0cda...db6f8b7cb08e53f332dd3346e581ce9bb3b1e471

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/851d7f33234385a6879cb5d45b6c57d6a34a0cda...db6f8b7cb08e53f332dd3346e581ce9bb3b1e471
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list