[MPlayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.62,1.63

Michael Niedermayer CVS syncmail at mplayerhq.hu
Sat Feb 18 22:12:58 CET 2006


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv14281

Modified Files:
	vf_scale.c 
Log Message:
no upscale flag so automatic downscaling is possible in mencoder


Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- vf_scale.c	9 Feb 2006 14:07:55 -0000	1.62
+++ vf_scale.c	18 Feb 2006 21:12:56 -0000	1.63
@@ -27,6 +27,7 @@
     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 @@
 	}
     }
 
+    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 @@
   // 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 }
 };
 




More information about the MPlayer-cvslog mailing list