mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
more (~40%) speedup :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7022 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4e4f8d2eba
commit
7eaba4c13d
@ -524,16 +524,20 @@ void outline(
|
|||||||
const int y1=(y<r) ? r-y : 0;
|
const int y1=(y<r) ? r-y : 0;
|
||||||
const int x2=(x+r>=width ) ? r+width -x : 2*r+1;
|
const int x2=(x+r>=width ) ? r+width -x : 2*r+1;
|
||||||
const int y2=(y+r>=height) ? r+height-y : 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;
|
int my;
|
||||||
|
|
||||||
for(my= y1; my<y2; my++){
|
for(my= y1; my<y2; my++){
|
||||||
unsigned char *dstp= t + (my+y-r)* width + x-r;
|
// unsigned char *dstp= t + (my+y-r)* width + x-r;
|
||||||
int *mp = m + my *mwidth;
|
// int *mp = m + my *mwidth;
|
||||||
int mx;
|
register int mx;
|
||||||
for(mx= x1; mx<x2; mx++){
|
for(mx= x1; mx<x2; mx++){
|
||||||
const int tmp= (src*mp[mx] + 128)>>8;
|
const int tmp= (src*mp[mx] + 128)>>8;
|
||||||
if(dstp[mx] < tmp) dstp[mx]= tmp;
|
if(dstp[mx] < tmp) dstp[mx]= tmp;
|
||||||
}
|
}
|
||||||
|
dstp+=width;
|
||||||
|
mp+=mwidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user