[Mplayer-cvslog] CVS: main/libvo aspect.c,1.2,1.3
Atmosfear
atmos4 at mplayer.dev.hu
Wed Oct 3 19:41:12 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv21480/libvo
Modified Files:
aspect.c
Log Message:
Fix case where srch, srcw and fitinw and fitinh are really the same variables.
Index: aspect.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/aspect.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- aspect.c 3 Oct 2001 15:31:51 -0000 1.2
+++ aspect.c 3 Oct 2001 17:40:56 -0000 1.3
@@ -9,17 +9,18 @@
void aspect(int *srcw, int *srch, int fitinw, int fitinh){
int srcwcp, srchcp;
srcwcp=*srcw; srchcp=*srch;
- *srcw=fitinw;
- *srch=(int)(((float)fitinw / (float)srcwcp * (float)srchcp)
+ srcwcp=fitinw;
+ srchcp=(int)(((float)fitinw / (float)*srcw * (float)*srch)
* ((float)fitinh/((float)fitinw/monitor_aspect)));
- *srch+=*srch%2; // round
- //printf("aspect rez wh: %dx%d\n",*srcw,*srch);
- if(*srch>fitinh || *srch<srchcp){
- *srch=fitinh;
- *srcw=(int)(((float)fitinh / (float)srchcp * (float)srcwcp)
+ srchcp+=srchcp%2; // round
+ //printf("aspect rez wh: %dx%d (org: %dx%d)\n",srcwcp,srchcp,*srcw,*srch);
+ if(srchcp>fitinh || srchcp<*srch){
+ srchcp=fitinh;
+ srcwcp=(int)(((float)fitinh / (float)*srch * (float)*srcw)
* ((float)fitinw/((float)fitinh/(1/monitor_aspect))));
- *srcw+=*srcw%2; // round
+ srcwcp+=srcwcp%2; // round
}
- //printf("aspect ret wh: %dx%d\n",*srcw,*srch);
+ //printf("aspect ret wh: %dx%d (org: %dx%d)\n",srcwcp,srchcp,*srcw,*srch);
+ *srcw=srcwcp; *srch=srchcp;
}
More information about the MPlayer-cvslog
mailing list