1. 03 Nov, 2017 4 commits
    • Niklas Haas's avatar
      video_output: opengl: add BT.2020 decoding matrices · a4ef9238
      Niklas Haas authored and Thomas Guillem's avatar Thomas Guillem committed
      
      
      Generated the matrices using the following small program:
      
          #include <stdio.h>
          #include <libplacebo/colorspace.h>
      
          void main()
          {
              struct pl_color_repr repr = {
                  .sys    = PL_COLOR_SYSTEM_BT_2020_NC,
                  .levels = PL_COLOR_LEVELS_TV,
              };
      
              struct pl_transform3x3 tf = pl_color_repr_decode(&repr, NULL);
              for (int i = 0; i < 3; i++) {
                  printf("% .15f, % .15f, % .15f, % .15f ,\n",
                        tf.mat.m[i][0], tf.mat.m[i][1], tf.mat.m[i][2], tf.c[i]);
              }
          }
      
      I've also verified that the BT.709 and BT.601 matrices are identical
      within an error margin of several orders of magnitude. (Probably due to
      floating point inaccuracy)
      
      P.s. VLC doesn't seem to distinguish between BT.2020-NC and BT.2020-CL,
      which I believe is a bug. But anyway, we can only easily handle
      BT.2020-NC anyway, so hard-code it as that. (BT.2020-CL support would
      require some more libplacebo integration)
      Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
      a4ef9238
    • Niklas Haas's avatar
      video_output: opengl: add basic support for libplacebo · 77d8be7e
      Niklas Haas authored and Thomas Guillem's avatar Thomas Guillem committed
      
      
      This adds support for conversion between color spaces, in particular HDR
      tone mapping and wide gamut -> standard gamut conversion.
      
      Things that this commit does not (yet) address:
      
      - It does not use libplacebo's scaling features. This is blocked by the
        fact that libplacebo does not currently support OpenGL (only Vulkan).
      
      - It does not add support for BT.2020 YCbCr. This would be easy to
        implement in much the same way as the tone mapping support, by using
        pl_shader_decode_color, replacing the hard-coded matrices. This would
        also allow adding support for hue, saturation etc. controls.
      
      - It does not hook up the pl_color_map_params options to the VLC GUI.
        This would have to be done to let users influence the subjective
        configuration options, as well as specify their display device's
        configuration.
      
      All of the new code is optional, due to the lack of rigorous testing of
      libplacebo (especially on other platforms) and the short timeframe
      between this commit and the VLC 3.0 release. This may be changed later
      on (possibly for VLC 4.0).
      Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
      77d8be7e
    • Niklas Haas's avatar
      video_output: opengl: add more glUniform* vtable entries · f023eb4b
      Niklas Haas authored and Thomas Guillem's avatar Thomas Guillem committed
      
      
      These are needed to support some of the missing matrix types that
      libplacebo uses.
      Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
      f023eb4b
    • Marvin Scholz's avatar
      contrib: add libplacebo · 6f93ef36
      Marvin Scholz authored and Thomas Guillem's avatar Thomas Guillem committed
      
      
      Use a pinned git commit and build statically due to libplacebo's
      unstable alpha API. The chosen hash corresponds to the tag v0.1.0.
      Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
      6f93ef36
  2. 02 Nov, 2017 4 commits
  3. 01 Nov, 2017 2 commits
  4. 31 Oct, 2017 12 commits
  5. 30 Oct, 2017 18 commits