diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-18 21:12:56 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-18 21:12:56 +0000 |
commit | 8f51734daf98412abdce30e0e2106e69bbda8acb (patch) | |
tree | 74856910f7acc747d0ce5aad226233d282f99b15 /libmpcodecs | |
parent | d7998ea0efea20d86d96f6dd11261ec35a6945ff (diff) | |
download | mpv-8f51734daf98412abdce30e0e2106e69bbda8acb.tar.bz2 mpv-8f51734daf98412abdce30e0e2106e69bbda8acb.tar.xz |
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_scale.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 } }; |