# HG changeset patch # User arpi # Date 1021851582 0 # Node ID 35eb2b9c7d9c5204cf0c3e0a1124fbc0c1abd7bb # Parent 018a0d7dddd40d1905ac05aaec5f6e5c3fbad2f3 new special w/h values: -2 and -3. based on proposal by Bohdan Horst diff -r 018a0d7dddd4 -r 35eb2b9c7d9c libmpcodecs/vf_scale.c --- a/libmpcodecs/vf_scale.c Sun May 19 23:31:10 2002 +0000 +++ b/libmpcodecs/vf_scale.c Sun May 19 23:39:42 2002 +0000 @@ -85,8 +85,13 @@ } // calculate the missing parameters: + if(vf->priv->w==-3) vf->priv->w=vf->priv->h*width/height; else + if(vf->priv->w==-2) vf->priv->w=vf->priv->h*d_width/d_height; if(vf->priv->w<0) vf->priv->w=width; else if(vf->priv->w==0) vf->priv->w=d_width; + + if(vf->priv->h==-3) vf->priv->h=vf->priv->w*height/width; else + if(vf->priv->h==-2) vf->priv->h=vf->priv->w*d_height/d_width; if(vf->priv->h<0) vf->priv->h=height; else if(vf->priv->h==0) vf->priv->h=d_height;