Commit Graph

50077 Commits

Author SHA1 Message Date
Christoph Heinrich b9850a6e8c input: remove unused struct member 2023-02-21 17:15:17 +00:00
llyyr d0eae60d67 DOCS/client-api-changes.rst: move mpv_del_property to 0.36.0
incorrectly placed under 0.35.0 by 2cfaa820e5
2023-02-21 17:07:57 +00:00
Thomas Weißschuh 9efce6d4ae various: drop unused #include "config.h"
Most sources don't need config.h.
The inclusion only leads to lots of unneeded recompilation if the
configuration is changed.
2023-02-20 14:21:18 +00:00
Thomas Weißschuh a90355660c ao_pipewire: drop unused #include "generated/version.h" 2023-02-20 14:21:18 +00:00
rcombs d1cf89b655 Vulkan: add configure check for VK_KHR_display extension
This allows building directly against ICDs that don't implement this extension.
2023-02-20 00:05:26 -06:00
Niklas Haas 9a752e8b26 vo_gpu_next: add --tone-mapping-visualize 2023-02-19 21:01:40 +01: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
quietvoid 0d82afbc7f mp_image: forward AV_FRAME_DATA_DOVI_RPU_BUFFER side data
When available, and ignored if `vf=format:dolbyvision=no`.
2023-02-19 20:50:37 +01:00
Leo Izen 2955a0759c
DOCS: document JPEG XL default effort change
Document the change in 7607432127.
2023-02-18 06:16:21 -05:00
Dudemanguy e2cdc23af0 Revert "vo_dmabuf_wayland: drop support for linux-dmabuf-v2"
This was originally dropped because it was thought to be unneeded at the
time, but at least some devices (rockchip) apparently are still on old
compositors that use linux-dmabuf v2. It's not much code, and for
testing purposes it's good to have around since it's hard to test
drmprime otherwise. Some minor additions are here to support the newly
added vaapi-format mapping in v2 of the protocol.

This reverts commit a5b9d529ee.
2023-02-18 02:21:54 +00:00
Leo Izen 7607432127 video/image_writer: use effort=4 default for JXL screenshots
effort=4 has a significant increase in quality/bpp compared to effort=3
with a very minor increase in encoding time. It's worth the trade-off
as a default setting for lossy encoding.
2023-02-17 17:40:11 -05:00
Thomas Weißschuh c3f326bc13 ao_pipewire: fix removal of zeroed hooks on old pipewire
Older versions of pipewire segfault when calling spa_hook_remove() on
hooks that are zeroed.
Add a backfill for the logic added by pipewire 0.3.57.

Being able to remove zeroed hooks makes errorhandling much easier.

See #11309
2023-02-15 16:37:20 -08:00
Niklas Haas 16ef237da5 vo_gpu_next: allow native CSP screenshots
Useful for getting native screenshots of non-sRGB content, such as HDR
etc.
2023-02-13 21:53:41 +01:00
Niklas Haas c975888584 player/screenshot: pass on ability to output native CSP
Fixes: #10988
2023-02-13 21:53:41 +01:00
Niklas Haas ff26024496 screenshot: explicitly default VOCTRL_SCREENSHOT csp
This allows the logic in `convert_image` to fast-path if the image
params are equal. Without this check, the image params are basically
never equal, because that path goes through `mp_image_params_guess_csp`
while the `mp_image` itself does not.

Force it here for consistency across VOs.
2023-02-13 21:53:41 +01:00
Niklas Haas 6d9e72cd89 video/image_writer: force sRGB for unsupported formats
After commit c98e7353, we blindly pass the screenshot colorspace to the
image writer. But since we want to introduces the ability to save images
in HDR and other exotic formats, we should strip this for unsupported
formats.

See-Also: #10988
2023-02-13 21:53:41 +01:00
Niklas Haas 01351a6412 video/image_writer: add image_writer_flexible_csp
PNG only supports this since the introduction of cICP, so put a version
check on the next API version bump after the cICP writing patch got
merged.
2023-02-13 21:53:41 +01:00
Niklas Haas 862be6c237 vo_gpu_next: tag screenshots with correct colorspace
When taking window screenshots with a colorspace override, tag them
appropriately, based on the best-known colorspace info. Note that this
is imperfect, we should ideally also attach the output ICC profile if
one exists. But this is better than nothing.

Also force 1:1 PAR in this case. In all other cases, default to sRGB.
2023-02-13 21:53:41 +01:00
Niklas Haas 5078132b28 vo_gpu_next: only apply target options in window screenshot mode
When taking an unscaled screenshot, always render to an unspecified
SDR-like space. (Subject to change) Apply output-specific options (ICC
profile, color space overrides, custom LUT) only in window screenshot
mode.

I decided to split this off from subsequent refactors because it is IMO
a bug fix deserving of its own commit.
2023-02-13 21:53:41 +01:00
Niklas Haas 4f84d91df2 vo_gpu_next: be explicit about screenshot repr
Screenshots are currently always RGB. Subject to change, but needs to be
communicated clearly if changed. This commit is not a functional change,
it's merely for code clarity.
2023-02-13 21:53:41 +01:00
rcombs 2e0bdbfe9c m_property: avoid using a small stack buffer in m_property_do_bstr
This allows operations on properties with longer names (e.g. deeply-nested user-data sub-props).
2023-02-13 14:39:41 -06:00
Niklas Haas 2d4a243810 vo_gpu_next: expose --tone-mapping=st2094-40 and st2094-10 2023-02-13 17:52:35 +01:00
Niklas Haas 79b093f210 vo_gpu_next: support mapping HDR10+ dynamic metadata
Based on the new upstream helper function `pl_map_hdr_metadata` and the
existing AV_FRAME_DATA_DYNAMIC_HDR_PLUS. This allows us to use SMPTE
2094-40 dynamic HDR tonemapping in mpv, albeit with the limitation of
requiring `--tone-mapping=auto` in order to pick this curve upstream.
2023-02-13 17:52:35 +01:00
Thomas Weißschuh a40958cdf8 ao_pipewire: allow usage of global volume control
PipeWire supports a global volume control for streams that works on top
of the per-channel volumes.
As mpv only supports a single volume with ao-volume it can make sense to
use the single global volume from PipeWire for it.
This allows the user to also specify per-channel volumes and not have
mpv trample over them.

