[Mplayer-cvslog] CVS: main/TOOLS/subfont-c subfont.c,1.14,1.15
Michael Niedermayer
michael at mplayerhq.hu
Fri Aug 16 00:45:36 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/DOCS mplayer.1,1.206,1.207
- Next message: [Mplayer-cvslog] CVS: main cfg-mplayer.h,1.159,1.160 configure,1.537,1.538 mplayer.c,1.546,1.547 mplayer.h,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/TOOLS/subfont-c
In directory mail:/var/tmp.root/cvs-serv3127
Modified Files:
subfont.c
Log Message:
skip black in outline (white skip code is #if 0 as there is no speed difference)
Index: subfont.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/subfont.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- subfont.c 15 Aug 2002 20:50:13 -0000 1.14
+++ subfont.c 15 Aug 2002 22:45:34 -0000 1.15
@@ -508,6 +508,38 @@
int mwidth) {
int x, y;
+#if 1
+ for (y = 0; y<height; y++) {
+ for (x = 0; x<width; x++) {
+ const int src= s[x];
+ if(src==0) continue;
+#if 0
+ if(src==255 && x>0 && y>0 && x+1<width && y+1<height
+ && s[x-1]==255 && s[x+1]==255 && s[x-width]==255 && s[x+width]==255){
+ t[x + y*width]=255;
+ }else
+#endif
+ {
+ const int x1=(x<r) ? r-x : 0;
+ 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;
+ 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;
+ for(mx= x1; mx<x2; mx++){
+ const int tmp= (src*mp[mx] + 128)>>8;
+ if(dstp[mx] < tmp) dstp[mx]= tmp;
+ }
+ }
+ }
+ }
+ s+= width;
+ }
+#else
for (y = 0; y<height; ++y) {
for (x = 0; x<width; ++x, ++s, ++t) {
//if(s[0]>=192) printf("%d\n",s[0]);
@@ -535,6 +567,7 @@
*t = 255;
}
}
+#endif
}
- Previous message: [Mplayer-cvslog] CVS: main/DOCS mplayer.1,1.206,1.207
- Next message: [Mplayer-cvslog] CVS: main cfg-mplayer.h,1.159,1.160 configure,1.537,1.538 mplayer.c,1.546,1.547 mplayer.h,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list