MPV

mpv:release/0.35

Last commit made on 2023-01-28
Get this branch:
git clone -b release/0.35 https://git.launchpad.net/mpv

Branch merges

Branch information

Name:
release/0.35
Repository:
lp:mpv

Recent commits

140ec21... by Sfan5

Release 0.35.1

db52498... by Sultan Alsawaf <email address hidden>

x11: remove PresentNotifyMSC from egl/glx/vulkan to fix xpresent timing

PresentNotifyMSC turns out to be not only redundant, but also harmful with
mesa-backed egl/glx/vulkan VOs because for all of them, mesa uses
PresentPixmap behind the scenes when DRI3 is available, which already
spawns a PresentCompleteNotify event when the buffer swap actually
finishes. This is important because without using the timing information
from these PresentCompleteKindPixmap events, there's no way for mpv to know
exactly when a frame becomes visible on the display.

By using PresentNotifyMSC in conjunction with DRI3-enabled mesa, two
problems are created:
1. mpv assumes that a vblank won't elapse (i.e., it assumes the current MSC
   won't change) between the time when mesa enqueues the buffer swap and
   the time when mpv calls PresentNotifyMSC to ask xorg for a notification
   at the next MSC, relative to the current MSC at the time that xorg reads
   it for the PresentNotifyMSC call. This means that mpv could get a
   notification one or more vblanks later than it expects, since the
   intention here is for mpv to get a notification at the MSC that the
   buffer swap completes.
2. mpv assumes that a buffer swap always takes one vblank to complete,
   which isn't always true. A buffer swap (i.e., a page flip) could take
   longer than that depending on hardware conditions (if the GPU is running
   slowly or needs to exit a low-power state), scheduling delays (under
   heavy system or GPU load), or unfortunate timing (if the raster scan
   line happens to be at one of the last few rows of pixels and a vblank
   elapses just before the buffer swap is enqueued).

This causes mpv to have a faulty assumption of when frames become visible.

Since mpv already receives the PresentCompleteNotify events generated by
mesa's buffer swaps under the hood, the PresentNotifyMSC usage is unneeded
and just throws a wrench in mpv's vsync timing when xpresent is enabled.

Simply removing the PresentNotifyMSC usage from the egl, glx, and vulkan
VOs fixes the xpresent vsync timing.

8e2dc8b... by Sfan5

vo_gpu: implement VO_DR_FLAG_HOST_CACHED

For OpenGL, this is based on simply comparing GL_VENDOR strings against
a list of allowed vendors.

Co-authored-by: Nicolas F. <email address hidden>
Co-authored-by: Niklas Haas <email address hidden>

16c0ac2... by Niklas Haas <email address hidden>

vo_gpu_next: implement VO_DR_FLAG_HOST_CACHED

For sufficiently new versions of libplacebo.

01374b6... by Sfan5

vd_lavc: add "auto" choice for vd-lavc-dr

--vd-lavc-dr defaulted to "yes", which caused issues on certain
hardware. Instead of disabling it, add a new "auto" value and
make it the default.

The "auto" choice will enable DR only when we can request host-cached
buffers (as signalled by the new VO_DR_FLAG_HOST_CACHED).

Co-authored-by: Nicolas F. <email address hidden>
Co-authored-by: Niklas Haas <email address hidden>

fc115bc... by Niklas Haas <email address hidden>

vo: add `int flags` to the get_image signature

This is a huge disgusting mess to thread through everywhere. Maybe I'm
stupid for attempting to solve the problem this way.

b64f9fe... by Niklas Haas <email address hidden>

mp_image: fix XYZ primaries default

This was incorrectly set to BT.2020, when it should be DCI-P3 for pretty
much all real-world XYZ content (which is digital cinema content).

3813cc4... by Dudemanguy <email address hidden>

wayland: store presentation feedbacks in a pool

Officially, the most cursed part of the wayland code in mpv (third or
fourth try now?) This time, let's allocate a pool during init
(arbitrarily set to the maximum swapchain length mpv allows, 8; don't
even know if this actually works in wayland). Then we add/remove
feedbacks from the pool during the lifecycle of the VO, and clean it up
all at the end. Hopefully, this does the trick for good this time.

8ddc0e8... by Dudemanguy <email address hidden>

audio: fix crash during uninit on ao_lavc

The buffer state can be null when using --ao=lavc, so just check it
first. Fixes #10175.

46cd82a... by Ionen Wolkens <email address hidden>

meson: also search for rst2html with .py extension

This allows using rst2html.py from docutils if present, this
was already done for rst2man.py (unneeded for rst2pdf).