[Mplayer-cvslog] CVS: main/TOOLS/subfont-c subfont.c,1.15,1.16
Arpi of Ize
arpi at mplayerhq.hu
Fri Aug 16 18:06:13 CEST 2002
Update of /cvsroot/mplayer/main/TOOLS/subfont-c
In directory mail:/var/tmp.root/cvs-serv24952
Modified Files:
subfont.c
Log Message:
more (~40%) speedup :)
Index: subfont.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/subfont.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- subfont.c 15 Aug 2002 22:45:34 -0000 1.15
+++ subfont.c 16 Aug 2002 16:06:02 -0000 1.16
@@ -524,16 +524,20 @@
const int y1=(y<r) ? r-y : 0;
const int x2=(x+r>=width ) ? r+width -x : 2*r+1;
const int y2=(y+r>=height) ? r+height-y : 2*r+1;
+ register unsigned char *dstp= t + (y1+y-r)* width + x-r;
+ register int *mp = m + y1 *mwidth;
int my;
for(my= y1; my<y2; my++){
- unsigned char *dstp= t + (my+y-r)* width + x-r;
- int *mp = m + my *mwidth;
- int mx;
+// unsigned char *dstp= t + (my+y-r)* width + x-r;
+// int *mp = m + my *mwidth;
+ register int mx;
for(mx= x1; mx<x2; mx++){
const int tmp= (src*mp[mx] + 128)>>8;
if(dstp[mx] < tmp) dstp[mx]= tmp;
}
+ dstp+=width;
+ mp+=mwidth;
}
}
}
More information about the MPlayer-cvslog
mailing list