Skip to content
Snippets Groups Projects
  1. Sep 12, 2024
  2. Sep 04, 2024
  3. Dec 13, 2022
  4. Feb 02, 2022
  5. Jan 30, 2022
  6. Oct 31, 2021
  7. Oct 06, 2021
  8. Sep 03, 2021
  9. Jun 20, 2021
  10. Feb 11, 2021
    • Emmanuel Gil Peyrot's avatar
      dav1dplay: Add -lm for llround() support · 58cb4cf0
      Emmanuel Gil Peyrot authored
      Neither --buildtype=plain nor --buildtype=debug set -ffast-math, so
      llround() is kept as a function call and isn’t optimised out into
      cvttsd2siq (on amd64), thus requiring the math lib to be linked.
      
      Note that even with -ffast-math, it isn’t guaranteed that a call to
      llround() will always be omitted (I have reproduced this on PowerPC), so
      this fix is correct even if we ever decide to enable -ffast-math in
      other build types.
      58cb4cf0
  11. Feb 06, 2021
    • Niklas Haas's avatar
      dav1dplay: Only repaint the window when necessary · eab4ef6a
      Niklas Haas authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      The current playback loop triggers a repaint on any single event,
      including spammy events such as SDL_MOUSEMOTION.
      
      Fix this by only repainting on SDL_WINDOWEVENT_EXPOSED, which is defined
      as the event sent when the window was damaged and needs to be repainted,
      as well as on new frames.
      
      Fixes #356
      eab4ef6a
    • Niklas Haas's avatar
      dav1dplay: Update/modernize placebo-based renderer · 61b65456
      Niklas Haas authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      Upstream libplacebo added support for dav1d integration directly,
      allowing us to vastly simplify all of this code. In order to take
      advantage of new optimizations, I had to allow update_frame to unref the
      Dav1dPicture. (This is fine, since double unref is a no-op)
      
      In addition, some of the functions we use were deprecated in recent
      libplacebo versions, so since we're taking a new dependency we might as
      well fix the deprecation warnings.
      61b65456
    • Niklas Haas's avatar
      dav1dplay: Disable zerocopy on placebo-gl · 06e8ed37
      Niklas Haas authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      These functions are not thread-safe on GL, because they are not called
      from the thread holding the GL context. Work around this by simply
      disabling it.
      
      Not very optimal, but better than crashing.
      06e8ed37
  12. Feb 01, 2021
  13. Jan 28, 2021
  14. Jul 20, 2020
  15. May 26, 2020
  16. May 25, 2020
    • Niklas Haas's avatar
      dav1dplay: allow resizing the window · a1e7a329
      Niklas Haas authored
      libplacebo v66 got helper functions that make preserving the aspect
      ratio in this case trivial. But we still need to make sure to clear the
      FBO to black if the image doesn't cover it fully.
      a1e7a329
  17. May 20, 2020
    • Niklas Haas's avatar
      dav1dplay: don't freeze on render errors · df40d36d
      Niklas Haas authored
      Returning out of this function when pl_render_image() fails is the wrong
      thing to do, since that leaves the swapchain frame acquired but never
      submitted. Instead, just clear the target FBO to blank red (to make it
      clear that something went wrong) and continue on with presentation.
      0.7.0
      df40d36d
  18. May 18, 2020
    • Niklas Haas's avatar
      dav1dplay: support on-GPU film grain synthesis · cbe05cf4
      Niklas Haas authored
      Annoying minor differences in this struct layout mean we can't just
      memcpy the entire thing. Oh well.
      
      Note: technically, PL_API_VER 33 added this API, but PL_API_VER 63 is
      the minimum version of libplacebo that doesn't have glaring bugs when
      generating chroma grain, so we require that as a minimum instead.
      
      (I tested this version on some 4:2:2 and 4:2:0, 8-bit and 10-bit grain
      samples I had lying around and made sure the output was identical up to
      differences in rounding / dithering.)
      cbe05cf4
    • Niklas Haas's avatar
      dav1dplay: handle all supported csps/reprs/bitdepths · 7bbebdb4
      Niklas Haas authored
      Generalize the code to set the right pl_image metadata based on the
      values signaled in the Dav1dPictureParameters / Dav1dSequenceHeader.
      
      Some values are not mapped, in which case stdout will be spammed.
      Whatever. Hopefully somebody sees that error spam and opens a bug report
      for libplacebo to implement it.
      7bbebdb4
    • Niklas Haas's avatar
      dav1dplay: move and simplify pl_image generation · f01fd0f1
      Niklas Haas authored
      Having the pl_image generation live in upload_planes() rather than
      render() will make it easier to set the correct pl_image metadata based
      on the Dav1dPicture headers moving forwards. Rename the function to make
      more sense, semantically.
      
      Reduce some code duplication by turning per-plane fields into arrays
      wherever appropriate.
      
      As an aside, also apply the correct chroma location rather than
      hard-coding it as PL_CHROMA_LEFT.
      f01fd0f1
    • Niklas Haas's avatar
      dav1dplay: don't write directly to iparams.extensions · 3bb0aed1
      Niklas Haas authored
      This is turned into a const array in upstream libplacebo, which
      generates warnings due to the implicit cast. Rewrite the code to have
      the mutable array live inside a separate variable `extensions` and only
      set `iparams.extensions` to this, rather than directly manipulating it.
      3bb0aed1
  19. May 16, 2020
  20. May 15, 2020
  21. May 14, 2020
  22. Mar 06, 2020
    • Konstantin Pavlov's avatar
      examples: fail when SDL is not found · e36ebb6f
      Konstantin Pavlov authored
      Now when -Denable_examples=true is requested, meson will fail as
      expected if there is no SDL available.
      e36ebb6f
    • Jan Beich's avatar
      examples: chase cacc8e35 · e04227c5
      Jan Beich authored
      ../examples/dav1dplay.c:1030:5: warning: implicit declaration of function 'init_demuxers' is invalid in C99 [-Wimplicit-function-declaration]
          init_demuxers();
          ^
      /usr/bin/ld.bfd: examples/c590b3c@@dav1dplay@exe/dav1dplay.c.o: in function `decoder_thread_main':
      dav1dplay.c:(.text+0x1243): undefined reference to `init_demuxers'
      cc: error: linker command failed with exit code 1 (use -v to see invocation)
      e04227c5
  23. Sep 27, 2019
    • Niklas Haas's avatar
      dav1dplay: initial support for --zerocopy · 490a1420
      Niklas Haas authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      Right now this just allocates a new buffer for every frame, uses it,
      then discards it immediately. This is not optimal, either dav1d should
      start reusing buffers internally or we need to pool them in dav1dplay.
      
      As it stands, this is not really a performance gain. I'll have to
      investigate why, but my suspicion is that seeing any gains might require
      reusing buffers somewhere.
      
      Note: Thrashing buffers is not as bad as it seems, initially. Not only
      does libplacebo pool and reuse GPU memory and buffer state objects
      internally, but this also absolves us from having to do any manual
      polling to figure out when the buffer is reusable again. Creating, using
      and immediately destroying buffers actually isn't as bad an approach as
      it might otherwise seem.
      
      It's entirely possible that this is only bad because of lock contention.
      As said, I'll have to investigate further...
      490a1420
    • Niklas Haas's avatar
      dav1dplay: add --untimed for benchmarking purposes · 3f35ef1f
      Niklas Haas authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      Useful to test the effects of performance changes to the
      decoding/rendering loop as a whole.
      3f35ef1f
Loading