1. 16 Aug, 2022 3 commits
    • Martin Storsjö's avatar
      Fix incompatible pointer/integer conversion errors on 32 bit · 1d3ff4d4
      Martin Storsjö authored and Niklas Haas's avatar Niklas Haas committed
      Clang 15 made "incompatible pointer to integer conversion" an error
      instead of a plain warning. This fixes errors like these:
      
      ../src/vulkan/gpu_pass.c:208:59: error: incompatible integer to pointer conversion passing 'VkPipeline' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
              vk_dev_callback(vk, (vk_cb) destroy_pipeline, vk, *out_pipe);
                                                                ^~~~~~~~~
      ../src/vulkan/command.h:36:52: note: passing argument to parameter 'arg' here
                           const void *priv, const void *arg);
                                                         ^
      ../src/vulkan/gpu_pass.c:209:19: error: incompatible pointer to integer conversion assigning to 'VkPipeline' (aka 'unsigned long long') from 'void *' [-Wint-conversion]
              *out_pipe = NULL;
                        ^ ~~~~
      1d3ff4d4
    • Niklas Haas's avatar
      shaders/icc: rework ICC profile black point handling · 0cf787c4
      Niklas Haas authored
      The current ICC profile handling had a number of limitations:
      1. Parts of the 3DLUT range were wasted in unrepresentable sub-blacks.
      2. V2 profiles with black points not matching the V4 perceptual black
         target completely broke when using perceptual intent, causing
         black distortions.
      3. We (intentionally) did not do any black point compensation.
      4. Our approximation profiles were a poor fit for BT.1886-style
         technical gamma functions.
      
      Improve the status quo by making two important changes:
      1. Tune the approximation profile to use a BT.1886-style technical gamma
         curve tuned to the exact measured black point of the display.
      2. Enable black point compensation
      
      This should allow owners of broken colorimetric V2 profiles to rely on
      perceptual mapping tables with black point compensation instead,
      
      Closes: #210
      See-Also: https://github.com/mpv-player/mpv/issues/10442
      See-Also: https://github.com/mm2/Little-CMS/issues/328
      0cf787c4
    • Niklas Haas's avatar
      shaders/icc: fix absolute colorimetric intent · 5e0456bd
      Niklas Haas authored
      cmsDetectDestinationBlackPoint simply does not work in absolute
      colorimetric intent. Work around by using relative colorimetric.
      
      This is fine because this function only needs to produce approximate
      results, only meant to inform upstream tone-mapping code - we generate
      the 3DLUT with black point compensation either way.
      
      Fixes https://github.com/mpv-player/mpv/issues/10532
      5e0456bd
  2. 12 Aug, 2022 14 commits
  3. 30 Jul, 2022 1 commit
    • Niklas Haas's avatar
      meson: explicitly test for glad2 version · eeab271b
      Niklas Haas authored
      Building fails if the user only has glad1 installed, but not glad2, with
      this error: argument --api: Invalid api-string: "gl:core,gles2,egl"
      
      And if the user has neither glad1 nor glad2, it just fails with the
      unhelpful "module not found". Improve both by explicitly testing for
      this in the build system.
      eeab271b
  4. 29 Jul, 2022 16 commits
  5. 28 Jul, 2022 2 commits
  6. 24 Jul, 2022 4 commits