mpv/video/decode
wm4 a160405284 vdpau: force driver to report preemption early
Another fix for the crazy and insane nvidia preemption behavior.

This time, the situation is that we are using vo_opengl with vdpau
interop, and that vdpau got preempted in the background while mpv was
sitting idly. This can be e.g. reproduced by using:

   --force-window=immediate --idle --hwdec=vdpau

and switching VTs. Then after switching back, load a video file.

This will not let mp_vdpau_handle_preemption() perform preemption
recovery, simply because it will do so only once vdp_decoder_create()
has been called. There are some other API calls which trigger
preemption, but many don't.

Due to the way the libavcodec API works, vdp_decoder_create() is way too
late. It does so when get_format returns. It notices creating the
decoder fails, and continues calling get_format without the vdpau
format. We could perhaps force it to reinit again (by adding a call to
vdpau.c, that checks for preemption, and sets hwdec_request_reinit), but
this seems too much of a mess.

Solve it by calling API in mp_vdpau_handle_preemption() that empirically
does trigger preemption: output_surface_put_bits_native(). This call is
useless, and in fact should be doing nothing (empty update VdpRect).
There's the slight chance that in theory it will slow down operation,
but in practice it's bound to be harmless. It's the likely cheapest and
simplest API call I've found that can trigger the fallback this way.
(The driver is closed source, so it was up to trial & error.)

Also, when initializing decoding, allow initial preemption recovery,
which is needed to pass the test mention above.
2016-01-25 16:45:18 +01:00
..
dec_video.c video: refactor: disentangle decoding/filtering some more 2016-01-16 22:08:39 +01:00
dec_video.h player: fix some oversights in video refactoring 2016-01-22 00:25:44 +01:00
dxva2.c dxva2: log more debug infos 2016-01-11 16:24:13 +01:00
lavc.h
rpi.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
vaapi.c vaapi: fix compilation on older FFmpeg/Libav 2016-01-20 15:35:15 +01:00
vd.h video: readd codec delay estimation 2015-12-02 14:38:47 +01:00
vd_lavc.c vd_lavc: feed A53_CC side data packets into the demuxer for eia_608 decoding 2016-01-18 12:14:52 -08:00
vdpau.c vdpau: force driver to report preemption early 2016-01-25 16:45:18 +01:00
videotoolbox.c Change 3 more files to LGPL 2016-01-20 15:43:56 +01:00