mirror of https://github.com/mpv-player/mpv
76276c9210
Get rid of the old vf.c code. Replace it with a generic filtering framework, which can potentially handle more than just --vf. At least reimplementing --af with this code is planned. This changes some --vf semantics (including runtime behavior and the "vf" command). The most important ones are listed in interface-changes. vf_convert.c is renamed to f_swscale.c. It is now an internal filter that can not be inserted by the user manually. f_lavfi.c is a refactor of player/lavfi.c. The latter will be removed once --lavfi-complex is reimplemented on top of f_lavfi.c. (which is conceptually easy, but a big mess due to the data flow changes). The existing filters are all changed heavily. The data flow of the new filter framework is different. Especially EOF handling changes - EOF is now a "frame" rather than a state, and must be passed through exactly once. Another major thing is that all filters must support dynamic format changes. The filter reconfig() function goes away. (This sounds complex, but since all filters need to handle EOF draining anyway, they can use the same code, and it removes the mess with reconfig() having to predict the output format, which completely breaks with libavfilter anyway.) In addition, there is no automatic format negotiation or conversion. libavfilter's primitive and insufficient API simply doesn't allow us to do this in a reasonable way. Instead, filters can use f_autoconvert as sub-filter, and tell it which formats they support. This filter will in turn add actual conversion filters, such as f_swscale, to perform necessary format changes. vf_vapoursynth.c uses the same basic principle of operation as before, but with worryingly different details in data flow. Still appears to work. The hardware deint filters (vf_vavpp.c, vf_d3d11vpp.c, vf_vdpaupp.c) are heavily changed. Fortunately, they all used refqueue.c, which is for sharing the data flow logic (especially for managing future/past surfaces and such). It turns out it can be used to factor out most of the data flow. Some of these filters accepted software input. Instead of having ad-hoc upload code in each filter, surface upload is now delegated to f_autoconvert, which can use f_hwupload to perform this. Exporting VO capabilities is still a big mess (mp_stream_info stuff). The D3D11 code drops the redundant image formats, and all code uses the hw_subfmt (sw_format in FFmpeg) instead. Although that too seems to be a big mess for now. f_async_queue is unused. |
||
---|---|---|
.. | ||
cocoa | ||
d3d11 | ||
gpu | ||
opengl | ||
vulkan | ||
wayland | ||
win32 | ||
aspect.c | ||
aspect.h | ||
bitmap_packer.c | ||
bitmap_packer.h | ||
cocoa_common.h | ||
cocoa_common.m | ||
d3d_shader_420p.h | ||
d3d_shader_yuv.hlsl | ||
dither.c | ||
dither.h | ||
drm_atomic.c | ||
drm_atomic.h | ||
drm_common.c | ||
drm_common.h | ||
drm_prime.c | ||
drm_prime.h | ||
filter_kernels.c | ||
filter_kernels.h | ||
vo.c | ||
vo.h | ||
vo_caca.c | ||
vo_direct3d.c | ||
vo_drm.c | ||
vo_gpu.c | ||
vo_image.c | ||
vo_lavc.c | ||
vo_mediacodec_embed.c | ||
vo_null.c | ||
vo_opengl_cb.c | ||
vo_rpi.c | ||
vo_sdl.c | ||
vo_tct.c | ||
vo_vaapi.c | ||
vo_vdpau.c | ||
vo_x11.c | ||
vo_xv.c | ||
w32_common.c | ||
w32_common.h | ||
wayland_common.c | ||
wayland_common.h | ||
win_state.c | ||
win_state.h | ||
x11_common.c | ||
x11_common.h |