From 14a530f4744fc7dee232bbb7c19218d1b0e00ef9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Apr 2015 23:57:56 +0200 Subject: vf_format: allow forcing stereo mode parameters --- DOCS/man/vf.rst | 8 ++++++++ video/filter/vf_format.c | 8 ++++++++ 2 files changed, 16 insertions(+) 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) + ```` + Set the stereo mode the video is assumed to be encoded in. Takes the + same values as the ``--video-stereo-mode`` option. + + ```` + 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} }; -- cgit v1.2.3