summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_scale.c
diff options
context:
space:
mode:
authorkmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-18 16:14:27 +0000
committerkmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-18 16:14:27 +0000
commit1909c80216ed5398d9b3529d402ab6ea73f0e539 (patch)
tree0232ceac09fa23cf8c82f6ddd4cdb20a2778b57f /libmpcodecs/vf_scale.c
parent5bafd479aecfbf8f0a047c49ea7576f6baad0e55 (diff)
downloadmpv-1909c80216ed5398d9b3529d402ab6ea73f0e539.tar.bz2
mpv-1909c80216ed5398d9b3529d402ab6ea73f0e539.tar.xz
Put back the ordering of the if as requested by Arpi.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6751 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_scale.c')
-rw-r--r--libmpcodecs/vf_scale.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index 8cd66c4687..6b05d9b27d 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -107,24 +107,28 @@ static int config(struct vf_instance_s* vf,
case IMGFMT_YUY2: /* YUY2 needs w rounded to 2 */
if(vf->priv->w==-3) vf->priv->w=(vf->priv->h*width/height+1)&~1; else
if(vf->priv->w==-2) vf->priv->w=(vf->priv->h*d_width/d_height+1)&~1;
+ 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;
break;
case IMGFMT_YV12: /* YV12 needs w & h rounded to 2 */
if(vf->priv->w==-3) vf->priv->w=(vf->priv->h*width/height+1)&~1; else
if(vf->priv->w==-2) vf->priv->w=(vf->priv->h*d_width/d_height+1)&~1;
+ 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+1)&~1; else
if(vf->priv->h==-2) vf->priv->h=(vf->priv->w*d_height/d_width+2)&~1;
break;
default:
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;
break;
}
- if(vf->priv->w<0) vf->priv->w=width; else
- if(vf->priv->w==0) vf->priv->w=d_width;
if(vf->priv->h<0) vf->priv->h=height; else
if(vf->priv->h==0) vf->priv->h=d_height;