Commit Graph

7 Commits

Author SHA1 Message Date
Niklas Haas 29773f496f placebo: update for new peak detection algo
API version 12 removes the old style of peak detection, and API version
13 adds a new algorithm to replace it. These were annoyingly not done as
a single commit, so we need to guard them separately to prevent any
failures to compile when e.g. bisecting.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-06-17 14:27:54 +02:00
Niklas Haas b579384a23 placebo: update for new tone mapping desaturation algo
This was introduced in API version 10, and refactors the tone mapping
desaturation curve into a new, more tunable algorithm that has some
different behavior. In particular, it allows us to simulate exactly the
"hollywood" style of tone mapping, so we document those special values
specifically.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-06-17 14:27:54 +02:00
Rémi Denis-Courmont 64c7e418cb placebo: missing const, fix warnings 2019-03-03 09:37:10 +02:00
Rémi Denis-Courmont 392c7c8968 gettext: use American spelling for neighbor
British spelling shall be in po/en_UK.po.
2018-12-19 21:10:29 +02:00
Niklas Haas 042bdd688f vout: libplacebo: add PL_COLOR_PRIM_DISPLAY_P3
This was added to the list of display primaries in libplacebo 0.5.0, but
we never added it to this list. No ifdef is needed because we already
require libplacebo >= 0.5.0 in our configure.ac.

We add it to the end of the list to avoid breaking existing vlcrc, even
though the order is less pretty this way.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2018-12-07 09:42:14 +01:00
Niklas Haas 1386b85049 vout: add new vulkan/libplacebo vout
This uses libplacebo's rendering helpers for all video output, on top of
the vulkan graphics API. Some notes:

- The existing fourcc/chroma helpers don't really line up with what the
  libplacebo API expects, or in some cases return values that just don't
  seem to make sense. I was advised against touching them for fear of
  breaking the rest of VLC - so we add our own helpers that give us the
  information in the format we need for libplacebo.

- Not all libplacebo options are mapped. There's no ability to create
  custom filter functions (which libplacebo/mpv support), and there's
  also no support for ICC profiles / 3DLUTs (which libplacebo supports)
  nor for the new color blindness simulation parameters in libplacebo
  v0.6. We also don't map the VLC brightness/hue/gamma/etc. options to
  the libplacebo structs - we could do it for free as part of the video
  decode matrix, rather than needing to insert a CPU filter for it.

- How to create the vulkan surface will depend on the platform (much
  like in opengl), so we move context, surface and device creation into
  a single module (`vulkan/surface.c`) which will be conditionally
  compiled depending on the platform in order to provide support for
  multiple surfaces side-by-side (e.g. x11 and wayland). This does mean
  that the context/device-related options end up being separate per
  platform, but OTOH this is not that bad since different platforms
  might want different e.g. swapchain modes (an example being wayland,
  which can make better use of mailbox rather than fifo).

- libplacebo doesn't have a "configure" step, instead all rendering
  parameters are fully dynamic. So we could call UpdateParams() in our
  module at any point in time when the config values change.
  Unfortunately, there's no easy way for us to find out when this is the
  case, so right now changing the vulkan module options requires a
  module reinit to take effect. In theory we could change this. (As an
  aside: calling var_Inherit* per frame does work to get us the changes
  in "realtime", as soon as the user clicks "save", but this may block
  for arbitrary amounts of time so I was advised against doing it)

Due to the new functions, structs and enum members used, the minimum
libplacebo version has been bumped up to v0.5.0. In theory we could also
try and support v0.4.0 with some #ifdefs, but v0.5.0 has been out for
several months now so it should be a safe requirement.
2018-11-07 15:45:26 +01:00
Niklas Haas d3bbdd7778 vout/opengl: factor libplacebo helpers out to their own file
This is in preparation for a new vout based on libplacebo, for which
reusing these shared helpers with OpenGL will make sense.

Apart from moving stuff around, this commit only has minor changes
(changed define names in some places, minor rewording of some options).
2018-10-30 11:35:34 +01:00