From 1dff26730aeb915fae99dc7eb38c864af41f70c9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 21 May 2013 00:45:42 +0200 Subject: dec_video: get rid of two global variables --- video/decode/dec_video.c | 9 ++------- video/decode/vd.c | 2 +- video/filter/vf_pp.c | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'video') 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, -- cgit v1.2.3