Skip to content
Snippets Groups Projects
  1. Feb 21, 2024
    • Niklas Haas's avatar
      options: update for new clearing options · e987124b
      Niklas Haas authored
      e987124b
    • Niklas Haas's avatar
      611a4abb
    • Niklas Haas's avatar
      renderer: refactor background/border clearing options · 36388111
      Niklas Haas authored
      The current behavior is very ad-hoc and presents numerous issues to
      downstream clients. Make this configuration process more straightforward
      by adding an explicit clearing mode enum field to `pl_render_params`,
      which the old override fields are specific instances of.
      
      Notably, this could be extended in the future, e.g. by PL_CLEAR_GRADIENT
      or whatever. (Although this can already be done as of right now by
      setting both clear modes to PL_CLEAR_NONE and using blend_params on top
      of a custom-drawn gradient)
      
      The default of `PL_COLOR_CLEAR` for both is consistent with the current
      status quo, and also presents the least surprising outcome when
      combining transparent/opaque images with transparent/opaque
      framebuffers. This way, the user only gets transparent images output if
      they explicitly opt-in to it, either by setting
      `background_transparency` to 1 (like `plplay` does), or by setting the
      background clearing mode to `PL_CLEAR_SKIP`.
      
      In particular, `border = PL_CLEAR_SKIP` will result in "garbage" pixels
      out of the box, at least on implementations which don't pre-clear
      framebuffers for you.
      
      Supersedes: videolan/libplacebo!637
      36388111
    • Niklas Haas's avatar
      renderer: add pl_frame_clear_tiles · 2b8fd9b0
      Niklas Haas authored
      Analog to pl_frame_clear_rgba. I had to decide carefully whether
      I wanted to preserve the symmetry with `pl_frame_clear_rgba` in taking
      only a `pl_gpu`, or if I should take the whole `pl_renderer` to gain
      access to the internal `pl_dispatch`. But I decided to go with the
      `pl_gpu`, since we might want to move this set of functions to
      a different module in the future. (It's not really renderer-specific)
      
      I also really regret having to go through such hoops every time to get
      the per-plane subsampling ratio. Truthfully, this should probably be
      a helper function.
      
      See-Also: videolan/libplacebo!637
      2b8fd9b0
    • Niklas Haas's avatar
      colorspace: split PL_ALPHA_NONE off from PL_ALPHA_UNKNOWN · 0ee549aa
      Niklas Haas authored
      This field was doing double duty between marking the alpha mode as
      unknown and marking the alpha channel as absent, with inconsistent
      results. In particular, pl_renderer always inferred the alpha channel if
      present in the texture, leaving users with no options for easily
      manually disabling it.
      
      This patch adds PL_ALPHA_NONE to rectify the situation, allowing API
      users to set `target.repr.alpha = PL_ALPHA_NONE` to explicitly disable
      alpha blending even when the target supports it.
      
      See-Also: videolan/libplacebo!637
      0ee549aa
  2. Feb 19, 2024
  3. Feb 18, 2024
  4. Feb 17, 2024
    • Kacper Michajłow's avatar
      utils/libav: add pl_map_avdovi_metadata · a9f57049
      Kacper Michajłow authored
      Convenience function, we don't care about pl_frame here.
      
      Also deprecate pl_frame_map_avdovi_metadata to reduce API surface in
      future, both functions do the same thing. Prefer the one with relaxed
      API.
      a9f57049
  5. Feb 09, 2024
  6. Feb 08, 2024
  7. Feb 02, 2024
  8. Jan 29, 2024
  9. Jan 26, 2024
    • Leo Izen's avatar
      vulkan/gpu_buf: avoid segfault with unusually aligned size_base · 741b604c
      Leo Izen authored
      
      This patch prevents a segmentation fault that occurs when size_base is
      not a multiple of max_transfer. If size_base is larger than the
      max_transfer value but is not a multiple of it, the last iteration of
      the loop will transfer too much. It needs to transfer how much is
      remaining of size_base.
      
      Note that the PL_MIN behaves identically when size_base is less than
      max_transfer, because xfer will never be nonzero in that scenario.
      
      Signed-off-by: default avatarLeo Izen <leo.izen@gmail.com>
      741b604c
  10. Jan 10, 2024
  11. Dec 04, 2023
  12. Nov 30, 2023
  13. Nov 22, 2023
  14. Nov 18, 2023
  15. Nov 17, 2023
  16. Nov 13, 2023
  17. Nov 12, 2023
  18. Nov 06, 2023
  19. Nov 05, 2023
  20. Nov 03, 2023
    • Dudemanguy's avatar
      renderer: don't assert on a failed icc profile · 25103042
      Dudemanguy authored
      At least for mpv, if we have a playlist of images, fail opening the ICC
      of one image, go forward and then back to the image with the ICC
      failure, it'll hit this assertion failure. Not so nice. If there's no
      ICC information, it just does nothing so display the image as usual.
      25103042
  21. Oct 31, 2023
    • Niklas Haas's avatar
      utils/frame_queue: add PTS drift compensation · de6d57f0
      Niklas Haas authored
      By default, allows for correcting drift/jitter of up to 1 ms per frame,
      in line with expected jitter from e.g. Matroska sources. This is enough
      to cover the mismatch between 23.976 Hz and 24.000 Hz, but not the
      mismatch between 24 and 25 Hz (which is just over 1ms per frame).
      
      There are two use cases in which this code will be useful:
      
      1. Displaying 23.976 Hz video files on e.g. 60.000 Hz monitor (or any
         other near-miss), in display-timed mode. Given the usual 3:2
         cadence, after five vsyncs (three source frames), we will have:
      
         Vsync (wallclock) PTS = 83.33333333333334
         Frame PTS = 83.41675008341676
      
         This is a difference of 0.1ms, and will therefore be fixed by this
         code, adjusting all future wallclock PTS up by the cumulative drift
         (0.1ms).
      
      2. Displaying any video with some amount of jitter on the PTS
         measurements. This avoids some situation where we have frames with
         weights 0.999 and 0.001 for example. Normally this should get rounded
         away by the frame mixing code anyway, but it's better to have an
         exact match.
      de6d57f0
  22. Oct 30, 2023
  23. Oct 29, 2023
Loading