summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/cfg-mplayer.h6
-rw-r--r--core/defaultopts.c1
-rw-r--r--core/options.h2
-rw-r--r--video/decode/dec_video.c9
-rw-r--r--video/decode/vd.c2
-rw-r--r--video/filter/vf_pp.c2
6 files changed, 9 insertions, 13 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index 52c1e4891c..1c078fac25 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -448,7 +448,7 @@ const m_option_t common_opts[] = {
OPT_STRING("hwdec-codecs", hwdec_codecs, 0),
// postprocessing:
- {"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
+ OPT_INT("pp", divx_quality, 0),
#ifdef CONFIG_LIBPOSTPROC
{"pphelp", (void *) &pp_help, CONF_TYPE_PRINT, CONF_GLOBAL | CONF_NOCFG, 0, 0, NULL},
#endif
@@ -463,8 +463,8 @@ const m_option_t common_opts[] = {
// use (probably completely broken) decoder direct rendering
OPT_FLAG("dr1", vd_use_dr1, 0),
- {"field-dominance", &field_dominance, CONF_TYPE_CHOICE, 0,
- M_CHOICES(({"auto", -1}, {"top", 0}, {"bottom", 1}))},
+ OPT_CHOICE("field-dominance", field_dominance, 0,
+ ({"auto", -1}, {"top", 0}, {"bottom", 1})),
{"lavdopts", (void *) lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
{"lavfdopts", (void *) lavfdopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
diff --git a/core/defaultopts.c b/core/defaultopts.c
index c07580a872..28eb9bcbb1 100644
--- a/core/defaultopts.c
+++ b/core/defaultopts.c
@@ -78,6 +78,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
.audio_output_format = -1, // AF_FORMAT_UNKNOWN
.playback_speed = 1.,
.movie_aspect = -1.,
+ .field_dominance = -1,
.sub_auto = 1,
.osd_bar_visible = 1,
#ifdef CONFIG_ASS
diff --git a/core/options.h b/core/options.h
index 34254d69aa..ffc98633e3 100644
--- a/core/options.h
+++ b/core/options.h
@@ -165,6 +165,8 @@ typedef struct MPOpts {
struct m_obj_settings *vf_settings;
float movie_aspect;
int flip;
+ int field_dominance;
+ int divx_quality;
int vd_use_dr1;
char **sub_name;
char **sub_paths;
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index c084d76704..3401ff69f8 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -45,11 +45,6 @@
#include "video/decode/dec_video.h"
-// ===================================================================
-
-int field_dominance = -1;
-
-int divx_quality = 0;
int get_video_quality_max(sh_video_t *sh_video)
{
@@ -318,9 +313,9 @@ void *decode_video(sh_video_t *sh_video, struct demux_packet *packet,
return NULL; // error / skipped frame
}
- if (field_dominance == 0)
+ if (opts->field_dominance == 0)
mpi->fields |= MP_IMGFIELD_TOP_FIRST;
- else if (field_dominance == 1)
+ else if (opts->field_dominance == 1)
mpi->fields &= ~MP_IMGFIELD_TOP_FIRST;
double prevpts = sh_video->codec_reordered_pts;
diff --git a/video/decode/vd.c b/video/decode/vd.c
index 0ca685e2bb..b38d9d43d5 100644
--- a/video/decode/vd.c
+++ b/video/decode/vd.c
@@ -72,7 +72,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int out_fmt)
mp_msg(MSGT_DECVIDEO, MSGL_V, "VDec: vo config request - %d x %d (%s)\n",
w, h, vo_format_name(out_fmt));
- if (get_video_quality_max(sh) <= 0 && divx_quality) {
+ if (get_video_quality_max(sh) <= 0 && opts->divx_quality) {
// user wants postprocess but no pp filter yet:
sh->vfilter = vf = vf_open_filter(opts, vf, "pp", NULL);
}
diff --git a/video/filter/vf_pp.c b/video/filter/vf_pp.c
index 372fc81cad..742c26f95c 100644
--- a/video/filter/vf_pp.c
+++ b/video/filter/vf_pp.c
@@ -131,8 +131,6 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
//===========================================================================//
-extern int divx_quality;
-
static const unsigned int fmt_list[]={
IMGFMT_420P,
IMGFMT_444P,