summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-02 23:57:56 +0200
committerwm4 <wm4@nowhere>2015-04-03 00:11:10 +0200
commit14a530f4744fc7dee232bbb7c19218d1b0e00ef9 (patch)
tree725b604ad78c3c770fa08e56ca935de20ca8b29e
parent5a2825ec35446ae2127c0fb204203cd09738c4ed (diff)
downloadmpv-14a530f4744fc7dee232bbb7c19218d1b0e00ef9.tar.bz2
mpv-14a530f4744fc7dee232bbb7c19218d1b0e00ef9.tar.xz
vf_format: allow forcing stereo mode parameters
-rw-r--r--DOCS/man/vf.rst8
-rw-r--r--video/filter/vf_format.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst
index 0e944f110e..79055ec1a1 100644
--- a/DOCS/man/vf.rst
+++ b/DOCS/man/vf.rst
@@ -302,6 +302,14 @@ Available filters are:
:bt.709: ITU-R BT.709 (HD) (same primaries as sRGB)
:bt.2020: ITU-R BT.2020 (UHD)
+ ``<stereo-in>``
+ Set the stereo mode the video is assumed to be encoded in. Takes the
+ same values as the ``--video-stereo-mode`` option.
+
+ ``<stereo-out>``
+ Set the stereo mode the video should be displayed as. Takes the
+ same values as the ``--video-stereo-mode`` option.
+
``noformat[=fmt]``
Restricts the color space for the next filter without doing any conversion.
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index 8b86c35489..5731a6646b 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -38,6 +38,8 @@ struct vf_priv_s {
int outputlevels;
int primaries;
int chroma_location;
+ int stereo_in;
+ int stereo_out;
};
static bool is_compatible(int fmt1, int fmt2)
@@ -90,6 +92,10 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
out->primaries = p->primaries;
if (p->chroma_location)
out->chroma_location = p->chroma_location;
+ if (p->stereo_in)
+ out->stereo_in = p->stereo_in;
+ if (p->stereo_out)
+ out->stereo_out = p->stereo_out;
// Make sure the user-overrides are consistent (no RGB csp for YUV, etc.).
mp_image_params_guess_csp(out);
@@ -121,6 +127,8 @@ static const m_option_t vf_opts_fields[] = {
OPT_CHOICE_C("outputlevels", outputlevels, 0, mp_csp_levels_names),
OPT_CHOICE_C("primaries", primaries, 0, mp_csp_prim_names),
OPT_CHOICE_C("chroma-location", chroma_location, 0, mp_chroma_names),
+ OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names),
+ OPT_CHOICE_C("stereo-out", stereo_out, 0, mp_stereo3d_names),
{0}
};