Skip to content
Snippets Groups Projects
  1. May 18, 2021
  2. May 17, 2021
    • Niklas Haas's avatar
      demos: avoid depending directly on vulkan · bc9dab5e
      Niklas Haas authored
      GLFW and SDL both provide their own platform-specific vulkan function
      loading mechanisms. We should use these, instead of requiring the user
      to have a linkable libvulkan at compile time.
      bc9dab5e
    • Niklas Haas's avatar
      tests: test handles properly · c9c67e30
      Niklas Haas authored
      Right now the tests all hard code checks for PL_HANDLE_FD. This breaks
      on windows for obvious reasons, as well as technically with host
      pointers. (Although we don't allow host pointer export anyway)
      c9c67e30
  3. May 13, 2021
    • Niklas Haas's avatar
      vulkan: opengl: measure and report compilation times · 5a6fabee
      Niklas Haas authored
      To help figure out the source of slow shader compilations.
      5a6fabee
    • Niklas Haas's avatar
      shaders/sampling: fix textureGather coordinates · 8ac12c8d
      Niklas Haas authored
      Sampling from the base is wrong, because textureGather returns the four
      texels surrounding the sampled position. What we actually want to do is
      sample the center of the four texels we're interested in.
      
      Note: While we could technically use `pos` here instead of calculating
      the position dynamically, doing so seems to result in 1 pixel black
      seams when combining it with some sampler modes, probably because of the
      near-undefined behavior on the exact edge between pixels.
      
      Maybe we could enable this conditionally only if we know the sampler is
      set to nearest mode. But for now, just play it safe.
      
      No change in performance. (Thankfully)
      8ac12c8d
    • Niklas Haas's avatar
      utils/frame_queue: add some extra PL_ERR printouts · 5827e572
      Niklas Haas authored
      I should probably just make the log injectors public and let the avframe
      helpers use them as well. But it's probably too late for that seeing as
      the API has settled.
      5827e572
    • Niklas Haas's avatar
      demos/plplay: mark get_buffer2 as thread-safe · 6c951e10
      Niklas Haas authored
      Annoyingly, this triggers a deprecation warning, which we can't really
      get around because the commit that added the deprecation didn't also
      change the default behavior.
      6c951e10
  4. May 12, 2021
    • Niklas Haas's avatar
      demos/colors: time colors to system clock · ce11eb7f
      Niklas Haas authored
      Rather than the rendering framerate. Otherwise it behaves quite funnily
      when e.g. resizing the window or stuff like that.
      ce11eb7f
    • Niklas Haas's avatar
      utils/frame_queue: fix possible thread race assertion · a334f987
      Niklas Haas authored
      This is especially easy to trigger if the playback loop gets very stuck
      (e.g. moving to a different workspace, on wayland).
      
      Basically the issue is that `get_frame` releases `&p->lock_weak`, which
      allows other threads to start pushing frames. So while `get_frame` does
      ostensibly do what it claims to do on the surface (gets a frame), it
      does not necessarily get exactly *one* frame, but could get 2 or 3 (or
      any number).
      
      Despite this, the logic in `advance()` was written as though `get_frame`
      still got exactly one frame. Simple solution is to just change the `if`
      to a `while`. Shouldn't be terribly inefficient because in practice it's
      very unlikely that this will get more than 1 or 2 frames extra.
      a334f987
    • Niklas Haas's avatar
      demos/plplay: implement support for background transparency · fb6b5f10
      Niklas Haas authored
      Auto-set this if we detect that the file has an alpha channel.
      Annoyingly, this false positives a lot for poorly optimized PNG files
      that are encoded in RGBA format despite not containing any transparency.
      fb6b5f10
    • Niklas Haas's avatar
      renderer: implement support for transparent backgrounds · 1587321e
      Niklas Haas authored
      Otherwise, the black bars can contrast annoyingly with an otherwise
      transparent media background. Inverted from the usual alpha channel
      semantics to make the default value of 0.0 less surprising. (It's also a
      rather unusual use case, I think)
      1587321e
    • Niklas Haas's avatar
      shaders/sampling: correctly clear alpha channel · 0e9cd7d0
      Niklas Haas authored
      As per the GLSL specification, sampling from a texture with an absent
      alpha channel returns an alpha value of 1.0, not 0.0. We should make our
      custom samplers mirror this logic, otherwise alpha channels end up
      broken when using non-trivial scalers.
      
      Fixes #150 (comment 263939)
      0e9cd7d0
    • Niklas Haas's avatar
      renderer: delete weird left-over line · ac4b1a55
      Niklas Haas authored
      No idea what this was doing here.
      ac4b1a55
  5. May 11, 2021
  6. May 10, 2021
  7. May 08, 2021
  8. May 07, 2021
  9. May 06, 2021
    • Niklas Haas's avatar
      filters: re-add pl_filter_haasnsoft · 5a31ece1
      Niklas Haas authored
      Removing this without a deprecation was a gigantic no-no. I don't know
      _what_ I was thinking. I completely forgot people actually depend on
      this API (VLC, in particular).
      5a31ece1
  10. May 05, 2021
    • Niklas Haas's avatar
      renderer: change semantics for pl_image_mix.num_frames == 1 · f75684e5
      Niklas Haas authored
      The current semantics are a bit potentially useless in edge cases
      involving only a single frame with PTS far outside the vsync range,
      which unfortunately vo_placebo likes to trigger.
      
      In a perfect world I would probably prefer to redesign this entire
      abstraction with hindsight, but for the time being it's easier to just
      make this small amendment.
      
      Bump the API version mostly as a way to allow vo_placebo to depend on
      this new logic (plus the previous fixes).
      f75684e5
    • Niklas Haas's avatar
      renderer: use nearest-neighbour fallback semantics · e79e4ec2
      Niklas Haas authored
      Similar to the corresponding commit for the frame_queue, nearest
      neighbour semantics are way less fiddly than true ZOH. Basically, think
      of it as trying to solve a problem of probability - which frame is most
      likely to best overlap with the current frame?
      
      In theory, an even better solution here would be to construct the
      `oversample`-like semantics and then pick the frame with the highest
      weight. But that's more code to write, and nearest neighbour more or
      less gets the right result in practice. (I might revisit this in the
      future)
      e79e4ec2
Loading