This mode is not the default as pulseaudio does not support this
global volume control and all tooling controlling PipeWire via
pipewire-pulse (like pavucontrol) will not be able to see this channel.
2023-02-11 10:00:46 -08:00
Christoph Heinrich 8f76673608 command: only avoid redrawing when old and new osd are both hidden
The `osd-overlay` command didn't trigger a redraw when the overlay was
set to hidden.
This is fine when the overlay was already hidden before that, but
transitioning from not hidden to hidden requires a redraw.
2023-02-11 14:51:14 +01:00
Dudemanguy 180b4faed0 DOCS/options: remove testing note in video-sync-max-factor
This option is a bit obscure, but some people do use it and it can be
useful. The actual code that implements this is very simple, so there's
really no need to have a scary note in the docs about it possibly
changing or being removed.
2023-02-11 00:50:11 +00:00
Dudemanguy 1126df0d80 vf_sub: undeprecate
3a9e661e92 officially made this video
filter deprecated roughly 6 years ago. Every other video filter in that
commit has actually been removed since then except for vf_sub. ffmpeg
does have its own subtitles filter, but it doesn't have the same control
over scale like vf_sub does. That's probably why wm4 never actually
removed it. Let's stop scaring users with a warning since this filter
probably won't ever get removed. Closes #9254.
2023-02-11 00:50:11 +00:00
Aaron Boxer 49fd6caa43 vo_dmabuf_wayland: reject hw formats not supported by compositor 2023-02-11 00:46:46 +00:00
Leo Izen 8ba7b8f0d2 video/image_writer: change screenshot-tag-colorspace default to yes
With significant improvements to the color tagging support in various
screenshot formats, e.g. cICP in FFmpeg, and JPEG XL's generally robust
color support, it's safe to default this to yes.
2023-02-09 21:03:28 +01:00
Aaron Boxer a3340645be vo_dmabuf_wayland: add purgatory list to buffer pool to avoid memory leaks 2023-02-05 23:27:08 +00:00
Aaron Boxer 6803903e0c vo_dmabuf_wayland: ensure buffer pool is cleaned at start of uninit 2023-02-05 23:27:08 +00:00
Aaron Boxer ce6efc782f vo_dmabuf_wayland: simplify buffer pool reset 2023-02-05 23:27:08 +00:00
Aaron Boxer f1f6eaa3de vo_dmabuf_wayland: only resize when a new frame is about to be drawn 2023-02-05 23:27:08 +00:00
Max Dunbar 5bd991f338 DOCS/input: remove experimental note from sub-text 2023-02-05 16:23:29 +00:00
Thomas Weißschuh e439ddc051 ao_pipewire: report linking errors from init() 2023-02-03 12:33:09 -08:00
Thomas Weißschuh 83681de3c1 ao_pipewire: add support for exclusive mode 2023-02-03 12:33:09 -08:00
Thomas Weißschuh c29692d81d ao_pipewire: move stream flags to dedicated variable 2023-02-03 12:33:09 -08:00
Thomas Weißschuh 888a7c963f ao_pipewire: adjust message level based on probing
Use the ao->probing property to upgrade the status message when the AO
is explicitly selected.

Suggested-by: uau on #mpv-devel
2023-02-03 12:32:45 -08:00
Thomas Weißschuh 771c8a165a f_hwtransfer: fix leak of framesconstraints 2023-02-03 09:23:09 -08:00
Thomas Weißschuh c7c92240a9 image_pool: properly free frames
av_frame_unref() only frees the buffers, not the frame data itself.
2023-02-03 09:23:09 -08:00
Thomas Weißschuh b0fb6999a4 ao_pipewire: remove unneeded goto 2023-02-03 09:18:37 -08:00
Thomas Weißschuh c8d9155c56 ao_pipewire: replace opencoded talloc() 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 79795b8378 ao_pipewire: print stream states as string 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 24504418fc ao_pipewire: remove unnecessary empty lines 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 69fb378575 ao_pipewire: remove opencoded spa_zero() 2023-02-03 09:18:37 -08:00
Thomas Weißschuh af3c7f3d31 ao_pipewire: remove some unnecessary linebreaks 2023-02-03 09:18:37 -08:00
Thomas Weißschuh c2c36c0d57 ao_pipewire: reduce message level of unsuccessful connection
As ao_pipewire is probed first if a user does not have PipeWire running
they will see a scary warning message even if another AO afterwards is
probed fine.
Tone down the error message so as not to confuse users.
2023-02-03 09:18:37 -08:00
Thomas Weißschuh 469f7af210 ao_pipewire: remove unnecessary braces 2023-02-03 09:18:37 -08:00
Kacper Michajłow bc7a126237 sws_utils: add check for HAVE_ZIMG to suppress warnings 2023-02-02 14:23:02 +00:00
Kacper Michajłow 87fb254deb vo_gpu_next: add check for PL_HAVE_LCMS 2023-02-02 14:23:02 +00:00