diff options
author | 2002-08-16 16:06:02 +0000 | |
---|---|---|
committer | 2002-08-16 16:06:02 +0000 | |
commit | 7eaba4c13d27f941c84ad944b67b0502149c4a96 (patch) | |
tree | 5aa68450336e50838775d9eb67bca62853b6613d /TOOLS/subfont-c/subfont.c | |
parent | 4e4f8d2eba5d9c22c0c958dc5d74a5c290a6789b (diff) |
more (~40%) speedup :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7022 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS/subfont-c/subfont.c')
-rw-r--r-- | TOOLS/subfont-c/subfont.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/TOOLS/subfont-c/subfont.c b/TOOLS/subfont-c/subfont.c index 9439c9ae61..7f549533cd 100644 --- a/TOOLS/subfont-c/subfont.c +++ b/TOOLS/subfont-c/subfont.c @@ -524,16 +524,20 @@ void outline( 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; } } } |