Mercurial > mplayer.hg
changeset 7021:d27dd694e5ea
more (~40%) speedup :)
author | arpi |
---|---|
date | Fri, 16 Aug 2002 16:06:02 +0000 |
parents | 04d2443978ae |
children | ef9f4c1a3345 |
files | TOOLS/subfont-c/subfont.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/TOOLS/subfont-c/subfont.c Fri Aug 16 09:57:46 2002 +0000 +++ b/TOOLS/subfont-c/subfont.c Fri Aug 16 16:06:02 2002 +0000 @@ -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; } } }