man: grammar tweak of mp.add_timeout()
vf-metadata: fix handling of NULL metadata

lavfi would segfault due to a NULL dereference if it was asked for its
metadata and none had been allocated (oops). This happens for libav
which has no concept of filter metadata.
vf_lavfi: reset metadata in reset()

It might have been nice not to do this so that metadata could
accumulate accross seeks, but it seems libavfilter looses its copy
anyway on recreate_graph.
TOOLS: improve autocrop.lua

It now inserts no filters and does nothing until the hot-key is pressed.
This makes it more suitable to be put in ~/.mpv/lua.

When the hot-key is pressed, it now inserts the cropdetect filter and
waits 1 second (or a --lua-opts specified duration) before gathering
the cropdetect metadata and inserting the appropriate crop filter. A
second press of the hotkey removes the crop.
TOOLS: better documentation of lua scripts
vf: print error if filtering a frame fails

The filters don't always print an error on their own, and printing an
error is better than silently dropping the frame.
video: improve error messages
vo_lavc: remove code with no effect

This field will also removed in the future.
vo: document draw_image
vdpau: add a postprocessing pseudo-filter

This factors out some code from vo_vdpau.c, especially deinterlacing
handling. The intention is to use this for vo_vdpau.c to make the logic
significantly easier, and to use it for vo_opengl (gl_hwdec_vdpau.c) to
allow selecting deinterlace and postprocessing modes.

As of this commit, the filter actually does nothing, since both vo_vdpau
and vo_opengl treat the generated images as normal vdpau images. This
will change in the following commits.
vf_vdpaupp: allow non-vdpau input

So you can use vdpau deinterlacing without using vdpau hardware
decoding.

vf_vavpp does something similar.
vo_opengl: make it work with vf_vdpaupp

This uses mp_vdpau_mixer_render(). The benefit is that it makes vdpau
deinterlacing just work. One additional minor advantage is that the
video mixer creation code is factored out (although that is a double-
edged sword).
vo_vdpau: support vf_vdpaupp

This is slightly incomplete: the mixer options, such as sharpen and
especially deinterlacing, are ignored. This also breaks automatic
enabling of interlacing with 'D' or --deinterlace. These issues will be
fixed later in the following commits.

Note that we keep all the custom vdpau queue stuff. This will also be
simplified later.
vdpau_mixer: allow overriding frame opts

So a caller can override the filter options dictated by vf_vdpaupp.
vo_vdpau: apply vo_vdpau postprocessing options

The previous commits changed vo_vdpau so that these options are set by
vf_vdpaupp, and the corresponding vo_vdpau were ignored. But for
compatibility, keep the "old" options working.

The value of this is questionable - maybe the vo_vdpau options should
just be removed. For now, at least demonstrate that it's possible.

The "deint" suboption still doesn't work, because the framerate doubling
logic required for some deint modes was moved to vf_vdpaupp. This
requires more elaborate workarounds.
vf_vdpaupp: allow toggling deinterlace

Basically makes the 'D' key work again. (But only if the filter is
already inserted.)
command: make enabling deinterlacing with vdpau work

This restores the capability of enabling deinterlacing with the
'cycle deinterlace' command with vo_vdpau, and also makes it work
with vo_opengl.
command: redo deinterlace filter probing

Give up on the deint_filters[] array, and probe using explicit code
instead. Add additional checks to test the pixel format to avoid
annoying warnings when a hardware deinterlacer is inserted when the
current video chain is obviously incompatible.
command, vo_vdpau: respect vdpau deint sub-option

This is a horrible hack to keep compatibility with the vo_vdpau deint
sub-option.
vo_vdpau: always use mp_image for internal buffer queue