comparison resample2.c @ 2171:3f52c129d00f libavcodec

10l (lrintf(a)+b vs. lrintf(a+b))
author michael
date Sat, 14 Aug 2004 15:18:49 +0000
parents 7f88c429ad65
children b88e05b9b445
comparison
equal deleted inserted replaced
2170:51da590b31a3 2171:3f52c129d00f
102 norm += y; 102 norm += y;
103 } 103 }
104 104
105 /* normalize so that an uniform color remains the same */ 105 /* normalize so that an uniform color remains the same */
106 for(i=0;i<tap_count;i++) { 106 for(i=0;i<tap_count;i++) {
107 v = clip(lrintf(tab[i] * scale / norm) + e, -32768, 32767); 107 v = clip(lrintf(tab[i] * scale / norm + e), -32768, 32767);
108 filter[ph * tap_count + i] = v; 108 filter[ph * tap_count + i] = v;
109 e += tab[i] * scale / norm - v; 109 e += tab[i] * scale / norm - v;
110 } 110 }
111 } 111 }
112 } 112 }