From 23d9dc5457c52408533c498c685ad9dd6fd2cee0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 29 Nov 2017 20:03:20 +0100 Subject: video: remove automatic stereo3d filter insertion The internal stereo3d filter was removed due to being GPL only, and due to being a mess that somehow used libavfilter's filter. Without this filter, it's hard to remove our internal stereo3d image attribute, so even using libavfilter's stereo3d filter would not work too well (unless someone fixes it and makes it able to use AVFrame metadata, which we then could mirror in mp_image). This was never well thought-through anyway, so just drop it. I think some "downsampling" support would still make sense, maybe that can be readded later. --- DOCS/man/options.rst | 4 ++-- options/m_option.h | 4 ++-- options/options.c | 3 ++- player/video.c | 13 +------------ 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 7a91a5069c..2954bc3d1f 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -947,8 +947,8 @@ Video rotation metadata.) ``--video-stereo-mode=`` - Set the stereo 3D output mode (default: ``mono``). This is done by inserting - the ``stereo3d`` conversion filter. + Set the stereo 3D output mode (default: ``mono``). This is mostly broken and + thus deprecated. The pseudo-mode ``no`` disables automatic conversion completely. diff --git a/options/m_option.h b/options/m_option.h index ac10ed9dd2..104fd9519c 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -638,10 +638,10 @@ extern const char m_option_path_separator; #define OPT_CHOICE_(optname, varname, flags, choices, ...) \ OPT_GENERAL(int, optname, varname, flags, M_CHOICES(choices), __VA_ARGS__) // Variant which takes a pointer to struct m_opt_choice_alternatives directly -#define OPT_CHOICE_C(optname, varname, flags, choices) \ +#define OPT_CHOICE_C(optname, varname, flags, choices, ...) \ OPT_GENERAL(int, optname, varname, flags, .priv = (void *) \ MP_EXPECT_TYPE(const struct m_opt_choice_alternatives*, choices), \ - .type = &m_option_type_choice) + .type = &m_option_type_choice, __VA_ARGS__) #define OPT_FLAGS(...) \ OPT_CHOICE_(__VA_ARGS__, .type = &m_option_type_flags) diff --git a/options/options.c b/options/options.c index e295afa9bc..d3e7bd2c34 100644 --- a/options/options.c +++ b/options/options.c @@ -566,7 +566,8 @@ const m_option_t mp_opts[] = { OPT_CHOICE_OR_INT("video-rotate", video_rotate, UPDATE_IMGPAR, 0, 359, ({"no", -1})), OPT_CHOICE_C("video-stereo-mode", video_stereo_mode, UPDATE_IMGPAR, - mp_stereo3d_names), + mp_stereo3d_names, + .deprecation_message = "mostly broken"), OPT_CHOICE_OR_INT("cursor-autohide", cursor_autohide_delay, 0, 0, 30000, ({"no", -1}, {"always", -2})), diff --git a/player/video.c b/player/video.c index 8fe3244c5c..956e55d843 100644 --- a/player/video.c +++ b/player/video.c @@ -129,7 +129,7 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c) set_allowed_vo_formats(vo_c); - char *filters[] = {"autorotate", "autostereo3d", "deinterlace", NULL}; + char *filters[] = {"autorotate", "deinterlace", NULL}; for (int n = 0; filters[n]; n++) { struct vf_instance *vf = vf_find_by_label(vo_c->vf, filters[n]); if (vf) @@ -154,17 +154,6 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c) } } - if (params.stereo_in != params.stereo_out && - params.stereo_in > 0 && params.stereo_out >= 0) - { - char *to = (char *)MP_STEREO3D_NAME(params.stereo_out); - if (to) { - char *args[] = {"in", "auto", "out", to, "warn", "no", NULL, NULL}; - if (try_filter(vo_c, "stereo3d", "autostereo3d", args) < 0) - MP_ERR(vo_c, "Can't insert 3D conversion filter.\n"); - } - } - if (mpctx->opts->deinterlace) probe_deint_filters(vo_c); } -- cgit v1.2.3