0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/video/out
Dudemanguy 8a2fbfc2b8 present_sync: allow future timestamps
The original OML sync implementation (which is where this calculation
originally comes from) made now_monotonic and ust_mp_time unsigned. This
is fine except it has the assumption that now_monotonic is always
greater than ust. This actually isn't always the case. In wayland, I
observed instances where the reported timestamp is in the future. Of
course, it's a valid question to wonder if this even makes sense but
these UST values are essentially opaque black boxes to us anyways. It's
entirely plausible that the gpu is expecting the actual presentation of
the last swap to be a bit in the future, the compositor gets this and
reports this to us. So we'll consider such stats as valid. Note that
xorg doesn't have this problem because it's roughly one swap buffer call
behind because of how the event loop works (honestly something that
should be fixed).

Of course, the problem with the unsigned type here is that it overflows
on the subtraction so make it signed and allow the appropriate negative
value to happen if it does. Note that this will simply result in a small
addition to mp_time_us() which is exactly what we want here (timestamp
slightly in the future). Some small style changes included just because.
2023-09-14 22:19:18 +00:00
..
cocoa cocoa_common: remove deprecated VOCTRLs/VO_EVENTs 2019-12-12 19:56:03 +01:00
d3d11 hwdec: do not add hwdec device if it failed to create 2023-06-26 19:07:29 +02:00
gpu vo_gpu: support crop in gl_video_screenshot 2023-09-09 00:49:19 +00:00
gpu_next vo_gpu_next: respect gl->flipped 2023-05-27 11:37:48 +02:00
hwdec hwtransfer: use the right hardware config to find conversion targets 2023-08-26 10:07:55 -07:00
mac options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
opengl context_drm_egl: remove references to VAAPI in error messages 2023-08-20 20:55:57 +02:00
placebo libplacebo: drop PL_API_VER compatibility paths 2023-08-18 16:39:57 +02:00
vulkan vo: vulkan: allow picking devices by UUID 2023-09-04 15:22:20 -07:00
win32 win32: don't load dynamically always available functions 2023-09-01 16:58:56 +02:00
wldmabuf vo_dmabuf_wayland: drop linux-dmabuf-v2 (again) 2023-06-16 14:46:59 +00:00
android_common.c video/out/android: assert WinID value before use 2023-06-03 17:07:43 +02:00
android_common.h vo: change vo_platform_init to bool 2023-01-08 20:42:42 +00:00
aspect.c Revert "aspect: change --video-pan-x/y to be relative to the destination rect" 2023-09-02 16:18:31 +00:00
aspect.h aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
bitmap_packer.c video/out/bitmap_packer: Avoid empty initializer list 2019-11-18 16:50:21 +01:00
bitmap_packer.h bitmap_packer: remove some unused functions 2016-07-01 20:29:45 +02:00
cocoa_cb_common.swift options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
cocoa_common.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
cocoa_common.m build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
dither.c various: fix warning -Wimplicit-const-int-float-conversion 2023-02-26 16:45:07 +01:00
dither.h gl_video: improve dithering 2013-05-26 16:44:20 +02:00
dr_helper.c vo: add int flags to the get_image signature 2023-01-23 14:13:34 +01:00
dr_helper.h vo: add int flags to the get_image signature 2023-01-23 14:13:34 +01:00
drm_atomic.c drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_atomic.h drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_common.c drm_common: skip cards that don't have connected outputs 2023-08-20 19:59:36 +02:00
drm_common.h drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_prime.c drm_prime: fallback to drmModeAddFB2 2020-05-08 21:26:25 +02:00
drm_prime.h drm_prime: double free bug 2020-03-05 18:12:57 +01:00
filter_kernels.c filter_kernels: fix kaiser 2022-12-20 13:53:25 +01:00
filter_kernels.h vo_opengl: refactor scaler LUT weight packing/loading 2017-09-04 13:53:14 +02:00
libmpv_sw.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
libmpv.h vo: add int flags to the get_image signature 2023-01-23 14:13:34 +01:00
meson.build meson: rename all features with underscores 2023-08-20 21:13:37 +00:00
present_sync.c present_sync: allow future timestamps 2023-09-14 22:19:18 +00:00
present_sync.h vo: move wayland presentation to separate files 2022-06-19 18:13:55 +00:00
vo_caca.c vo_caca: Implement VOCTRL_UPDATE_WINDOW_TITLE 2019-10-29 17:07:41 +01:00
vo_direct3d.c various: fix typos 2023-03-28 19:29:44 +00:00
vo_dmabuf_wayland.c vo_dmabuf_wayland: unmap osd surface when not needed 2023-08-28 18:16:10 +00:00
vo_drm.c vo_drm: remove VOCTRL_SCREENSHOT_WIN 2023-07-21 20:23:11 +02:00
vo_gpu_next.c vo_gpu_next: map --scaler-resizes-only 2023-09-14 18:24:47 +02:00
vo_gpu.c vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
vo_image.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_kitty.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_lavc.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_libmpv.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_mediacodec_embed.c hwdec: fix undeclared identifier in mediacodec_embed 2023-06-28 10:29:24 -07:00
vo_null.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
vo_rpi.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_sdl.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_sixel.c various: fix various typos in the code base 2023-03-28 19:29:44 +00:00
vo_tct.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_vaapi.c draw_bmp: fix overflowing coordinates in mark_rcs 2023-07-30 20:06:20 +02:00
vo_vdpau.c vo_vdpau: set hwdec image format 2023-08-02 18:51:02 +00:00
vo_wlshm.c vo_wlshm: bail out of resize if width/height is 0 2023-07-08 20:47:35 -05:00
vo_x11.c vo_x11: don't rely on XFree to free calloc-ed data 2023-07-02 12:47:31 +02:00
vo_xv.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo.c vo: change vsync_interval to double 2023-09-09 02:48:35 +00:00
vo.h vo: change vsync_interval to double 2023-09-09 02:48:35 +00:00
w32_common.c win32: don't ignore --screen and --fs-screen 2023-08-23 15:37:41 +02:00
w32_common.h vo: change vo_platform_init to bool 2023-01-08 20:42:42 +00:00
wayland_common.c input: add missing keypad key defines 2023-08-25 15:55:31 +00:00
wayland_common.h wayland_common: remove questionable gcd impl and global state 2023-07-19 13:01:08 +02:00
win_state.c win_state: add vo_calc_window_geometry3 2021-09-06 10:16:10 +03:00
win_state.h win_state: add vo_calc_window_geometry3 2021-09-06 10:16:10 +03:00
x11_common.c input: add missing keypad key defines 2023-08-25 15:55:31 +00:00
x11_common.h x11: remove xinerama and refactor window geometry 2023-08-20 02:01:39 +00:00