diff options
author | wm4 <wm4@nowhere> | 2015-04-02 23:54:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-02 23:54:08 +0200 |
commit | 5a2825ec35446ae2127c0fb204203cd09738c4ed (patch) | |
tree | 90e24f12b16912e1ce2894f28839e716653066d2 /video/csputils.c | |
parent | 19f56e20979d1dbbb4b9956c955d4d0fa27516aa (diff) | |
download | mpv-5a2825ec35446ae2127c0fb204203cd09738c4ed.tar.bz2 mpv-5a2825ec35446ae2127c0fb204203cd09738c4ed.tar.xz |
video: cleanup stereo mode parsing
Use OPT_CHOICE_C() instead of the custom parser. The functionality is
pretty much equivalent.
(On a side note, it seems --video-stereo-mode can't be removed, because
it controls whether to "reduce" stereo video to mono, which is also the
default. In fact I'm not sure how this should be handled at all.)
Diffstat (limited to 'video/csputils.c')
-rw-r--r-- | video/csputils.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/video/csputils.c b/video/csputils.c index f8613399c8..3282e3b8ed 100644 --- a/video/csputils.c +++ b/video/csputils.c @@ -93,25 +93,24 @@ const struct m_opt_choice_alternatives mp_chroma_names[] = { }; // The short name _must_ match with what vf_stereo3d accepts (if supported). -// The long name is closer to the Matroska spec (StereoMode element). +// The long name in comments is closer to the Matroska spec (StereoMode element). // The numeric index matches the Matroska StereoMode value. If you add entries // that don't match Matroska, make sure demux_mkv.c rejects them properly. -// The long name is unused. -#define E(index, short, long) [index] = short -const char *const mp_stereo3d_names[MP_STEREO3D_COUNT] = { - E(0, "mono", "mono"), // unsupported by vf_stereo3d - E(1, "sbs2l", "side_by_side_left"), - E(2, "ab2r", "top_bottom_right"), - E(3, "ab2l", "top_bottom_left"), - E(4, "checkr", "checkboard_right"), // unsupported by vf_stereo3d - E(5, "checkl", "checkboard_left"), // unsupported by vf_stereo3d - E(6, "irr", "row_interleaved_right"), - E(7, "irl", "row_interleaved_left"), - E(8, "icr", "column_interleaved_right"),// unsupported by vf_stereo3d - E(9, "icl", "column_interleaved_left"), // unsupported by vf_stereo3d - E(10, "arcc", "anaglyph_cyan_red"), // Matroska: unclear which mode - E(11, "sbs2r", "side_by_side_right"), - E(12, "agmc", "anaglyph_green_magenta"), // Matroska: unclear which mode +const struct m_opt_choice_alternatives mp_stereo3d_names[] = { + {"mono", 0}, + {"sbs2l", 1}, // "side_by_side_left" + {"ab2r", 2}, // "top_bottom_right" + {"ab2l", 3}, // "top_bottom_left" + {"checkr", 4}, // "checkboard_right" (unsupported by vf_stereo3d) + {"checkl", 5}, // "checkboard_left" (unsupported by vf_stereo3d) + {"irr", 6}, // "row_interleaved_right" + {"irl", 7}, // "row_interleaved_left" + {"icr", 8}, // "column_interleaved_right" (unsupported by vf_stereo3d) + {"icl", 9}, // "column_interleaved_left" (unsupported by vf_stereo3d) + {"arcc", 10}, // "anaglyph_cyan_red" (Matroska: unclear which mode) + {"sbs2r", 11}, // "side_by_side_right" + {"agmc", 12}, // "anaglyph_green_magenta" (Matroska: unclear which mode) + {0} }; enum mp_csp avcol_spc_to_mp_csp(int avcolorspace) |