Skip to content
Snippets Groups Projects
  1. Jun 08, 2022
  2. Jun 05, 2022
  3. May 23, 2022
  4. May 20, 2022
    • Niklas Haas's avatar
      shaders/icc: completely refactor · 1956dbb5
      Niklas Haas authored
      Rewrite all of the ICC profile handling code, fundamentally getting rid
      of the 'ICC->ICC transform' design and representing each profile as an
      independent object that can be either decoded or encoded, at separate
      stages in the pipeline.
      
      This is only an initial version, and serves to establish the API. It is
      not yet fully optimized, but optimizations can and will be applied
      transparently underneath the hood of this API (e.g. skipping the full
      3DLUT when not required, implementing support for fixed function
      profiles, natively applying matrix+shaper profiles, etc.)
      
      This design brings with it a number of advantages, most notably allowing
      support for using libplacebo-native tone mapping together with ICC
      profiles, by properly forwarding the actual contrast values detected
      from the profile.
      
      In addition to a redesign of the core logic, also changes things so that
      the ICC.h header is always installed, even if non-functional -
      `pl_icc_open` will simply always return NULL.
      1956dbb5
    • Niklas Haas's avatar
      tone_mapping: use linear stretching for SDR<->SDR · 232fcd94
      Niklas Haas authored
      SDR<->SDR conversions are best done with simple linear light stretching,
      because everything else introduces too many distortions.
      232fcd94
    • Niklas Haas's avatar
      renderer: suppress linear scaling when not desired · 80e917d1
      Niklas Haas authored
      Even if the image has either already been linearized somehow, e.g. if
      the image came in linear light to begin with.
      80e917d1
    • Niklas Haas's avatar
      common: fix include style consistency · 62ee7d4e
      Niklas Haas authored
      Ignoring the ICC profile header for now because it's about to be
      refactored entirely.
      62ee7d4e
    • Niklas Haas's avatar
      colorspace: add more helper functions · 13e6eafb
      Niklas Haas authored
      And also fix the wrong signature of pl_cie_xy_equal. Decided to split
      this off to prevent ballooning the following commit (and its API change
      log entry).
      13e6eafb
  5. May 18, 2022
    • Jan Ekström's avatar
      d3d11/swapchain: make initial color config logging less confusing · 81d5a54e
      Jan Ekström authored
      d3d11_sw_colorspace_hint is utilized both for runtime hints as well
      as the initial swap chain configuration to enable consistency
      between received swap chains and newly created ones.
      
      Thus, add an internal function which contains the argument of whether
      this call was internal or not. In the colorspace hint call, it is
      set to false, and during swap chain initialization it is set to true.
      Thus when hints are passed, logging will talk about received hints
      and when the function is called during initialization, logging will
      talk about initial configuration.
      81d5a54e
  6. May 01, 2022
  7. Apr 25, 2022
  8. Apr 20, 2022
  9. Apr 09, 2022
    • Niklas Haas's avatar
      renderer: allow lazy texture creation on acquire · 22d06a7a
      Niklas Haas authored
      Right now, the code is still written in a way that requires the plane
      textures to already be created even before the image is acquired (due to
      its presence in `pass_init` from `pl_render_image_mix`).
      
      Loosen up some restrictions surrounding this, to allow lazily creating
      the texture *during* acquisition. This matches the usage pattern of most
      hwdecs most naturally.
      22d06a7a
  10. Apr 03, 2022
  11. Mar 31, 2022
  12. Mar 25, 2022
    • Niklas Haas's avatar
      utils/libav: use new acquire/release API · cd696a88
      Niklas Haas authored
      This holds on to the frame for a shorter duration, allowing it to
      interop more easily with e.g. libavcodec filters. Note that this still
      isn't thread safe (cf. pending upstream FFmpeg changes), but a necessary
      step in that direction one way or the other.
      cd696a88
    • Niklas Haas's avatar
      renderer: allow acquiring/releasing frames on-demand · 432ed86a
      Niklas Haas authored
      This is particularly designed for hardware decoding and such, as well as
      interop with e.g. lavfi vulkan. In either case, we don't want to
      permanently consider frames mapped for the entire duration that they may
      stick around in e.g. pl_queue, but rather dynamically acquire/release
      them immediately surrounding the actual usage site.
      
      This implementation is also designed to guarantee that only one frame
      will ever be acquired at a time, which allows us to support some hwdecs
      without requiring multiple mappers.
      
      Fixes videolan/libplacebo#194
      432ed86a
    • Niklas Haas's avatar
      renderer: allow re-using pass_init without image · ce2191db
      Niklas Haas authored
      A bit ugly logic-wise but better for future extensibility, specifically
      because I plan on using `pass_init` to e.g. acquire potentially-unmapped
      frames.
      ce2191db
    • Niklas Haas's avatar
      renderer: change draw_empty_overlays output stage · 1dfb4df1
      Niklas Haas authored
      This is conceptually not really a frame drawing pass, but a blend pass
      (with 0 frames to be blended).
      1dfb4df1
    • Niklas Haas's avatar
      renderer: reorganize pass init code into common helpers · 9e1ff65f
      Niklas Haas authored
      Makes this logic easier to extend in the future, and crucially also
      provides a common place to do uninit code from.
      9e1ff65f
  13. Mar 20, 2022
  14. Mar 18, 2022
  15. Mar 14, 2022
    • Niklas Haas's avatar
      gpu: move shader logging to the gpu.c wrappers · 18f08b3d
      Niklas Haas authored
      I wanted to change the way this is handled such that shaders also get
      printed when being re-loaded from the cache. Rather than re-adding the
      same code to all three GPU instances, I decided it makes more sense to
      just move it to the common helper code.
      
      This does unfortunately re-order most shader debug messages such that
      the errors get printed _above_ the re-print of the source code (on
      errors), but this was the status quo anyways for vulkan. I can live with
      it.
      
      Closes videolan/libplacebo#192
      18f08b3d
  16. Mar 13, 2022
    • Niklas Haas's avatar
      vulkan: refactor queue family APIs · 157e4905
      Niklas Haas authored
      Looking at this API again, it really makes no sense to leave the
      "non-unique" queues unset. Users can trivially recover a check for this
      condition by just doing an equality test on the queues.
      
      Testing for single family vs multi-family can also be done trivially by
      testing for `pl_vulkan.num_queues`.
      
      And lastly, API users (FFmpeg etc.) actually need all queues to be set.
      So pre-setting them to the correctly defaulted values is actually
      hugely useful.
      
      Since we're setting all queues anyway, might as well also set them
      unconditionally in the internal structs. Rewrite the queue family
      selection code to make it cleaner overall.
      157e4905
    • Niklas Haas's avatar
      vulkan/context: properly set pl_vulkan.queue_transfer · 9bdcba19
      Niklas Haas authored
      This wasn't set at all. Oops. Also move the shared code between
      pl_vulkan_create and pl_vulkan_import into a common helper, where it
      should have been all this time.
      
      I have no idea why it wasn't. Somebody shoot the author of this code.
      9bdcba19
    • Niklas Haas's avatar
      vulkan: work around MSAN runtime failures · d5a857d3
      Niklas Haas authored
      I hate MSAN sometimes. This should at least be a permanent solution to
      the issue.
      d5a857d3
  17. Mar 10, 2022
    • Niklas Haas's avatar
      renderer: correctly initialize neutral chroma · 64aa488b
      Niklas Haas authored
      This should not be exactly 0.5, but a value slightly higher than 0.5
      (depending on the image bit depth).
      
      It's possible that we should go with the mpv approach of just setting
      the chroma channels to 0 altogether for grayscale formats. But that
      would require some sort of API change, which I'm unwilling to do as part
      of this commit.
      
      The 0.5 constant for floating point YCbCr is almost surely not actually
      correct, but that preserves the status quo. cf. #155
      
      Fixes https://github.com/mpv-player/mpv/issues/9969
      64aa488b
  18. Mar 08, 2022
    • Niklas Haas's avatar
      ci: enable debug-abort in CI · 5cfa520c
      Niklas Haas authored
      5cfa520c
    • Niklas Haas's avatar
      meson: add debug-abort option · 448165a7
      Niklas Haas authored
      It's sometimes more convenient to get coredumps instead of plain stack
      traces, especially if you didn't have gdb attached to the process at the
      time.
      
      Note that, asymmetrically, we add pl_debug_abort() to the vulkan debug
      callbacks but not the opengl debug callbacks. This is motivated by
      vulkan debug errors mainly corresponding to API usage violations (should
      never happen!), whereas OpenGL debug errors mainly correspond to runtime
      errors (e.g. invalid GLSL files), which should not trigger an abort().
      
      (Note that you can also `(gdb) break pl_log_stack_trace`)
      448165a7
    • Niklas Haas's avatar
      shaders/h274: fix & operator for older GLSL · 4ab85e0f
      Niklas Haas authored
      Older GLSL can't auto-promote 0xFF to 0xFFu. Sigh.
      4ab85e0f
  19. Mar 05, 2022
Loading