mirror of https://github.com/mpv-player/mpv
6031a0e173
VapourSynth introduced their version 4 API in R55, 3 years ago. mpv is still using the deprecated version 3. I think it is good to migrate before VapourSynth completely removes it. The most impacted area is the video format. Previously we have a fixed table of supported formats, each represented by an integer. In v4, the integer is replaced by pointer to the full struct of the format. Second, the way to create video filter is changed. Previously caller needs to supply a "initialization" callback to `createFilter()`, which sets up video info etc. In v4, video info is prepared first, passed to the `createVideoFilter2()` and we get back the node. Also, previously mpv was using the `fmSerial` filter mode, which means VapourSynth 1) can only request one frame from mpv at a time, and 2) the order of frames requested must be sequential. I propose to change it to the parallel request mode, which requests multiple frames at a time in semi random order. The reasons are, for 1), the get frame function, `infiltGetFrame()`, unlocks the mutex during output image generation, thus can benefit from parallel requests. For 2) thanks to the frame buffer, unordered frame requests are acceptable. Just make sure the buffer is large enough. Third, the way VapourSynth scripting environment works change. In v4, the scripting API is operated through struct pointer, much like the exist `vsapi` pointer. The "finalize" function is also no longer needed. |
||
---|---|---|
.. | ||
refqueue.c | ||
refqueue.h | ||
vf_d3d11vpp.c | ||
vf_fingerprint.c | ||
vf_format.c | ||
vf_gpu.c | ||
vf_gpu.h | ||
vf_gpu_egl.c | ||
vf_gpu_vulkan.c | ||
vf_sub.c | ||
vf_vapoursynth.c | ||
vf_vavpp.c | ||
vf_vdpaupp.c |