[vlc-devel] [PATCH] opengl: use the default monitor target if there's none set by the user

Niklas Haas vlc at haasn.xyz
Fri Mar 1 00:56:16 CET 2019


Sorry, missed this email. (Feel free to mention/ping me next time, but
I'll add 'libplacebo' to my list of keywords)

This patch concerns only the opengl vout which still handles all of the
framebuffer etc. by itself - so there's absolutely no way for libplacebo
to query this information.

That being said, I still don't think this patch is a good idea. UNKNOWN
is the "correct" way to signal that you don't know anything about the
target display. The default behavior in this case (inside libplacebo) is
to avoid "small" color space conversions (standard gamut <-> standard
gamut), and avoid SDR<->SDR gamma mapping for typical curves (~gamma 2).

I find that this helps reduce user confusion; and in cases like these,
the practical gains of forcing such a conversion are nebulous at best.
After all, if we don't know anything about the target display, we can't
claim the shifted version is better than the original. Our uncertainty
is higher than the difference. Most likely it will just result in bug
reports ("picture slightly brighter when using opengl" or "red tones
slightly off from <insert other media player>").

Also, if we want to change this default behavior (assuming we have a
good reason for doing so), we can change it inside libplacebo, rather
than making up information here.

On Thu, 7 Feb 2019 08:52:00 +0100, Steve Lhomme <robux4 at ycbcr.xyz> wrote:
> ping ?
> 
> I don't know if it's better to tell that we intend to display on a 
> regular screen (8 bits, SDR, sRGB) or let libplacebo figure out by 
> itself (if it can query the output or even select the better one).
> 
> On 29/01/2019 10:26, Steve Lhomme wrote:
> > ---
> >   modules/video_output/opengl/fragment_shaders.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
> > index f58b4467b6..f91738c70b 100644
> > --- a/modules/video_output/opengl/fragment_shaders.c
> > +++ b/modules/video_output/opengl/fragment_shaders.c
> > @@ -564,6 +564,8 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target,
> >           struct pl_color_space dst_space = pl_color_space_unknown;
> >           dst_space.primaries = var_InheritInteger(tc->gl, "target-prim");
> >           dst_space.transfer = var_InheritInteger(tc->gl, "target-trc");
> > +        if (dst_space.primaries == PL_COLOR_PRIM_UNKNOWN && dst_space.transfer == PL_COLOR_TRC_UNKNOWN)
> > +            dst_space = pl_color_space_monitor;
> >   
> >           pl_shader_color_map(sh, &color_params,
> >                   vlc_placebo_ColorSpace(&tc->fmt),
> > -- 
> > 2.17.1
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list