[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.19,1.20

Kim Minh Kaplan CVS kmkaplan at mplayerhq.hu
Thu Jul 18 18:14:30 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv10779/libmpcodecs

Modified Files:
	vf_scale.c 
Log Message:
Put back the ordering of the if as requested by Arpi.


Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- vf_scale.c	18 Jul 2002 14:06:32 -0000	1.19
+++ vf_scale.c	18 Jul 2002 16:14:27 -0000	1.20
@@ -107,24 +107,28 @@
     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;




More information about the MPlayer-cvslog mailing list