|author||wm4 <wm4@nowhere>||2018-01-16 11:53:44 +0100|
|committer||Kevin Mitchell <firstname.lastname@example.org>||2018-01-30 03:10:27 -0800|
video: rewrite filtering glue code
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.
Diffstat (limited to 'DOCS')
2 files changed, 8 insertions, 3 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 2b36506920..2379470277 100644
@@ -36,6 +36,13 @@ Interface changes
- deprecate --af=lavrresample. Use the ``--audio-resample-...`` options to
customize resampling, or the libavfilter ``--af=aresample`` filter.
- add --osd-on-seek
+ - remove outfmt sub-parameter from "format" video filter (no replacement)
+ - some behavior changes in the video filter chain, including:
+ - before, using an incompatible filter with hwdec would disable hwdec;
+ now it disables the filter at runtime instead
+ - inserting an incompatible filter with hwdec at runtime would refuse
+ to insert the filter; now it will add it successfully, but disables
+ the filter slightly later
--- mpv 0.28.0 ---
- rename --hwdec=mediacodec option to mediacodec-copy, to reflect
conventions followed by other hardware video decoding APIs
diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst
index 5f953b2204..13e80014c4 100644
@@ -110,9 +110,7 @@ Available mpv-only filters are:
Format name, e.g. rgb15, bgr24, 420p, etc. (default: don't change).
- Format name that should be substituted for the output. If they do not
- have the same bytes per pixel and chroma subsampling, it will fail.
Controls the YUV to RGB color space conversion when playing video. There
are various standards. Normally, BT.601 should be used for SD video, and