1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-03 20:57:45 +00:00

optimization

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6966 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2002-08-11 10:12:15 +00:00
parent 8f7a7aa078
commit 9a2e9050f2

View File

@ -193,13 +193,13 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le
/***************************************************************************/ /***************************************************************************/
static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
int i, j, n; int i;
int8_t *src2= (int8_t*)src;
for(i=0; i<len; i++) for(i=0; i<len; i++)
{ {
for(j=0,n=0;j<3;j++) const int n= shift[0][i] + shift[1][i] + shift[2][i];
n+=shift[j][i]; dst[i]= src2[i]+((n*src2[i])>>7);
dst[i]= src[i]+n*(128-abs(128-src[i]))/128;
} }
} }