1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-13 10:26:09 +00:00
mpv/filters
wm4 3e02f39087 f_auto_filters: use software conversion if hw deint is not possible
Before this commit, enabling hardware deinterlacing via the
"deinterlace" option/property just failed if no hardware deinterlacing
was available. An error message was logged, and playback continued
without deinterlacing.

Change this, and try to copy the hardware surface to memory, and then
use yadif. This will have approximately the same effect as
--hwdec=auto-copy. Technically it's implemented differently, because
changing the hwdec mode is much more convoluted than just inserting a
filter for performing the "download". But the low level code for
actually performing the download is the same again.

Although performance won't be as good as with a hardware deinterlacer
(probably), it's more convenient than forcing the user to switch hwdec
modes separately. The "deinterlace" property is supposed to be a
convenience thing after all.

As far as the code architecture goes, it would make sense to auto-insert
such a download filter for all software-only filters that need it.
However, libavfilter does not tell us what formats a filter supports
(isn't that fucking crazy?), so all attempts to work towards this are
kind of hopeless. In this case, we merely have hardcoded knowledge that
vf_yadif definitely does not support hardware formats. But yes, this
sucks ass.
2019-10-02 21:27:07 +02:00
..
f_auto_filters.c f_auto_filters: use software conversion if hw deint is not possible 2019-10-02 21:27:07 +02:00
f_auto_filters.h
f_autoconvert.c f_output_chain: log status of auto filters 2018-04-29 02:21:32 +03:00
f_autoconvert.h audio: change format negotiation, remove channel remix fudging 2018-04-15 23:11:33 +03:00
f_decoder_wrapper.c f_decoder_wrapper: fix initialization state 2019-09-19 20:37:05 +02:00
f_decoder_wrapper.h Implement backwards playback 2019-09-19 20:37:04 +02:00
f_demux_in.c f_demux_in: give it a slightly better filter name 2018-02-05 02:47:14 -08:00
f_demux_in.h video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
f_hwtransfer.c f_hwtransfer: add a mp_hwdownload filter 2019-10-02 21:14:58 +02:00
f_hwtransfer.h f_hwtransfer: add a mp_hwdownload filter 2019-10-02 21:14:58 +02:00
f_lavfi.c f_lavfi: support setting common filter options like "threads" 2018-04-29 02:21:32 +03:00
f_lavfi.h f_lavfi: fix typo in comment 2018-02-13 17:45:29 -08:00
f_output_chain.c f_output_chain: remove a redundant variable 2018-04-29 02:21:32 +03:00
f_output_chain.h f_output_chain: fix typo 2018-04-15 23:11:33 +03:00
f_swresample.c audio: fix segfault caused by incorrect number of planes 2019-02-23 00:21:54 +02:00
f_swresample.h swresample: limit output size of audio frames 2018-02-03 05:01:29 -08:00
f_swscale.c
f_swscale.h f_swscale: fix a typo 2019-09-19 20:37:05 +02:00
f_utils.c filters: add another dumb helper 2019-10-02 21:09:30 +02:00
f_utils.h filters: add another dumb helper 2019-10-02 21:09:30 +02:00
filter_internal.h
filter.c filter: hide warning when disconnecting pins drops frames 2018-04-29 02:21:32 +03:00
filter.h f_output_chain: log status of auto filters 2018-04-29 02:21:32 +03:00
frame.c Implement backwards playback 2019-09-19 20:37:04 +02:00
frame.h Implement backwards playback 2019-09-19 20:37:04 +02:00
user_filters.c video: add vf_fingerprint and a skip-logo script 2019-09-19 20:37:05 +02:00
user_filters.h video: add vf_fingerprint and a skip-logo script 2019-09-19 20:37:05 +02:00