From 8f51734daf98412abdce30e0e2106e69bbda8acb Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 18 Feb 2006 21:12:56 +0000 Subject: no upscale flag so automatic downscaling is possible in mencoder git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17647 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_scale.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 1bf477310b..db977aeae8 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -27,6 +27,7 @@ static struct vf_priv_s { struct SwsContext *ctx2; //for interlaced slices only unsigned char* palette; int interlaced; + int noup; int query_format_cache[64]; } vf_priv_dflt = { -1,-1, @@ -144,6 +145,13 @@ static int config(struct vf_instance_s* vf, } } + if(vf->priv->noup){ + if(vf->priv->w > width) + vf->priv->w= width; + if(vf->priv->h > height) + vf->priv->h= height; + } + if (vf->priv->w <= -8) { vf->priv->w += 8; round_w = 1; @@ -603,6 +611,7 @@ static m_option_t vf_opts_fields[] = { // Note that here the 2 field is NULL (ie 0) // As we want this option to act on the option struct itself {"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, &size_preset}, + {"noup", ST_OFF(noup), CONF_TYPE_INT, M_OPT_RANGE, 0, 1, NULL}, { NULL, NULL, 0, 0, 0, 0, NULL } }; -- cgit v1.2.3