Commit Graph

13 Commits

Author SHA1 Message Date
Kacper Michajłow d9c1e9bc5c mp_image: add Dolby Vision metadata mapping
Remove side-loading metadata in vo_gpu_next.c and remove unneded
side-data duplication.
2024-03-09 05:58:52 +00:00
Kacper Michajłow 47be5ad4aa csputils: replace mp_chroma_location with pl_chroma_location 2024-01-22 14:54:55 +00:00
Kacper Michajłow 0ac7a40dac csputils: replace mp_alpha_type with pl_alpha_mode 2024-01-22 14:54:55 +00:00
Kacper Michajłow 66e451f4e6 csputils: replace mp_colorspace with pl_color_space 2024-01-22 14:54:55 +00:00
Leo Izen 8217b186f6 video/out/placebo/utils: add mappings from pl enums to mpv enums
mp_trc_to_pl, mp_prim_to_pl, and mp_levels_to_pl have forward but not
inverse mappings. This commit adds mp_trc_from_pl, mp_prim_from_pl, and
mp_levels_from_pl inverse mapping functions, which just map the enums
in the other direction.
2023-03-05 22:37:05 -05:00
quietvoid 41ad51bda2 vo_gpu_next: parse Dolby Vision metadata for dynamic scene brightness
Improves playback for Dolby Vision video files as the metadata can be
used instead of requiring `hdr-compute-peak=yes`.
2023-02-19 20:50:37 +01:00
Niklas Haas c96cee2940 vo_gpu_next: vulkan: libplacebo: unify log prefix
The new status quo is simple: all messages coming from libplacebo are
marked "vo/gpu{-next}/libplacebo", regardless of the backend API (vulkan
vs opengl/d3d11).

Messages coming from mpv's internal vulkan code will continue to come
from "vo/gpu{-next}/vulkan", and messages coming from the vo module
itself will be marked "vo/gpu{-next}".

This is significantly better than the old status quo of vulkan messages
coming from "vo/gpu{-next}/vulkan/libplacebo" whereas opengl/d3d11
messages simply came from "vo/gpu{-next}", even when those messages
originated from libplacebo.

(It's worth noting that the the destructor for the log is redundant
because it's attached to the ctx which is freed on uninit anyway)
2022-10-09 21:47:35 +02:00
Coelacanthus 70fa9502f3 libplacebo: fix compatibility with libplacebo >= 5
libplacebo 4.157 [1] rename context.h to log.h, and left a compatibility
header. In 5.x, this header has been removed.

Since we require libplacebo 4.157 to build mpv, we can just use log.h to
fix compatibility with 5.x.

[1]: 2459200a13

Signed-off-by: Coelacanthus <coelacanthus@outlook.com>
2022-07-16 13:06:21 +03:00
Niklas Haas 88c6c84b64 libplacebo: update log helpers
Use the pl_log APIs introduced in libplacebo v4, replacing the
deprecated pl_context concept.
2022-02-03 18:22:14 +01:00
Niklas Haas 2332445d8d vo_gpu_next: use new HDR metadata options
Properly forward the HDR metadata from the mpi to the equivalent (new)
fields in pl_color_space. Used by the new tone mapping code.
2022-01-07 06:28:14 +01:00
Niklas Haas 9d5d9b2424 vo_gpu_next: add new libplacebo-based renderer
As discussed in #8799, this will eventually replace vo_gpu. However, it
is not yet complete. Currently missing:

- OpenGL contexts
- hardware decoding
- blend-subtitles=video
- VOCTRL_SCREENSHOT

However, it's usable enough to cover most use cases, and as such is
enough to start getting in some crucial testing.
2021-11-03 14:09:27 +01:00
Niklas Haas 564f3dba56 vo_gpu: libplacebo: add missing include
This was removed from common.h upstream since it was a cyclic
dependency. We need to re-import it into utils.h manually.
2021-10-04 12:09:58 +02:00
Niklas Haas 7006d6752d vo_gpu: vulkan: use libplacebo instead
This commit rips out the entire mpv vulkan implementation in favor of
exposing lightweight wrappers on top of libplacebo instead, which
provides much of the same except in a more up-to-date and polished form.

This (finally) unifies the code base between mpv and libplacebo, which
is something I've been hoping to do for a long time.

Note: The ra_pl wrappers are abstract enough from the actual libplacebo
device type that we can in theory re-use them for other devices like
d3d11 or even opengl in the future, so I moved them to a separate
directory for the time being. However, the rest of the code is still
vulkan-specific, so I've kept the "vulkan" naming and file paths, rather
than introducing a new `--gpu-api` type. (Which would have been ended up
with significantly more code duplicaiton)

Plus, the code and functionality is similar enough that for most users
this should just be a straight-up drop-in replacement.

Note: This commit excludes some changes; specifically, the updates to
context_win and hwdec_cuda are deferred to separate commits for
authorship reasons.
2019-04-21 23:55:22 +03:00