diff options
author | wm4 <wm4@nowhere> | 2020-04-24 14:41:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-24 14:41:50 +0200 |
commit | 71295fb872ba6593c8591cff7398498e05afb298 (patch) | |
tree | d205cb839328edbc2ce87609ca8fa7f244c8d3b9 /video/filter | |
parent | 8909bf3317b26f35265efa7dae534f430c636bb3 (diff) | |
download | mpv-71295fb872ba6593c8591cff7398498e05afb298.tar.bz2 mpv-71295fb872ba6593c8591cff7398498e05afb298.tar.xz |
video: add alpha type metadata
This is mostly for testing. It adds passing through the metadata through
the video chain. The metadata can be manipulated with vf_format. Support
for zimg alpha conversion (if built with zimg after it gained alpha
support) is implemented. Support premultiplied input in vo_gpu.
Some things still seem to be buggy.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf_format.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c index 793e37bc4a..8687db783b 100644 --- a/video/filter/vf_format.c +++ b/video/filter/vf_format.c @@ -50,6 +50,7 @@ struct vf_format_opts { int chroma_location; int stereo_in; int rotate; + int alpha; int w, h; int dw, dh; double dar; @@ -87,6 +88,8 @@ static void set_params(struct vf_format_opts *p, struct mp_image_params *out, out->stereo3d = p->stereo_in; if (p->rotate >= 0) out->rotate = p->rotate; + if (p->alpha) + out->alpha = p->alpha; if (p->w > 0 && set_size) out->w = p->w; @@ -196,6 +199,7 @@ static const m_option_t vf_opts_fields[] = { {"chroma-location", OPT_CHOICE_C(chroma_location, mp_chroma_names)}, {"stereo-in", OPT_CHOICE_C(stereo_in, mp_stereo3d_names)}, {"rotate", OPT_INT(rotate), M_RANGE(-1, 359)}, + {"alpha", OPT_CHOICE_C(alpha, mp_alpha_names)}, {"w", OPT_INT(w)}, {"h", OPT_INT(h)}, {"dw", OPT_INT(dw)}, |