Skip to content
Snippets Groups Projects
  1. Sep 11, 2022
  2. Sep 08, 2022
    • Niklas Haas's avatar
      gpu: fix validation of opaque formats · a496c2f5
      Niklas Haas authored
      This has a possible divison by zero that was not guarded by the
      opaqueness check. Rearrange the logic in this section to fix it.
      a496c2f5
    • Niklas Haas's avatar
      tests/bench: add deinterlacing benchmarks · 32e91130
      Niklas Haas authored
      32e91130
    • Niklas Haas's avatar
      demos/plplay: hook up deinterlacing options · dc95ec6c
      Niklas Haas authored
      This sort of violates some principles of thread safety by hackily
      allowing the "Enable" checkbox on the deinterlacing GUI to affect
      whether or not new frames are being pushed with or without deinterlacing
      metadata. But any race condition here is negligible / trivial.
      dc95ec6c
    • Niklas Haas's avatar
      tests: add deinterlacing test · 6da488fc
      Niklas Haas authored
      6da488fc
    • Niklas Haas's avatar
      utils/frame_queue: add deinterlacing support · 5ff2fa13
      Niklas Haas authored
      After a lot of internal debating and back-and-forth, I decided to settle
      on an approach where the pl_queue splits up frames internally. This
      frees the user from the burden of having to deal with these relatively
      common corner cases, and also allows us to try and be as smart as
      possible and 'do the right thing' with respect to things like doubling
      detected framerate, pushing frames out-of-order, re-linking past and
      future frames in all sorts of corner cases, and internally refcounting
      frames on an actual as-needed basis.
      
      This approach is relatively transparent for users and merely requires
      them forward the appropriate field metadata.
      
      It's worth pointing out that the current design of `struct entry` sort
      of conflates two separate concepts: source frames, and their
      corresponding fields/queue entries pointing at them. The way this is
      organized internally is currently sort of ad-hoc and only done this way
      to save a bit of memory and convenience. I may decide to reorganize it
      in the future.
      
      Closes: videolan/libplacebo#218
      5ff2fa13
    • Niklas Haas's avatar
      renderer: add support for deinterlacing · 06ca46b6
      Niklas Haas authored
      Doing deinterlacing directly in the renderer is really the only sane way
      to do it, due to the following advantages:
      
      - keeps all params in the same place
      - natural frame invalidation when deinterlacing params change
      - natural integration into the pl_renderer_save/load shader cache
      - integration into the render stats / timings
      - only deinterlaces when a frame is actually needed/used
      - possibility of merging with other shader passes
      
      Annoyingly, as a result of API limitations, we currently have to do
      deinterlacing before plane merging, which is a needless slowdown. But
      fixing that is a problem for another day.
      06ca46b6
    • Niklas Haas's avatar
      97f4362d
    • Niklas Haas's avatar
      810fe9cb
    • Niklas Haas's avatar
      utils/frame_queue: move frame duration to pl_source_frame · c9f28eff
      Niklas Haas authored
      For deinterlacing, we may need to know the frame duration before any
      pl_queue_params has been called. Moving the frame duration to the
      pl_source_frame field both matches upstream APIs better and lets us
      solve this problem more elegantly.
      c9f28eff
    • Niklas Haas's avatar
      utils/frame_queue: refcount frame entries · 0598436a
      Niklas Haas authored
      Not currently used but will be needed for interpolation. Also fixes a
      bug where we leaked the `struct entry` allocations on
      `pl_queue_destroy`.
      0598436a
    • Niklas Haas's avatar
      shaders/deinterlacing: add deinterlacing GPU shaders · a9fb0af6
      Niklas Haas authored
      Alongside the basic/trivial deinterlacing modes, this contains an
      implementation of the raw yadif deinterlacing kernel, based on
      vf_yadif_cuda.cu by @philipl. Currently only supports fragment shaders,
      with no compute shader speedup (although such a thing is conceptually
      possible, to share duplicate sampling work between adjacent pixels).
      
      Design the API in such a way that it permits field-merging (PAFF) should
      the need should arise in the future. Also adds a few related helpers.
      
      Closes: videolan/libplacebo#20
      a9fb0af6
    • Niklas Haas's avatar
      demos/plplay: allocate extra hw frames · 595ab6ec
      Niklas Haas authored
      Failure to do so results in e.g. interplation exhausting the frame
      limit. The number 4 is based arbitrarily on the maximum that doesn't
      cause issues in practice.
      595ab6ec
    • Niklas Haas's avatar
      demos/plplay: properly compute mix radius · 4f64120e
      Niklas Haas authored
      Otherwise, cubic frame interpolation doesn't actually work. Oops.
      4f64120e
  3. Sep 04, 2022
  4. Sep 03, 2022
  5. Aug 30, 2022
  6. Aug 29, 2022
  7. Aug 27, 2022
  8. Aug 26, 2022
  9. Aug 22, 2022
  10. Aug 21, 2022
  11. Aug 20, 2022
  12. Aug 19, 2022
  13. Aug 18, 2022
    • Niklas Haas's avatar
      vulkan/swapchain: rewrite/fix swapchain recreation logic · f0ff6812
      Niklas Haas authored
      So, from the vulkan spec, swapchains are put into a retired state
      whether the call to `vkCreateSwapchainKHR` succeeds or fails, so we
      always need to garbage collect them.
      
      In addition, the point about multiple "stale" swapchains being forbidden
      is also bogus, the vulkan spec explicitly clarifies that this is
      allowed.
      
      Finally, this solves a number of theoretical race conditions that were
      present as a result of this struct not being locked with respect to
      callbacks, by passing the (wrapped) handle directly.
      f0ff6812
    • Niklas Haas's avatar
      vulkan/pass: wrap non-dispatchable handles for callbacks · 7c6f29f4
      Niklas Haas authored
      While annoying, this makes the code safe to use with all 32-bit vulkan
      implementations.
      7c6f29f4
    • Niklas Haas's avatar
      vulkan: add helper functions to wrap non-dispatchable handles · edab3305
      Niklas Haas authored
      Eating an extra malloc/free, while annoying, is definitely safe. This is
      fortunately rather rare in practice, since we only really need it for
      callbacks.
      edab3305
Loading